Page 2 of 2
Re: Printer Page Count History
Posted: Thu Nov 19, 2015 5:24 pm
by lmiltchev
Is "snmp-check" a 3rd party plugin? I don't see any perfdata in the output. What is the output of the following command?
Code: Select all
/usr/local/nagios/libexec/check_snmp -p 161 -o mib-2.43.10.2.1.4.1.1 -C public -P 2c -m SNMPv2-SMI
Re: Printer Page Count History
Posted: Fri Nov 20, 2015 9:44 am
by tmm72
I missed typed that it is the check_snmp command
Re: Printer Page Count History
Posted: Fri Nov 20, 2015 10:13 am
by rkennedy
What's the output of the command @lmiltchev posted?
Re: Printer Page Count History
Posted: Fri Nov 20, 2015 11:09 am
by tmm72
It returns "SNMP OK - 280427"
Re: Printer Page Count History
Posted: Fri Nov 20, 2015 11:15 am
by jrdalrymple
tmm72 wrote:So one question is that when it is checking the drives on the system it keeps a record of the usage etc.
In the context of drive checks, "usage" generally refers to the amount of disk space consumed. This number can go up and down but generally remains static. Your scalar constantly increments, the data you're seeking is not ### pages, it's ### pages/day. As I mentioned in my earlier comment, Nagios does not perform that calculation. Likewise you won't find in the built in plugins that when you're checking drive space that there is a "/day" calculation involved, it's simply ### bytes.
This: Your disk has 500MB of data and 500MB of free space
Not This: Your disk has 500MB/day of data and 500MB/day of free space
Do you understand? This is not a problem of getting the data, it's a problem of calculating the returned scalar against some change over a period of time. This has to be done using a custom plugin since state is required. There are exceptions such as monitoring interface traffic, but these included plugins do have state.
Re: Printer Page Count History
Posted: Fri Nov 20, 2015 1:00 pm
by lmiltchev
I thought you were using a 3rd party plugin that didn't return perfdata as when I tested this command (with check_snmp) against one of our printers, I did get a perfdata in the output (see the text in red, to the right of the pipe):
./check_snmp -H 192.168.x.x -p 161 -o 1.3.6.1.2.1.43.10.2.1.4.1.1 -C public 2c -m SNMPv2-SMI
SNMP OK - 26194 | SNMPv2-SMI::mib-2.43.10.2.1.4.1.1=26194c