Dear Forum!
I have installed a Nagios Core on Ubuntu 16.04 .
I would like monitoring my printers (Xerox).
I follow this site steps: https://ittutorials.net/open-source/nag ... th-nagios/ , but when I check nagios site then i get this:
http://www.kepfeltoltes.eu/view.php?fil ... 9error.jpg
after i type this lines in printer.cfg:
define service{
use generic-service
hostgroup_name printers
service_description Check Model
check_command check_snmp_printer!public!"MODEL"
}
define service{
use generic-service
hostgroup_name printers
service_description Check Toner
check_command check_snmp_printer!public!"CONSUM ALL"!5!2
}
....but again i get a problem:
http://www.kepfeltoltes.eu/view.php?fil ... error2.jpg
If I type example this lines on the ubuntu then i get perfect answer.
./check_snmp_printer -H 10.0.0.5 -C public -t MODEL
./check_snmp_printer -h 10.0.0.5 -t
./check_snmp_printer -H 10.0.0.5 -C public -t "CONSUM ALL" -w 25 -c 10
./check_snmp_printer -H 10.0.0.5 -C public -t "CONSUM ALL" -w 25 -c 10./check_snmp_printer -H 10.0.0.5 -C public -t PAGECOUNT
snmpwalk -v 2c -c public 10.0.0.5
Please help me for this problem solved and please tell me step by step how to can I install the check_snmp_printer.
Thanks!
check_snmp_printer problem
Re: check_snmp_printer problem
Can you post how you defined the check_snmp_printer command so we can check the Arguments to see if they line up with the service check?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_snmp_printer problem
Hello!
(/usr/local/nagios/etc/objects/commands.cfg)
I wrote in the commands.cfg :
define command {
command_name check_snmp_printer
command_line /usr/local/nagios/libexec/check_snmp_printer -H $HOSTADDRESS$ -C $ARG1$ -x $ARG2$ -w $ARG3$ -c $ARG4$
}
After i allowed the printer.cfg in /usr/local/nagios/etc/nagios.cfg . (uncomment this line: cfg_file=/usr/local/nagios/etc/objects/printer.cfg)
Finally i give wrote this lines in /usr/local/nagios/etc/objects/printer.cfg :
define host {
use generic-printer ; Inherit default values from a template
host_name xerox ; The name we're giving to this printer
alias xerox ; A longer name associated with the printer
address 192.168.1.30 ; IP address of the printer
hostgroups network-printers ; Host groups this printer is associated with
}
define hostgroup {
hostgroup_name network-printers ; The name of the hostgroup
alias Network Printers ; Long name of the group
}
define service{
use generic-service
host_name xerox
service_description Check Model
check_command check_snmp_printer!public!"MODEL"
}
define service{
use generic-service
host_name xerox
service_description Check Toner
check_command check_snmp_printer!public!"CONSUM ALL"!5!2
}
define service{
use generic-service
host_name xerox
service_description check-toners
check_command check_snmp_printer!public!”CONSUM Toners”!20!10
}
(/usr/local/nagios/etc/objects/commands.cfg)
I wrote in the commands.cfg :
define command {
command_name check_snmp_printer
command_line /usr/local/nagios/libexec/check_snmp_printer -H $HOSTADDRESS$ -C $ARG1$ -x $ARG2$ -w $ARG3$ -c $ARG4$
}
After i allowed the printer.cfg in /usr/local/nagios/etc/nagios.cfg . (uncomment this line: cfg_file=/usr/local/nagios/etc/objects/printer.cfg)
Finally i give wrote this lines in /usr/local/nagios/etc/objects/printer.cfg :
define host {
use generic-printer ; Inherit default values from a template
host_name xerox ; The name we're giving to this printer
alias xerox ; A longer name associated with the printer
address 192.168.1.30 ; IP address of the printer
hostgroups network-printers ; Host groups this printer is associated with
}
define hostgroup {
hostgroup_name network-printers ; The name of the hostgroup
alias Network Printers ; Long name of the group
}
define service{
use generic-service
host_name xerox
service_description Check Model
check_command check_snmp_printer!public!"MODEL"
}
define service{
use generic-service
host_name xerox
service_description Check Toner
check_command check_snmp_printer!public!"CONSUM ALL"!5!2
}
define service{
use generic-service
host_name xerox
service_description check-toners
check_command check_snmp_printer!public!”CONSUM Toners”!20!10
}
Re: check_snmp_printer problem
The settings look good to me. I created a check on my Nagios server and it all worked as expected.
In your examples, you use 2 different IP addresses, do both of the printer support polling of that data using SNMP?
In your examples, you use 2 different IP addresses, do both of the printer support polling of that data using SNMP?
Be sure to check out our Knowledgebase for helpful articles and solutions!