*nix Thread, nagios and snmp in Technical; Hello,
I've finally got around to installing nagios yesterday and all seems to be fine. I would like to monitor ...
12th March 2008, 10:06 AM #1
- Rep Power
nagios and snmp
I've finally got around to installing nagios yesterday and all seems to be fine. I would like to monitor my printers (a xerox 8550DP and a brother mfc 8860), but I'm having trouble getting the check_snmp to work. I was wondering if anyone else has had any experience using nagios to monitor said printers.
IDG Tech News
12th March 2008, 10:08 AM #2
You need to look at the mibs for those printers to see if you can find out what to monitor then add that to a check.
12th March 2008, 11:00 AM #3
You can run snmpwalk over them too to get the locations of the required info
12th March 2008, 11:04 AM #4
Yes you can but you may not understand which snmp values to plug in to your check.
12th March 2008, 11:41 AM #5
Ideally, you need to get the MIB file(s) for the printer from the manufacturer. That way you can work out what snmp node you need to query.
12th March 2008, 11:55 AM #6
I wrote this to check my Phaser 8400s but I have found it seems to work on most printers as the OIDs must be standard. I have used it on the HP printers the dont like the HPJD plugin.
I think this is my final version but I am not in a position to check at the mo.
# Author : Chris Hindmarch
# Date : 17/10/2006
# Uses SNMP to check a Phaser 8400 status
# and determines the status of the printer.
if ( !defined $ARGV || !defined $ARGV)
print "Arg 1 = $ARGV Arg 2 = $ARGV";
#print "One or more arguments are missing";
# Set the default status to 3.
$mystatus = 3;
# Set the community string and host from the arguments
# used to call the script
# Get the results of the OID and put it into a variable
#$result = `snmpwalk -v1 -c $COMMUNITY $IP 220.127.116.11.4.1.9600.1.1.1.18.104.22.168.22.214.171.124.108`;
# Check the first static OID to see if there is a message
$result = `snmpwalk -v1 -c $COMMUNITY $IP mib-126.96.36.199.188.8.131.52`;
# Use a regex to make sure the data has been returned
if ($result =~ m/(= STRING: ")(.*)(")$/)
$mystatus = 0;
print "PRINTER OK - ($2)\n";
$result = $2;
if ($result =~ m/Ink low/)
$mystatus = 1;
else # Go get the error message
# Get the message from the OID range that contains other messages
# if the above OID does not return a valid result.
$result = `snmpwalk -v1 -c $COMMUNITY $IP mib-184.108.40.206.1.8.1`;
if ($result =~ m/(Job)(.*)(")$/)
print "PRINTER WARNING - ($1$2)\n";
$mystatus = 1;
$result =~ m/(= STRING: ")(.*)(")$/;
print "CRITICAL - ($2)\n";
$mystatus = 2;
12th March 2008, 12:49 PM #7
I have just had the same problem with the snmp plugin.
Originally Posted by uk101man
you need to make sure that you have net-snmp installed on your system.
yum install net-snmp
yum install net-snmp-utils
yum install net-snmp-devel
with them installed reinstall you plugins and it should compile the check_snmp plugin
12th March 2008, 01:01 PM #8
He wasn't neccessarily saying that check_snmp wasn't working but that he wanted to use it to check his snmp printers.
12th March 2008, 09:08 PM #9
- Rep Power
Thanks for the replies. Chris I'll give your script a go once I've finished kicking in GDI for a couple of hours ;-)
chekc_snmp does work and i knew that i would need an mib and believe i found the mib i would like to monitor but when i tried it did not work.
Like i said i'll give Chris's script a go...oh there is a standard call checkprinter mib or something like that.
"In the name of Kane"
18th April 2008, 02:58 AM #10
- Rep Power
This script looks helpful, could someone please tell me the simple steps to make this work with nagios? I've attempted to make it an exec and put it in the commands.cfg file without success. thanks, and sorry for my ignorance.
By rush_tech in forum *nix
Last Post: 13th July 2010, 05:27 PM
Last Post: 10th November 2009, 06:23 AM
By complete_phreak in forum Hardware
Last Post: 11th April 2008, 11:12 AM
By plexer in forum How do you do....it?
Last Post: 17th July 2007, 08:43 PM
By browolf in forum Windows
Last Post: 11th May 2006, 10:26 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)