zabbixagent
Version information
This version is compatible with:
- Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 3.0.0 < 5.0.0
- , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'genebean-zabbixagent', '3.0.0'
Learn more about managing modules with a PuppetfileDocumentation
Zabbix Agent Puppet Module
Table of Contents
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 SUSE this is the "Server Monitoring Software" repo. On Windows this module utilizes the Chocolatey provider.
Setup Requirements
This module has been tested against Puppet 4.x on:
- CentOS 6 & 7
- Debian 7 & 8
- OpenSUSE Leap 42.1 & 42.2
- Red Hat 5, 6, 7
- SUSE Linux Enterprise Server 12
- Ubuntu Server 14.04 16.04
- Windows 7
- Windows Server 2012 R2
Testing via Travis-CI is also done against Puppet 3.x with, and without, future parser.
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
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
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
ensure_setting
Passed directly to ensure of package resource
Default: 'present'
Config
allow_root
0 - do not allow, 1 - allow
Type: integer
buffer_send
Range: 1-3600
Type: integer
buffer_size
Range: 2-65535
Type: integer
config_dir
Defines the directory in which config files live
Default on Linux: '/etc/zabbix'
Default on Windows: 'C:/ProgramData/zabbix'
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 on Windows: 'C:\zabbix_agentd.log'
Default on Linux: '/var/log/zabbix/zabbix_agentd.log'
Type: string
log_type
Log output type.
Type: string
log_remote_commands
0 - disabled, 1 - enabled
Type: integer
max_lines_per_second
Range: 1-1000
Type: integer
package_name
Name of the Zabbix Agent package.
The default values for this can be found in params.pp as it is OS dependent.
Type: string
perf_counter
Each item should be formmated as follows:
<parameter_name>,"<perf_counter_path>",
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
tls_accept
What incoming connections to accept.
Type: String separated by commas OR Array
tls_ca_file
Full pathname of a file containing the top-level CA(s) certificates for peer
certificate verification.
Type: String
tls_cert_file
Full pathname of a file containing the agent certificate or certificate chain.
Type: String
tls_connect
How the agent should connect to server or proxy.
Type: String
tls_crl_file
Full pathname of a file containing revoked certificates.
Type: String
tls_key_file
Full pathname of a file containing the agent private key.
Type: String
tls_psk_file
Full pathname of a file containing the agent pre-shared key.
Type: String
tls_psk_identity
Pre-shared key identity string.
Type: String
tls_server_cert_issuer
Allowed server (proxy) certificate issuer.
Type: String
tls_server_cert_subject
Allowed server (proxy) certificate subject.
Type: String
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
version
Determines what version of the Zabbix Agent to install.
Default: '3.2'
Allowed values: '3.2', '3.0', or '2.4'
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
- Simonas Rupsys (@simonasr) - Changed case syntax to work on Puppet 4.x
- Jake Spain (@thespain) - Added support for SUSE Enterprise and OpenSUSE Leap
- Jake Spain (@thespain) - Added support for newer releases of distros & Zabbix
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.
2017-03-01 Release 3.0.0
- This change was brought to you by Jake Spain
- Introduced selectable versions of the Zabbix agent: now you can pick between 2.4, 3.0, & 3.2 and the module will adjust accordingly.
- Changed SUSE repository to facilitate enabling newer versions of Zabbix
- Added a parameter for the name of the package to be installed
- Corrected and expanded compatibility with Debian and Ubuntu
- Updated the gems used for testing in Travis CI
- Updated the Vagrantfile to be more current.
2016-09-20 Release 2.6.0
- Added support for OpenSUSE Leap (thanks to Jake Spain)
2016-08-15 Release 2.5.0
- Added support for SUSE Enterprise (thanks to Jake Spain)
2015-07-14 Release 2.4.1
- Fixed copy/paste fail in .travis.yml
2015-07-14 Release 2.4.0
- Updates to support Puppet 4
2015-05-28 Release 2.3.0
- Updated default configuration directory on Windows to be 'C:/ProgramData/zabbix' as that is the default in the current Chocolatey package.
- Switched to the new official Chocolatey module
2015-03-02 Release 2.2.0
- Added the ability to define a require on the package resource
2015-02-27 Release 2.1.1
- Updated Gemfile to use rspec-puppet v2.0 instead of git master
- Added default value for PidFile due to Zabbix's default being /run
2015-02-12 Release 2.1.0
- Transitioned to a fully templated zabbix_agentd.conf
- Added code to fail compilation if depreciated variables exists
- Added more tests
2015-01-25 Release 2.0.7
- Fixed validation
- Added new tests for Servers and ServersActive settings
2015-01-25 Release 2.0.6
- Updated Vagrantfile
- Fixed rspec settings so that details are shown
2015-01-25 Release 2.0.5
- Added puppet_blacksmith for packaging
2015-01-25 Release 2.0.4
- Cleaned up formatting
2015-01-25 Release 2.0.3
- Moved exec's in preinstall.pp inside osfamily case statement
2015-01-19 Release 2.0.2
- Reformatted this file
2015-01-19 Release 2.0.1
- Fixed some spelling and a link in the README.md file
2015-01-17 Fork - Release 2.0.0
Total Rework by genebean:
- Converted to use the install -> config -> service pattern
- Moved all parameters to
params.pp
- Removed dependency on epel module
- Added Zabbix repo
- Added option to disable repo management per repo
- Changed Windows setup to utilize the official Zabbix package via Chocolatey
- Added .project file for Geppetto
- Added Vagrant config to facilitate testing and development
- Added several new parameters (see changes to README.md)
2014-07-15 Release 1.0.1
Changes:
- Upgrade package format and fix deprecation warnings.
2013-02-18 Release 1.0.0
Breaking Changes:
- Default hostname is now
$::fqdn
instead of$::hostname
Changes:
- Added CentOS support (by @martijn)
Bugfixes:
- Added restarting of the zabbix-agent service when a setting is changed (#3)
- Fix dependency issues between package, service, and ini_settings (#4)
2013-01-02 Release 0.1.0
Changes:
- Use ini_setting module to only change necessary settings rather than use the entire config file as a template. This will insulate us from changes in the Zabbix configuration with new versions.
- Other fixes
Dependencies
- puppetlabs/chocolatey (>= 2.0.1 < 3.0.0)
- puppetlabs/stdlib (>= 3.0.0 < 5.0.0)
Copyright (c) 2015, Gene Liverman All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of genebean-zabbixagent nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.