Build Status Puppet Forge GitHub tag

Zabbix Agent Puppet Module

Table of Contents

  1. Overview
  2. Setup requirements
  3. Parameters
  4. Usage
  5. Contributing
  6. Contributors
  7. License

Overview

This module manages the zabbix agent for a monitored machine. It can also, optionally, manage repositories related to Zabbix on Linux. On the Red Hat family of OS's, this includes both EPEL and Zabbix. On the Debian family, this is just the Zabbix repo. On Windows this module utilizes the Chocolatey provider.

Setup Requirements

This module has been tested against Puppet 3.7.3 on:

  • CentOS 6.6
  • Ubuntu Server 14.04
  • Windows 7
  • Windows Server 2012 R2

Parameters:

Depreciated options

These options were removed in v2.1.0. If they exist in your manifests or hiera data they will cause a compilation failure.

$include_dir
$include_file
$logfile
$servers
$servers_active

preinstall.pp settings

manage_repo_epel

Determines if the EPEL repo is managed on the RedHat family of OS's.
Default: false
Type: boolean

manage_repo_zabbix

Determines if the Zabbix repo is managed on the RedHat family of OS's.
Default: false
Type: boolean

install.pp settings

ensure_setting

Passed directly to ensure of package resource
Default: 'present'

custom_require_linux

Passed directly to require of package resource when on Linux
Default: undef

custom_require_windows

Passed directly to require of package resource when on Windows
Default: undef

config.pp settings

allow_root

0 - do not allow, 1 - allow
Type: integer

buffer_send

Range: 1-3600
Type: integer

buffer_size

Range: 2-65535
Type: integer

debug_level

Range: 0-4
Type: integer

enable_remote_commands

0 - not allowed, 1 - allowed
Type: integer

host_metadata

Range: 0-255 characters
Type: string

host_metadata_item

Parameter that defines an item used for getting host metadata used during host auto-registration process. To disable, set to ''.
Default: 'system.uname'

hostname

The hostname used in the config file.
Default: downcase($::fqdn)

hostname_item

An item to be used for determining a host's name

include_files

Equates to include in zabbix_agentd.conf. Renamed due to include being special in Puppet. An array with one or more files to be included in the config. On non-Windows systems, this can be a folder or a path with a wildcard. See zabbix_agentd.conf for details.
Type: array

item_alias

Equates to alias in zabbix_agentd.conf. Renamed due to alias being the name of a Puppet metaparameter. Sets an alias for an item key.
Type: array

listen_ip

List of comma delimited IP addresses that the agent should listen on.
Type: string

listen_port

Range: 1024-32767
Default: 10050
Type: integer

load_module

Type: string

load_module_path

Type: string

log_file_size

Range: 0-1024
Type: integer

log_file

The full path to where Zabbix should store it's logs.
Default: 'C:\zabbix_agentd.log' OR '/var/log/zabbix/zabbix_agentd.log'
Type: string

log_remote_commands

0 - disabled, 1 - enabled
Type: integer

max_lines_per_second

Range: 1-1000
Type: integer

perf_counter

Each item should be formated as follows:
<parameter_name>,"<perf_counter_path>",<period>
Type: array

pid_file

Name of PID file.
Type: string

refresh_active_checks

Range: 60-3600
Type: integer

server

Default: '127.0.0.1'
Type: String separated by commas OR Array

server_active

Default: '127.0.0.1'
Type: String separated by commas OR Array

source_ip

Source IP address for outgoing connections.
Type: string, formatted as an IP address

start_agents

Range: 0-100
Type: integer

timeout

Range: 1-30
Type: integer

unsafe_user_parameters

0 - do not allow, 1 - allow

user_parameter

User-defined parameter to monitor.
Type: array

user

Drop privileges to a specific, existing user on the system.
Type: string

Usage

class { 'zabbixagent':
  ensure_setting => 'latest',
  include_files  => ['/etc/zabbix_agentd.conf.d/userparams.conf',],
  log_file_size  => 0,
  server         => 'zabbix.example.com,offsite.example.com',
  server_active  => ['zabbix.example.com', 'offiste.example.com',],
}

All parameters available in zabbix_agentd.conf should be listed above. Please submit a bug report if you find this not to be the case and it will be added.

Contributing

Pull requests, bug reports, and enhancement requests are welcome! Enhancement requests should be filed just like other issues.

Contributors

  • Scott Smerchek (@smerchek) - Author of softek-zabbixagent
  • Martijn Storck (@martijn) - Added CentOS support

License

This is released under the New BSD / BSD 3 Clause license. A copy of the license can be found in the root of the module.

History

This was originally softek-zabbixagent before undergoing a total rewrite in January 2015. Post rewrite, only a couple of comments and part of one line of the original code was left. Since no 'substantial portions' of the code was reused and no written licence was contained in the repository I have chosen not to reuse the MIT license that was referenced in the original metadata.json file.

This module has been released independant of the original after reviewing the original author's GitHub issue tracker. Specifically, it appeared that they had not been responding to issues or pull requests for at least six months and some had sat for nearly two years. This response timeframe and my needs didn't line up so here we are.