mickem / nscp

NSClient++
http://nsclient.org
GNU General Public License v2.0
239 stars 94 forks source link

Perfdata with explicitly undefined values becomes 0 #669

Open infraweavers opened 4 years ago

infraweavers commented 4 years ago

Issue and Steps to Reproduce

According to https://nagios-plugins.org/doc/guidelines.html#AEN200 if a nagios check wants to provide an explicitly undefined value it is able to return U however we have a script that does this and it appears that when accessed through the REST API the value 0 is returned.

Basically create a script that outputs as a command:

OK | label=U%;;;; label2=100%;;;;

Expected Behavior

The API should return "U" as the value so that PNP4Nagios knows to disregard the result and not plot that sample

Actual Behavior

The API returns 0, PNP4Nagios plots 0 and therefore effectively breaks the graph.

Details

Additional Details

Additionally check_nsc_web does float parse the output, however I am about to raise an issue there with the same problem