Code Monkey home page Code Monkey logo

puppet-zabbix's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.