cinnion / check-disk-snmp

A Nagios plugin to checking disk usage on remote systems via SNMP
Mozilla Public License 2.0
0 stars 2 forks source link

Feature Request: add PerfData #3

Open futureweb opened 5 months ago

futureweb commented 5 months ago

What would be a really great addition to your already nice check plugin is if it could also output the PerfData. This would allow us to see the corresponding graphs in Centreon for the values. It would be perfect for tracking the long-term development of disk/inode usage.

Here's an example of another check plugin with PerfData:

/usr/local/icinga/libexec/check_centreon_snmp_remote_storage -H host.futurehosting.at -C public -n -d / Disk OK - / TOTAL: 124.857GB USED: 96.903GB (77%) FREE: 27.955GB (23%)|size=134064599040B used=104048508928B;120658139136;127361369088;0;134064599040

So, the values just need to be appended after a "|" and that's it.

For example:

/usr/local/icinga/libexec/check-disk-snmp.py -H host.futurehosting.at -C public -w 80%,10%i -c 90% / Warning 20 > warning threshold of 10 for dskPercentNode dskPercent=78 |diskUsage=1000B inodeUsage=5000

Unfortunately, I'm not really proficient in Python myself, otherwise, I would submit a PR for it myself.

But maybe you find this feature useful and add it to your plugin.

Thank you very much, greetings from Austria Andy

futureweb commented 5 months ago

PerfData: https://icinga.com/docs/icinga-2/latest/doc/05-service-monitoring/#multiple-performance-data-values

futureweb commented 5 months ago

also just noticed when adding the check to more Servers - it would be really nice if Output would be consistant regarding the position of DiskSpace and DiskInodes - currently it's ??random?? Sometimes Inodes are in front, sometimes the diskspace?

grafik