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

Perfdata: missing support for ranges in warning/critical thresholds #9038

Open
tjapa opened this issue Oct 14, 2021 · 4 comments
Open

Perfdata: missing support for ranges in warning/critical thresholds #9038

tjapa opened this issue Oct 14, 2021 · 4 comments
Labels
area/icingadb New backend area/influxdb Metrics to InfluxDB area/metrics General metrics handling bug Something isn't working needs feedback We'll only proceed once we hear from you again TBD To be defined - We aren't certain about this yet

Comments

@tjapa
Copy link

tjapa commented Oct 14, 2021

Describe the bug

The InfluxdbWriter is ignoring the perfdata result from script check_snmp with two ranges for warning and critical thresholds.

[2021-10-14 14:14:20 +0000] warning/InfluxdbWriter: Ignoring invalid perfdata for checkable 'TESTE-HOST!PING_LOSS_RTT' and command 'check_bpinger_lossrtt' with value: ping-rtt=9120;@1:3,@10000:50000;@4:99,@60000:100000

To Reproduce

The check_bpinger_loss_rtt is a wrapper for check_snmp (Nagios plugin).

Basically, the check_snmp is being called like (ignoring some arguments):

./check_snmp -w @1:3,@10000:50000 -c @4:99,@60000:100000 -l ping-loss,ping-rtt

Output:

SNMP OK - ping-loss 0 ping-rtt 6410 | ping-loss=0;@1:3,@10000:50000;@4:99,@60000:100000 ping-rtt=6410;@1:3,@10000:50000;@4:99,@60000:100000

When a running with only one range for critical and warning threshold, the problem seems gone.

./check_snmp -w @1:3 -c @4:99 -l ping-loss,ping-rtt

Output:

SNMP OK - ping-loss 0 ping-rtt 8860 | ping-loss=0;@1:3;@4:99 ping-rtt=8860;@1:3;@4:99

My Environment

I'm running the icinga/icinga2 2.13.1 4944f0bc0f67 docker image.

System information:
Platform: Debian GNU/Linux
Platform version: 10 (buster)
Kernel: Linux
Kernel version: 4.9.0-16-amd64
Architecture: x86_64

Build information:
Compiler: GNU 8.3.0
Build host: 4674da227710
OpenSSL version: OpenSSL 1.1.1d 10 Sep 2019

Disabled features: debuglog elasticsearch gelf graphite icingadb ido-mysql mainlog opentsdb perfdata syslog
Enabled features: api checker ido-pgsql influxdb notification

@LordHepipud
Copy link
Contributor

Icinga for Windows plugins are also affected, as we support the Icinga plugin thresholds out-of-the-box for almost every plugin and argument.

https://icinga.com/docs/icinga-for-windows/latest/plugins/doc/10-Icinga-Plugins/

@julianbrost
Copy link
Contributor

Looks like the original [Nagios plugin guidelines] seem to explicitly allow ranges for warn/crit:

warn and crit are in the range format (see the Section called Threshold and Ranges). Must be the same UOM

But looking at the icinga2 code, seems like support for this was never implemented.

@julianbrost julianbrost changed the title InfluxdbWriter ignoring perfdata Perfdata: missing support for ranges in warning/critical thresholds Jan 27, 2022
@julianbrost julianbrost added area/icingadb New backend area/metrics General metrics handling labels Jan 27, 2022
@Al2Klimov
Copy link
Member

Colleagues, what about just letting the parsing succeed for now, so we get the value and can write it, but not necessarily the thresholds, yet?

@Al2Klimov Al2Klimov added the needs feedback We'll only proceed once we hear from you again label Jan 24, 2023
@Al2Klimov Al2Klimov added the TBD To be defined - We aren't certain about this yet label May 8, 2023
@RincewindsHat
Copy link
Member

yes, please do that at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/icingadb New backend area/influxdb Metrics to InfluxDB area/metrics General metrics handling bug Something isn't working needs feedback We'll only proceed once we hear from you again TBD To be defined - We aren't certain about this yet
Projects
None yet
Development

No branches or pull requests

5 participants