Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance data values parsing problem: inf, -inf #10073

Open
RincewindsHat opened this issue Jun 7, 2024 · 1 comment · May be fixed by #10077
Open

Performance data values parsing problem: inf, -inf #10073

RincewindsHat opened this issue Jun 7, 2024 · 1 comment · May be fixed by #10077
Labels
area/metrics General metrics handling ref/NC

Comments

@RincewindsHat
Copy link
Member

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 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

  1. Provide a check result with a performance data value foo=inf to Icinga2
  2. get the
    [2024-06-07 10:37:59 +0200] warning/Influxdb2Writer: Unexpected response code: Bad Request
    [2024-06-07 10:37:59 +0200] warning/Influxdb2Writer: Unexpected Content-Type: application/json; charset=utf-8
    
    message 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

  • Version used (icinga2 --version): 2.14.2-1 (from packages.icinga.com)
  • Operating System and version: Debian bookworm
  • Enabled features (icinga2 feature list): InfluxDB2Writer
@RincewindsHat
Copy link
Member Author

ref/NC/820245

@RincewindsHat RincewindsHat linked a pull request Jun 9, 2024 that will close this issue
@Al2Klimov Al2Klimov added ref/NC area/metrics General metrics handling labels Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/metrics General metrics handling ref/NC
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants