Escolar Documentos
Profissional Documentos
Cultura Documentos
Out of Paper
Printer Oine
Intervention Required
1 de 4 29/10/17 18:19
Monitoring Network Printers Nagios Core Doc... https://assets.nagios.com/downloads/nagioscore/...
per-user customization
Integrated
Performance Graphs
provide trending and
capacity planning
information
monitor their status using the check_hpjd plugin. Advanced Reports
The check_hpjd plugin will only get compiled and installed if you have the provide data insight and
net-snmp and net-snmp-utils packages installed on your system. Make sure exporting capabilities
the plugin exists in /usr/local/nagios/libexec before you continue. If it doesn't, Data Visualizations
install net-snmp and net-snmp-utils and recompile/reinstall the Nagios enable powerful analysis
plugins. of patterns and problems
Prerequisites
The rst time you congure Nagios Core to monitor a network printer, you'll
need to do a bit of extra work. Remember, you only need to do this for the
*rst* printer you monitor.
vi /usr/local/nagios/etc/nagios.cfg
Remove the leading pound (#) sign from the following line in the main
conguration le:
2 de 4 29/10/17 18:19
Monitoring Network Printers Nagios Core Doc... https://assets.nagios.com/downloads/nagioscore/...
#cfg_file=/usr/local/nagios/etc/objects/printer.cfg
What did you just do? You told Nagios to look to the /usr/local/nagios
/etc/objects/printer.cfg to nd additional object denitions. That's where you'll
be adding host and service denitions for the printer. That conguration le
already contains some sample host, hostgroup, and service denitions. For
the *rst* printer you monitor, you can simply modify the sample host and
service denitions in that le, rather than creating new ones.
vi /usr/local/nagios/etc/objects/printer.cfg
define host {
use generic-printer ; Inherit default values from a templat
host_name hplj2605dn ; The name we're giving to this printer
alias HP LaserJet 2605dn ; A longer name associated with the pri
address 192.168.1.30 ; IP address of the printer
hostgroups allhosts ; Host groups this printer is associate
}
Now you can add some service denitions (to the same conguration le) to
monitor dierent aspects of the printer. If this is the *rst* printer you're
monitoring, you can simply modify the sample service denition in
printer.cfg.
Add the following service denition to check the status of the printer. The
service uses the check_hpjd plugin to check the status of the printer every 10
minutes by default. The SNMP community string used to query the printer is
"public" in this example.
3 de 4 29/10/17 18:19
Monitoring Network Printers Nagios Core Doc... https://assets.nagios.com/downloads/nagioscore/...
define service {
use generic-service ; Inherit values from a
host_name hplj2605dn ; The name of the host
service_description Printer Status ; The service descripti
check_command check_hpjd!-C public ; The command used to m
normal_check_interval 10 ; Check the service eve
retry_check_interval 1 ; Re-check the service
}
Add the following service denition to ping the printer every 10 minutes by
default. This is useful for monitoring RTA, packet loss, and general network
connectivity.
define service {
use generic-service
host_name hplj2605dn
service_description PING
check_command check_ping!3000.0,80%!5000.0,100%
normal_check_interval 10
retry_check_interval 1
}
4 de 4 29/10/17 18:19