Hello
Im trying to poll a machine for dns querys, my command looks like this:
$USER1$/check_snmp -H $HOSTADDRESS$ -o $ARG1$ -C $ARG4$ -m: -l "DNS querys" -P $ARG5$
Plugin output:
SNMP OK - DNS querys 523 | DNS querys=523c
Where does the c in the output come from?
Strange output
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Strange output
It looks like that is performance data, so it is just for graphing purposes. Do you see anything on the graph? Does it expand on the "c" metric?
Re: Strange output
Yes its just for performance data. No, its just puts a "c" after the values (avg, min max etc), really strange. I did a really dirty fix with a linux command to remove the c.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Strange output
I believe the c is for count, but I could be entirely wrong. You could try adding "-u Count" to it, or something similar.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Strange output
Hmm ok, well i can live with my dirty fix 
Now i have a other issue. I have made a command that gives a output like this
SNMP OK - DNS querys 460 | DNS querys=460
But the graph looks abit strange: http://postimg.org/image/xr30ok9pp/
Im quite sure its not 0 this when it show in the graph but rather that it dont get any values then so it feeds 0 to the graph. Any ide of how i can solve this?
/Nisse
Now i have a other issue. I have made a command that gives a output like this
SNMP OK - DNS querys 460 | DNS querys=460
But the graph looks abit strange: http://postimg.org/image/xr30ok9pp/
Im quite sure its not 0 this when it show in the graph but rather that it dont get any values then so it feeds 0 to the graph. Any ide of how i can solve this?
/Nisse
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Strange output
My guess would be that the check did not return correct data when those values are 0 or nans. You might want to account for this in your script and set to 0 or try to check again if 0 or nan is returned. That is if you know it should always be a number larger than 0. As for those gaps, rrdtool and npcd just have the data returned from checks to work with, so if it is invalid or 0, it just accepts that.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.