Some special performance data values like inf and -inf are parsed without hesitation by Icinga2
although they are probably in every case caused by a faulty plugin.
Since the performance data value in Icinga2 is internally a double as far as I could deduct,
the value is "correctly" parsed (by strtold in the end if I am correct), but the resulting DBL_MIN or DBL_MAX can later cause
errors in Performance data writers (InfluxDB(2)) which do not accept
inf or -inf as numbers.
To Reproduce
Provide a check result with a performance data value foo=inf to Icinga2
Describe the bug
Some special performance data values like
inf
and-inf
are parsed without hesitation by Icinga2 although they are probably in every case caused by a faulty plugin. Since the performance data value in Icinga2 is internally adouble
as far as I could deduct, the value is "correctly" parsed (bystrtold
in the end if I am correct), but the resultingDBL_MIN
orDBL_MAX
can later cause errors in Performance data writers (InfluxDB(2)) which do not acceptinf
or-inf
as numbers.To Reproduce
foo=inf
to Icinga2message in
/var/log/icinga2/icinga2.log
Expected behavior
Reject performance data values which are not concrete numbers and write a
warning
/error
message to the log, so one can debug the monitoring plugin.Your Environment
Include as many relevant details about the environment you experienced the problem in
icinga2 --version
): 2.14.2-1 (from packages.icinga.com)icinga2 feature list
): InfluxDB2Writer