Skip to content

Tombar/puppet-zabbix

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zabbix Puppet module

Requirements

The zabbix::puppet module relies on puppetlabs-mysql, see https://github.com/puppetlabs/puppetlabs-mysql

Installation

Place this in your Puppet installation's module directory

Rename files/my.cnf.example to files/my.cnf Update the password line in files/my.cnf to reflect your zabbix user's mysql password

Usage - Zabbix Agent

  1. Node must have $zabbix_server defined
$zabbix_server 			= "zabbixserver.domain"
  1. Add agent class to node
include zabbix::agent

Puppet specific remote command

To allow Zabbix to restart the puppet daemon, should it stop, do the following

include zabbix::remotecmds

See manifests/classes/remotecmds.pp for more information

Adding user paremeter checks

Additional user parameters can be added by use of a definition. Below is an example of how to add a user parameter file to a node

	zabbix::userparameter {
		'userparameter_mounted':
			ensure	=> present,
			source	=> 'puppet:///modules/zabbix/userparameter_mounted.conf';
	}			

I've included an example userparameter file '''files/userparameter_mounted.conf''' as an example

Added mysql checks to node

The mysql class inherits agent.

The checks in templates/userparameter_mysql_conf.erb are examples that are packaged with Zabbix

Additional checks can be added in the node definition. This example adds a check for mediawiki user count

    $zabbix_mysql_user_parameters =  {
        item1 => { 'name' => 'mediawiki.usercount[*]', 'command' => 'mysql -B -s -e "SELECT count(*) FROM user" $1'},
    }   

include zabbix::mysql

Usage - Zabbix Proxy

  1. Node must have $zabbix_server and $zabbix_proxy_db_pass defined
$zabbix_server 			= "zabbixserver.domain"
$zabbix_proxy_db_pass 	= "password"
  1. Add agent class to node
include zabbix::proxy

Releases

No releases published

Packages

No packages published

Languages

  • Puppet 100.0%