Forge Home

zabbix

Installing and maintaining zabbix instances

1,231,378 downloads

49,740 latest version

2.8 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 999.999.999 (latest)
  • 2.2.1
  • 2.2.0
  • 2.1.1
  • 2.1.0
  • 2.0.0
  • 1.7.0
  • 1.6.0
  • 1.5.0
  • 1.4.0
  • 1.3.0
  • 1.2.0
  • 1.1.0
  • 1.0.1
  • 1.0.0
  • 0.6.1
  • 0.6.0
  • 0.5.1
  • 0.5.0
  • 0.4.1
  • 0.4.0
  • 0.3.1
  • 0.3.0
  • 0.2.0
  • 0.1.0
  • 0.0.3
  • 0.0.2
  • 0.0.1 (deleted)
released Jun 18th 2014
This version is compatible with:
  • Puppet 3.x
  • , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'wdijkerman-zabbix', '0.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add wdijkerman-zabbix
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install wdijkerman-zabbix --version 0.2.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

wdijkerman/zabbix — version 0.2.0 Jun 18th 2014

#puppet-zabbix

####Table of Contents

  1. Description
  2. How to use
  1. OS Support
  2. Rspec
  3. Todo
  4. Note

##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!

##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.