Page 1 of 1

Strange output

Posted: Mon Nov 04, 2013 4:24 am
by nisse123
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?

Re: Strange output

Posted: Mon Nov 04, 2013 10:31 am
by slansing
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

Posted: Mon Nov 04, 2013 11:08 am
by nisse123
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.

Re: Strange output

Posted: Mon Nov 04, 2013 11:53 am
by sreinhardt
I believe the c is for count, but I could be entirely wrong. You could try adding "-u Count" to it, or something similar.

Re: Strange output

Posted: Tue Nov 05, 2013 2:37 am
by nisse123
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

Re: Strange output

Posted: Tue Nov 05, 2013 10:25 am
by sreinhardt
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.