Commit Graph

16 Commits

Author SHA1 Message Date
Julian Brost 06999faf25 Allow using E in perfdata both as exponent and unit prefix 2021-06-08 12:37:13 +02:00
Julian Brost 62cbe72cdb
Merge pull request #8492 from Icinga/bugfix/perfdata-scientific-notation
Fix perfdata parser not recognize scientific notation
2021-06-07 15:29:52 +02:00
Michael Insel b9c6abc38c Fix perfdata parser not recognize scientific notation
The scientific notation is basically allowed in our performance data
parser. In an edge case where scientific notation is delivered with
an upercas E letter our parser does not recognize it and drops it as
false performance data.

The wrong interpretation as false performance data affects all parts of
the performance data, the value itself, the warning value, the critical
value, the minimum value and the maximum value.
2020-11-26 18:56:41 +01:00
Alexander A. Klimov 720a88c29a PerfdataValue: add UoMs
* {,{K,M,G,T,P,E,Z,Y}{,i}}B
  => bytes
* {,{k,m,g,t,p,e,z,y}{,i}}b
  => bits
* packets
* {n,u,m,}s m h d
  => seconds
* {n,u,m,,k,M,G,T,P,E,Z,Y}{{A,O,V,W},{A,W}{s,m,h}}
  => amperes, ohms, volts, watts, ampere-seconds, watt-hours
* lm dBm
  => lumens decibel-milliwatts
* {n,u,m,,k}g t
  => grams
* C F K
  => degrees-celsius, degrees-fahrenheit, degrees-kelvin
* {m,,h}l
  => liters

refs #7225
2020-04-03 12:47:36 +02:00
Alexander A. Klimov 8050bd9e76 PerfdataValue#Parse(): don't complain on unknown UoMs
refs #7225
2020-03-25 13:05:22 +01:00
Michael Friedrich d14a88235d Replace Copyright header with a short version, part I
CLion -> replace in path
2019-02-25 14:48:22 +01:00
Michael Friedrich dab53448bc icinga.com: Update *.{h,c}pp 2018-10-18 09:27:04 +02:00
Gunnar Beutner d9c0b6f806 Refactor REGISTER_SCRIPTFUNCTION_* macros 2018-08-13 13:44:31 +02:00
Gunnar Beutner 94e6be1a65 Remove unused includes 2018-01-22 09:52:29 +01:00
Gunnar Beutner 9d436605f0 Fix compatibility with CMake < 3.1 2018-01-18 15:12:46 +01:00
Gunnar Beutner 71ee5ac698 Build fix 2018-01-04 12:33:51 +01:00
Gunnar Beutner 621eed3f13 Apply clang-tidy fix 'modernize-pass-by-value' 2018-01-04 12:24:57 +01:00
Gunnar Beutner ac155d1dda Apply clang-tidy fix 'modernize-redundant-void-arg' 2018-01-04 12:24:57 +01:00
Michael Insel 158ae2188e Change copyright header for 2018 2018-01-02 12:08:55 +01:00
Jean Flach 2636e6a77a Whitespace fix
What does this change?
* Remove use of spaces for formatting
These could be found by using `grep -r -l -P '^\t+ +[^*]'
* Removal of training whitespaces
* A few lines longer than 120 chars
2017-12-20 14:53:52 +01:00
Michael Friedrich 79dcb789c2 Move PerfdataValue() class into base library
This is required for libremote and ApiListener stats in #5133
2017-05-15 16:32:29 +02:00