Vartez
June 20, 2023, 9:47am
1
Hey there, I have a question about the Icinga2 Windows Powershell Checks and their metrics.
For example, the docu says the available metrics for the check “Invoke-IcingaCheckMemory” are:
Mem% used
Mem available
and Pagefile% used.
I get all Metrics with the official InfluxDB writer from Icinga but if I check my Database it only writes the bytes used into the database and none of the other 3 metrics.
Can someone explain why they don’t get written in the database, I didn’t really found any explanation in the docs available.
Thank you very much!
Al2Klimov
(Grandmaster)
June 23, 2023, 11:33am
2
Hello @Vartez !
I guess this is your problem:
opened 02:26PM - 14 Oct 21 UTC
bug
area/metrics
needs feedback
area/influxdb
area/icingadb
TBD
## Describe the bug
The InfluxdbWriter is ignoring the perfdata result from s… cript 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
Does the plugin output ranges like @10 :20 in your case ?
Best,
A/K