Skip to content

Template and scripts to monitor CUPS servers, printers and queues via Zabbix Agent

Notifications You must be signed in to change notification settings

a-schild/zabbix-cups

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zabbix-cups

Zabbix template for monitoring CUPS servers, printers and queues via Zabbix Agent

Written by [email protected]

At the moment we only monitor printers and their queues, but not the classes.

The configuration files and scripts have to be placed in the correct directories as shown in the repository.

The locations are for Debian Wheezy with Zabbix 2.4.x installed.

  • Template_App_CUPS.xml -> Import this template on your Zabbix server and assign it to your monitored CUPS servers

  • /etc/zabbix/zabbix_agentd.d/cups.conf -> Place in the file on your CUPS serverno modification needed, unless you place the external script in another location.

  • /usr/local/lib/zabbix/externalscripts/discover_cups_printers.pl -> The script doing the actual cups printer discovery. If you place this script in another location, you will have to change sudoers.d and the zabbix files accordingly

SELinux

If you are running with selinux enabled, the discovery script should be placed in a directory that is configured to have zabbix_script_exec_t. You can check with the semanage command:

$ semanage fcontext -l | grep zabbix_script_exec_t
/var/lib/zabbixsrv/.*scripts(/.*)?                 all files          system_u:object_r:zabbix_script_exec_t:s0
$

Use restorecon after copying the script, e.g.

$ cp usr/local/lib/zabbix/externalscripts/discover_cups_printers.pl /var/lib/zabbixsrv/externalscripts/.
$ ls -lZ /var/lib/zabbixsrv/externalscripts/discover_cups_printers.pl
$ restorecon /var/lib/zabbixsrv/externalscripts/discover_cups_printers.pl
$ ls -lZ /var/lib/zabbixsrv/externalscripts/discover_cups_printers.pl

More information in the zabbix_script_selinux man page.

Same for the config file:

$ cp etc/zabbix/zabbix_agentd.d/cups.conf /etc/zabbix_agentd.conf.d/.
$ ls -lZ /etc/zabbix_agentd.conf.d/
$ restorecon /etc/zabbix_agentd.conf.d/cups.conf
$ ls -lZ /etc/zabbix_agentd.conf.d/

About

Template and scripts to monitor CUPS servers, printers and queues via Zabbix Agent

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages