#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
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',
}
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!
##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.