Hi,
I am totally new to Go, just got my environment setup. I am trying to fix a problem in a nagios plugins written in Go that relies on nagiosplugin.go (@egnite). Now it seems to me this nagiosplugin.go does not support performance data output as it should. Let me explain:
The tutorial is refering to Nagios Plugin Developers Guideline that says format for perf data is
'label'=value[UOM];[warn];[crit];[min];[max]
but the function AddPerfDatum is changing position of MIN-MAX with CRIT-WARN
// Add some perfdata too (label, unit, value, min, max, warn, crit)
Anyway. But furthermore, I wonder why warn, crit, min and max are defined as float64 since 'warn' and 'crit' can of course be in the range format so it should be able to use "20:40" as a value : https://docs.icinga.com/latest/en/perfdata.html
This means neither can't I set the MIN to "20:28" nor can't I set the MAX to "18:30" which is quite important for monitoring ranges like temperature or process counters.
So logically, any plugin based on this repo cannot use the range format as standard plugins do. Any nagios plugin should be able to output the min:max range with a colon between them:
/usr/lib/nagios/plugins/check_procs -w 300:400 -c 500:600
PROCS KRITISCH: 192 Prozesse | procs=192;300:400;500:600;0
Is there a chance this code will be improved in time?
Hi,
I am totally new to Go, just got my environment setup. I am trying to fix a problem in a nagios plugins written in Go that relies on nagiosplugin.go (@egnite). Now it seems to me this nagiosplugin.go does not support performance data output as it should. Let me explain:
The tutorial is refering to Nagios Plugin Developers Guideline that says format for perf data is
'label'=value[UOM];[warn];[crit];[min];[max]but the function AddPerfDatum is changing position of MIN-MAX with CRIT-WARN
// Add some perfdata too (label, unit, value, min, max, warn, crit)Anyway. But furthermore, I wonder why warn, crit, min and max are defined as float64 since 'warn' and 'crit' can of course be in the range format so it should be able to use "20:40" as a value : https://docs.icinga.com/latest/en/perfdata.html
This means neither can't I set the MIN to "20:28" nor can't I set the MAX to "18:30" which is quite important for monitoring ranges like temperature or process counters.
So logically, any plugin based on this repo cannot use the range format as standard plugins do. Any nagios plugin should be able to output the min:max range with a colon between them:
Is there a chance this code will be improved in time?