This document discusses using Puppet to automate the configuration and management of Zabbix monitoring systems. It provides examples of Puppet code that can be used to install, configure, and manage Zabbix servers, proxies, agents, templates, and other components. It also discusses using Puppet to define Zabbix resources, templates, and user parameters as well as integrating Puppet and Zabbix through the Zabbix API and PuppetDB.
2. $ whoami
Werner Dijkerman
Work
Current: System Engineer @ iWelcome
Previous: Promedico, Bol.com
Private
34 years old, Married (Francina), 2 cats (Janice &
Vlokje)
TV shows, movies, Music & Monitoring
www.werner-dijkerman.nl
@djwasabiman
4. Puppet
Configuration management utility
The user describes system resources and their state,
either using Puppet's declarative language or a Ruby DSL
(domain-specific language).
• Automatically installs /configures systems / applications
• Keep all systems in sync
12. zabbix::javagateway
node server05.example.com {
class { 'zabbix::javagateway': }
}
For the zabbix::server (or zabbix::proxy)
node server01.example.com {
class { 'zabbix::server':
zabbix_url => 'zabbix.example.com',
javagateway => '192.168.20.15',
}
}
13. zabbix::agent
class { 'zabbix::agent':
server => '192.168.20.11',
timeout => 10,
include_dir => '/etc/zabbix/zabbix_agent.d',
}
'server' parameter is ip/fqdn for the zabbix-server, or
zabbix-proxy
14. zabbix::userparameters
UserParameter=mysql.status[*],echo "show global status where
Variable_name='$1';" | HOME=/var/lib/zabbix mysql -N | awk
'{print $$2}’
UserParameter=mysql.ping,HOME=/var/lib/zabbix mysqladmin ping
| grep -c alive
UserParameter=mysql.version,mysql –V
zabbix::userparameters { 'mysql':
source => 'puppet:///modules/mysql/zabbix_mysqld.conf',
template => 'Template App MySQL',
}