The zabbix::puppet module relies on puppetlabs-mysql, see https://github.com/puppetlabs/puppetlabs-mysql
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
- Node must have $zabbix_server defined
$zabbix_server = "zabbixserver.domain"
- Add agent class to node
include zabbix::agent
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
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
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
- Node must have $zabbix_server and $zabbix_proxy_db_pass defined
$zabbix_server = "zabbixserver.domain"
$zabbix_proxy_db_pass = "password"
- Add agent class to node
include zabbix::proxy