Version information
This version is compatible with:
- Puppet 3.x
- , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'wdijkerman-zabbix', '0.3.0'
Learn more about managing modules with a PuppetfileDocumentation
#puppet-zabbix
####Table of Contents
- Installing the zabbix-server
- Installing the zabbix-agent
- Installing the zabbix-proxy
- Installing the Java Gateway
- zabbix::userparameters, Installing the userparameter files
##Description
This module contains the classes for installing and configuring the following zabbix components:
- zabbix-server
- zabbix-agent
- zabbix-proxy
- zabbix-javagateway
##How to use ###zabbix-server This will install an basic zabbix-server instance.
You will need to supply one parameter: zabbix_url. This is the url on which the zabbix instance will be available. In the example below, the zabbix webinterface will be: http://zabbix.example.com.
class { 'zabbix::server':
zabbix_url => 'zabbix.example.com',
}
When installed succesfully, zabbix web interface will be accessable and you can login with the default credentials:
Username: Admin
Password: zabbix
manage_database
When the parameter 'manage_database' is set to true (Which is default), it will create the database and loads the sql files. Default the postgresql will be used as backend, mentioned in the params.pp file. You'll have to include the postgresql (or mysql) module yourself, as this module will require it.
###zabbix-agent This will install the zabbix-agent. It will need at least 1 parameter to function, the name or ipaddress of the zabbix-server (or zabbix-proxy if this is used.). Default is 127.0.0.1, which only works for the zabbix agent when installed on the same host as zabbix-server (or zabbix-proxy).
class { 'zabbix::agent':
server => '192.168.1.1',
}
###zabbix-proxy This will install an zabbix-proxy instance. It will need at least 1 parameter to function, the name or ipaddress of the zabbix-server. Default is 127.0.0.1, which wouldn't work. Be aware, the zabbix::proxy can't be installed on the same server as zabbix::server.
class { 'zabbix::proxy':
zabbix_server_host => '192.168.1.1',
zabbix_server_port => '10051',
}
manage_database
When the parameter 'manage_database' is set to true (Which is default), it will create the database and loads the sql files. Default the postgresql will be used as backend, mentioned in the params.pp file. You'll have to include the postgresql (or mysql) module yourself, as this module will require it.
###zabbix-javagateway This will install the zabbix java gataway for checking jmx items. It can run without parameters.
class { 'zabbix::javagateway': }
When using zabbix::javagateway, you'll need to add the 'javagateway' parameter and assign the correct ip address for the zabbix::server or zabbix::proxy instance.
Usage example for an zabbix::server:
class { 'zabbix::server':
zabbix_url => 'zabbix.example.com',
javagateway => '192.168.1.2',
}
Or with an zabbix::proxy:
class { 'zabbix::proxy':
zabbix_server_host => '192.168.1.1',
javagateway => '192.168.1.2',
}
###userparameters You can use userparameter files (or specific entries) to install it into the agent.
Using an 'source' file:
zabbix::userparameters { 'mysql.conf':
source => 'puppet:///modules/zabbix/mysqld.conf',
}
Or for example when you have just one entry:
zabbix::userparameters { 'mysql.conf':
content => 'UserParameter=mysql.ping,mysqladmin -uroot ping | grep -c alive',
}
##Support The module is only supported on:
Zabbix 2.2:
- CentOS 5.x, 6.x
- RedHat 5.x, 6.x
- OracleLinux 5.x, 6.x
- Ubuntu 12.04
- Debian 7
Zabbix 2.0:
- CentOS 5.x, 6.x
- RedHat 5.x, 6.x
- OracleLinux 5.x, 6.x
- Ubuntu 12.04
- Debian 6, 7
Zabbix 1.8 isn't supported (yet) with this module. Maybe in the near future.
Ubuntu 10.4 is officially supported by zabbix for Zabbix 2.0. I did have some issues with making it work, probably in a future release it is supported with this module as well.
##Rspec
Added with 0.2.0 rspec tests for the following:
- agent_spec.rb
- repo_spec.rb
- server_spec.rb
- proxy_spec.rb
- database_spec.rb
- javagateway_spec.rb
- userparameters_spec.rb
Probaly a litte bit to much tests:
Finished in 8 minutes 28 seconds
515 examples, 0 failures
##Todo The following is an overview of todo actions:
- Better documentation.
- Use of the zabbix-api:
- automatically creating hosts in the webinterface
- automatically assing templates to hosts
Please send me suggestions!
##Contributors The following have contributed to this puppet module:
- Suff
- gattebury
- sq4ind
Many thanks for this!
##Note
- Not specified as required but for working correctly, the epel repository should be available for the 'fping'|'fping6' packages.
- Make sure you have sudo installed and configured with: !requiretty.
- Make sure that selinux is permissive or disabled.
#wdijkerman-zabbix release
Below an overview of all changes in the releases.
Version (Release date)
0.3.0 (2014-07-??)
- Added repository for scientific (Thanks to: gattebury)
- Added repository for Xenserver (Thanks to: sq4ind)
0.2.0 (2014-06-18)
- Added rspec test for zabbix::agent
- Added rspec test for zabbix::repo
- Added rspec test for zabbix::proxy
- Added rspec test for zabbix::server
- Added rspec test for zabbix::database{mysql,postgresql}
- Added rspec test for zabbix::userparameters
- Added rspec test for zabbix::javagateway
- zabbix::userparameters fixed via pull request github (By 'suff') --> Thanks!
- Removed some documented settings
- nodeid wasn't working with zabbix_server.conf template
0.1.0 (2014-04-17)
- Added manage_repo parameter. If set to true, it will install the apt/yum repository.
- Updated module for support Ubuntu (12.x).
- Updated module for support Debian (6, 7).
- Updated module for support Oracle Linux (5, 6).
0.0.3 (2014-03-31)
- Added parameter: manage_vhost for creating vhost (Default: true)
- Added parameter: manage_firewall for creating firewall rules
- Added zabbix::javagateway class for installing the Zabbix Java Gateway
- Renaming parameters javagateway_host to javagateway and javagateway_port to javagatewayport for zabbix::proxy (Same naming as the zabbix::server).
0.0.2 (2014-03-28)
- MySQL can be used as database back-end.
- Services started at boot.
- Vhost creation, need 1 parameter for zabbix-server: zabbix_url.
- Updated the readme.md
0.0.1 (2014-03-18)
- Initial working version. Installing of the
- zabbix-server
- zabbix-agent
- zabbix-proxy
- Possibility to add userparameters for the zabbix-agent.
Dependencies
- puppetlabs/postgresql (>= 3.0.0)
- puppetlabs/stdlib (>= 4.0.0)
- puppetlabs/mysql (>= 2.0.0)
- puppetlabs/apache (>= 1.0.0)
- puppetlabs/firewall (>= 1.0.0)