From b21fabc6783d7051369105bcc3d68138f68fc1ae Mon Sep 17 00:00:00 2001 From: Christos Papageorgiou Date: Thu, 5 Aug 2021 14:12:17 +0300 Subject: [PATCH] Use puppet-strings annotations/Generate REFERENCE.md Signed-off-by: Christos Papageorgiou --- .sync.yml | 1 + Gemfile | 1 + REFERENCE.md | 6041 +++++++++++++++++++++++++ manifests/agent.pp | 313 +- manifests/database.pp | 93 +- manifests/database/mysql.pp | 34 +- manifests/database/postgresql.pp | 34 +- manifests/database/sqlite.pp | 20 +- manifests/init.pp | 283 +- manifests/javagateway.pp | 63 +- manifests/params.pp | 14 +- manifests/proxy.pp | 453 +- manifests/repo.pp | 40 +- manifests/resources/agent.pp | 27 +- manifests/resources/proxy.pp | 20 +- manifests/resources/template.pp | 20 +- manifests/resources/userparameters.pp | 18 +- manifests/resources/web.pp | 19 +- manifests/sender.pp | 24 +- manifests/server.pp | 407 +- manifests/startup.pp | 28 +- manifests/template.pp | 40 +- manifests/userparameter.pp | 37 +- manifests/userparameters.pp | 60 +- manifests/web.pp | 217 +- manifests/zapache.pp | 43 +- types/databases.pp | 1 + 27 files changed, 6795 insertions(+), 1556 deletions(-) create mode 100644 REFERENCE.md diff --git a/.sync.yml b/.sync.yml index 6084b7cbf..de966f1e9 100644 --- a/.sync.yml +++ b/.sync.yml @@ -4,6 +4,7 @@ Gemfile: ':test': - gem: 'fakefs' - gem: 'zabbixapi' + - gem: puppet-lint-param-docs spec/spec_helper.rb: mock_with: ':mocha' spec_overrides: "require 'support/acceptance/supported_versions'" diff --git a/Gemfile b/Gemfile index 9cd95df7b..7e8063617 100644 --- a/Gemfile +++ b/Gemfile @@ -10,6 +10,7 @@ group :test do gem 'puppet_metadata', '~> 0.3.0', :require => false gem 'fakefs', :require => false gem 'zabbixapi', :require => false + gem 'puppet-lint-param-docs', :require => false end group :development do diff --git a/REFERENCE.md b/REFERENCE.md new file mode 100644 index 000000000..184d6b4a4 --- /dev/null +++ b/REFERENCE.md @@ -0,0 +1,6041 @@ +# Reference + + + +## Table of Contents + +### Classes + +#### Public Classes + +* [`zabbix`](#zabbix): This will install and configure the zabbix-server on a single host. +* [`zabbix::agent`](#zabbixagent): This will install and configure the zabbix-agent deamon +* [`zabbix::database`](#zabbixdatabase): This will install the correct database and one or more users for correct usage +* [`zabbix::database::sqlite`](#zabbixdatabasesqlite): Class to handle sqlite database installations zabbix will automatically create a sqlite schema if one does not already exist. +* [`zabbix::javagateway`](#zabbixjavagateway): This will install and configure the zabbix-agent deamon +* [`zabbix::params`](#zabbixparams): This class manages zabbix server parameters +* [`zabbix::proxy`](#zabbixproxy): This will install and configure the zabbix-proxy deamon +* [`zabbix::repo`](#zabbixrepo): If enabled, this will install the repository used for installing zabbix +* [`zabbix::resources::agent`](#zabbixresourcesagent): This will create resources into puppetdb for automatically configuring agent into zabbix front-end. +* [`zabbix::resources::proxy`](#zabbixresourcesproxy): This will create resources into puppetdb for automatically configuring proxy agent into zabbix front-end. +* [`zabbix::resources::web`](#zabbixresourcesweb): This will load all zabbix related items from the puppet database and uses the zabbixapi gem to add/configure hosts via the zabbix-api +* [`zabbix::sender`](#zabbixsender): This will install and configure the zabbix-agent deamon +* [`zabbix::server`](#zabbixserver): This will install and configure the zabbix-server deamon +* [`zabbix::userparameter`](#zabbixuserparameter): This class can be used when you use hiera or The Foreman. With this tools you can't use and define. This make use of "create_resources". +* [`zabbix::web`](#zabbixweb): This will install the zabbix-web package and install an virtual host. +* [`zabbix::zapache`](#zabbixzapache): This will install and configure the zapache monitoring script Upstream: https://github.com/lorf/zapache + +#### Private Classes + +* `zabbix::database::mysql`: This will install and load the sql files for the tables and other data which is needed for zabbix. +* `zabbix::database::postgresql`: This will install and load the sql files for the tables and other data which is needed for zabbix. + +### Defined types + +* [`zabbix::resources::template`](#zabbixresourcestemplate): This will create resources into puppetdb for automatically configuring agent into zabbix front-end. +* [`zabbix::resources::userparameters`](#zabbixresourcesuserparameters): This will create resources into puppetdb for automatically configuring agent into zabbix front-end. +* [`zabbix::startup`](#zabbixstartup): This manage the zabbix related service startup script. +* [`zabbix::template`](#zabbixtemplate): This will upload an Zabbix Template (XML format) +* [`zabbix::userparameters`](#zabbixuserparameters): This will install an userparameters file with keys for items that can be checked with zabbix. + +### Resource types + +* [`zabbix_application`](#zabbix_application): %q(Manage zabbix applications zabbix_application{"app1": ensure => present, template => 'template1', } It Raise excep +* [`zabbix_host`](#zabbix_host): FQDN of the machine. +* [`zabbix_hostgroup`](#zabbix_hostgroup): Manage zabbix hostgroups +* [`zabbix_proxy`](#zabbix_proxy): FQDN of the proxy. +* [`zabbix_template`](#zabbix_template): The name of template. +* [`zabbix_template_host`](#zabbix_template_host): Link or Unlink template to host. Example. Name should be in the format of "template_name@hostname" zabbix_template_host{ 'mysql_template@db1 +* [`zabbix_userparameters`](#zabbix_userparameters): An unique name for this define. + +### Data types + +* [`Zabbix::Databases`](#zabbixdatabases): Type for supported databases by the zabbix module +* [`Zabbix::Historyics`](#zabbixhistoryics) + +## Classes + +### `zabbix` + +This will install and configure the zabbix-server on a single host. + +#### Examples + +##### Single host setup: + +```puppet +class { 'zabbix': + zabbix_url => 'zabbix.dj-wasabi.nl', +} +``` + +##### This assumes that you want to use the postgresql database. If not and you want to supply your own database crendentials: + +```puppet +class { 'zabbix': + zabbix_url => 'zabbix.dj-wasabi.nl', + database_type => 'mysql', + database_user => 'zabbix', + database_password => 'ThisIsVeryDifficult.nl', +} +``` + +#### Parameters + +The following parameters are available in the `zabbix` class: + +* [`zabbix_url`](#zabbix_url) +* [`zabbix_version`](#zabbix_version) +* [`zabbix_timezone`](#zabbix_timezone) +* [`zabbix_template_dir`](#zabbix_template_dir) +* [`zabbix_package_state`](#zabbix_package_state) +* [`zabbix_server`](#zabbix_server) +* [`zabbix_server_ip`](#zabbix_server_ip) +* [`zabbix_web`](#zabbix_web) +* [`zabbix_web_ip`](#zabbix_web_ip) +* [`database_type`](#database_type) +* [`database_path`](#database_path) +* [`manage_database`](#manage_database) +* [`manage_repo`](#manage_repo) +* [`manage_firewall`](#manage_firewall) +* [`manage_service`](#manage_service) +* [`manage_resources`](#manage_resources) +* [`manage_vhost`](#manage_vhost) +* [`default_vhost`](#default_vhost) +* [`apache_use_ssl`](#apache_use_ssl) +* [`apache_ssl_cert`](#apache_ssl_cert) +* [`apache_ssl_key`](#apache_ssl_key) +* [`apache_ssl_cipher`](#apache_ssl_cipher) +* [`apache_ssl_chain`](#apache_ssl_chain) +* [`apache_listen_ip`](#apache_listen_ip) +* [`apache_listenport`](#apache_listenport) +* [`apache_listenport_ssl`](#apache_listenport_ssl) +* [`apache_php_max_execution_time`](#apache_php_max_execution_time) +* [`apache_php_memory_limit`](#apache_php_memory_limit) +* [`apache_php_post_max_size`](#apache_php_post_max_size) +* [`apache_php_upload_max_filesize`](#apache_php_upload_max_filesize) +* [`apache_php_max_input_time`](#apache_php_max_input_time) +* [`apache_php_always_populate_raw_post_data`](#apache_php_always_populate_raw_post_data) +* [`ldap_cacert`](#ldap_cacert) +* [`ldap_clientcert`](#ldap_clientcert) +* [`ldap_clientkey`](#ldap_clientkey) +* [`ldap_reqcert`](#ldap_reqcert) +* [`zabbix_api_user`](#zabbix_api_user) +* [`zabbix_api_pass`](#zabbix_api_pass) +* [`listenport`](#listenport) +* [`sourceip`](#sourceip) +* [`logfile`](#logfile) +* [`logfilesize`](#logfilesize) +* [`logtype`](#logtype) +* [`debuglevel`](#debuglevel) +* [`pidfile`](#pidfile) +* [`database_host`](#database_host) +* [`database_name`](#database_name) +* [`database_schema`](#database_schema) +* [`database_double_ieee754`](#database_double_ieee754) +* [`database_user`](#database_user) +* [`database_password`](#database_password) +* [`database_socket`](#database_socket) +* [`database_port`](#database_port) +* [`database_charset`](#database_charset) +* [`database_collate`](#database_collate) +* [`database_tablespace`](#database_tablespace) +* [`database_tlsconnect`](#database_tlsconnect) +* [`database_tlscafile`](#database_tlscafile) +* [`startpollers`](#startpollers) +* [`startpreprocessors`](#startpreprocessors) +* [`startipmipollers`](#startipmipollers) +* [`startpollersunreachable`](#startpollersunreachable) +* [`starttrappers`](#starttrappers) +* [`startpingers`](#startpingers) +* [`startalerters`](#startalerters) +* [`startdiscoverers`](#startdiscoverers) +* [`startescalators`](#startescalators) +* [`starthttppollers`](#starthttppollers) +* [`starttimers`](#starttimers) +* [`javagateway`](#javagateway) +* [`javagatewayport`](#javagatewayport) +* [`startjavapollers`](#startjavapollers) +* [`startlldprocessors`](#startlldprocessors) +* [`startvmwarecollectors`](#startvmwarecollectors) +* [`vaultdbpath`](#vaultdbpath) +* [`vaulttoken`](#vaulttoken) +* [`vaulturl`](#vaulturl) +* [`vmwarefrequency`](#vmwarefrequency) +* [`vmwarecachesize`](#vmwarecachesize) +* [`vmwaretimeout`](#vmwaretimeout) +* [`snmptrapperfile`](#snmptrapperfile) +* [`startsnmptrapper`](#startsnmptrapper) +* [`listenip`](#listenip) +* [`housekeepingfrequency`](#housekeepingfrequency) +* [`maxhousekeeperdelete`](#maxhousekeeperdelete) +* [`cachesize`](#cachesize) +* [`cacheupdatefrequency`](#cacheupdatefrequency) +* [`startdbsyncers`](#startdbsyncers) +* [`historycachesize`](#historycachesize) +* [`historyindexcachesize`](#historyindexcachesize) +* [`trendcachesize`](#trendcachesize) +* [`valuecachesize`](#valuecachesize) +* [`timeout`](#timeout) +* [`tlscafile`](#tlscafile) +* [`tlscertfile`](#tlscertfile) +* [`tlscrlfile`](#tlscrlfile) +* [`tlskeyfile`](#tlskeyfile) +* [`tlscipherall`](#tlscipherall) +* [`tlscipherall13`](#tlscipherall13) +* [`tlsciphercert`](#tlsciphercert) +* [`tlsciphercert13`](#tlsciphercert13) +* [`tlscipherpsk`](#tlscipherpsk) +* [`tlscipherpsk13`](#tlscipherpsk13) +* [`trappertimeout`](#trappertimeout) +* [`unreachableperiod`](#unreachableperiod) +* [`unavailabledelay`](#unavailabledelay) +* [`unreachabledelay`](#unreachabledelay) +* [`alertscriptspath`](#alertscriptspath) +* [`externalscripts`](#externalscripts) +* [`fpinglocation`](#fpinglocation) +* [`fping6location`](#fping6location) +* [`sshkeylocation`](#sshkeylocation) +* [`logslowqueries`](#logslowqueries) +* [`tmpdir`](#tmpdir) +* [`startproxypollers`](#startproxypollers) +* [`proxyconfigfrequency`](#proxyconfigfrequency) +* [`proxydatafrequency`](#proxydatafrequency) +* [`allowroot`](#allowroot) +* [`include_dir`](#include_dir) +* [`loadmodulepath`](#loadmodulepath) +* [`loadmodule`](#loadmodule) +* [`socketdir`](#socketdir) +* [`manage_selinux`](#manage_selinux) +* [`additional_service_params`](#additional_service_params) +* [`zabbix_user`](#zabbix_user) +* [`zabbix_server_name`](#zabbix_server_name) +* [`saml_sp_key`](#saml_sp_key) +* [`saml_sp_cert`](#saml_sp_cert) +* [`saml_idp_cert`](#saml_idp_cert) +* [`saml_settings`](#saml_settings) + +##### `zabbix_url` + +Data type: `Any` + +Url on which zabbix needs to be available. Will create an vhost in +apache. Only needed when manage_vhost is set to true. +Example: zabbix.example.com + +Default value: `''` + +##### `zabbix_version` + +Data type: `Any` + +This is the zabbix version. + +Default value: `$zabbix::params::zabbix_version` + +##### `zabbix_timezone` + +Data type: `Any` + +The current timezone for vhost configuration needed for the php timezone. Example: Europe/Amsterdam + +Default value: `$zabbix::params::zabbix_timezone` + +##### `zabbix_template_dir` + +Data type: `Any` + +The directory where all templates are stored before uploading via API + +Default value: `$zabbix::params::zabbix_template_dir` + +##### `zabbix_package_state` + +Data type: `Any` + +The state of the package that needs to be installed: present or latest. + +Default value: `$zabbix::params::zabbix_package_state` + +##### `zabbix_server` + +Data type: `Any` + +This is the FQDN for the host running zabbix-server. This parameter +is used when database_type = mysql. Default: localhost + +Default value: `$zabbix::params::zabbix_server` + +##### `zabbix_server_ip` + +Data type: `Any` + +This is the actual ip address of the host running zabbix-server +This parameter is used when database_type = postgresql. Default: +127.0.0.1 + +Default value: `$zabbix::params::zabbix_server_ip` + +##### `zabbix_web` + +Data type: `Any` + +This is the hostname of the server which is running the +zabbix-web package. This parameter is used when database_type = +mysql. When single node: localhost + +Default value: `$zabbix::params::zabbix_web` + +##### `zabbix_web_ip` + +Data type: `Any` + +This is the ip address of the server which is running the +zabbix-web package. This parameter is used when database_type = +postgresql. When single node: 127.0.0.1 + +Default value: `$zabbix::params::zabbix_web_ip` + +##### `database_type` + +Data type: `Zabbix::Databases` + +Type of database. Can use the following 2 databases: +- postgresql +- mysql + +Default value: `$zabbix::params::database_type` + +##### `database_path` + +Data type: `Any` + +When database binaries are not found on the default path: +/bin:/usr/bin:/usr/local/sbin:/usr/local/bin +you can use this parameter to add the database_path to the above mentioned +path. + +Default value: `$zabbix::params::database_path` + +##### `manage_database` + +Data type: `Any` + +When true, it will configure the database and execute the sql scripts. + +Default value: `$zabbix::params::manage_database` + +##### `manage_repo` + +Data type: `Any` + +When true (default) this module will manage the Zabbix repository. + +Default value: `$zabbix::params::manage_repo` + +##### `manage_firewall` + +Data type: `Any` + +When true, it will create iptables rules. + +Default value: `$zabbix::params::manage_firewall` + +##### `manage_service` + +Data type: `Any` + +When true, it will ensure service running and enabled. +When false, it does not care about service + +Default value: `$zabbix::params::manage_service` + +##### `manage_resources` + +Data type: `Any` + +When true, it will export resources to something like puppetdb. +When set to true, you'll need to configure 'storeconfigs' to make +this happen. Default is set to false, as not everyone has this +enabled. + +Default value: `$zabbix::params::manage_resources` + +##### `manage_vhost` + +Data type: `Any` + +When true, it will create an vhost for apache. The parameter zabbix_url has to be set. + +Default value: `$zabbix::params::manage_vhost` + +##### `default_vhost` + +Data type: `Any` + +When true priority of 15 is passed to zabbix vhost which would end up +with marking zabbix vhost as default one, when false priority is set to 25 + +Default value: `$zabbix::params::default_vhost` + +##### `apache_use_ssl` + +Data type: `Any` + +Will create an ssl vhost. Also nonssl vhost will be created for redirect +nonssl to ssl vhost. + +Default value: `$zabbix::params::apache_use_ssl` + +##### `apache_ssl_cert` + +Data type: `Any` + +The location of the ssl certificate file. You'll need to make sure this +file is present on the system, this module will not install this file. + +Default value: `$zabbix::params::apache_ssl_cert` + +##### `apache_ssl_key` + +Data type: `Any` + +The location of the ssl key file. You'll need to make sure this file is +present on the system, this module will not install this file. + +Default value: `$zabbix::params::apache_ssl_key` + +##### `apache_ssl_cipher` + +Data type: `Any` + +The ssl cipher used. Cipher is used from this website: +https://wiki.mozilla.org/Security/Server_Side_TLS + +Default value: `$zabbix::params::apache_ssl_cipher` + +##### `apache_ssl_chain` + +Data type: `Any` + +The ssl chain file. + +Default value: `$zabbix::params::apache_ssl_chain` + +##### `apache_listen_ip` + +Data type: `Any` + +The IP the apache service should listen on. + +Default value: `$zabbix::params::apache_listen_ip` + +##### `apache_listenport` + +Data type: `Any` + +The port for the apache vhost. + +Default value: `$zabbix::params::apache_listenport` + +##### `apache_listenport_ssl` + +Data type: `Any` + +The port for the apache SSL vhost. + +Default value: `$zabbix::params::apache_listenport_ssl` + +##### `apache_php_max_execution_time` + +Data type: `Any` + +Max execution time for php. Default: 300 + +Default value: `$zabbix::params::apache_php_max_execution_time` + +##### `apache_php_memory_limit` + +Data type: `Any` + +PHP memory size limit. Default: 128M + +Default value: `$zabbix::params::apache_php_memory_limit` + +##### `apache_php_post_max_size` + +Data type: `Any` + +PHP maximum post size data. Default: 16M + +Default value: `$zabbix::params::apache_php_post_max_size` + +##### `apache_php_upload_max_filesize` + +Data type: `Any` + +PHP maximum upload filesize. Default: 2M + +Default value: `$zabbix::params::apache_php_upload_max_filesize` + +##### `apache_php_max_input_time` + +Data type: `Any` + +Max input time for php. Default: 300 + +Default value: `$zabbix::params::apache_php_max_input_time` + +##### `apache_php_always_populate_raw_post_data` + +Data type: `Any` + +Default: -1 + +Default value: `$zabbix::params::apache_php_always_populate_raw_post_data` + +##### `ldap_cacert` + +Data type: `Optional[Stdlib::Absolutepath]` + +Set location of ca_cert used by LDAP authentication. + +Default value: `$zabbix::params::ldap_cacert` + +##### `ldap_clientcert` + +Data type: `Optional[Stdlib::Absolutepath]` + +Set location of client cert used by LDAP authentication. + +Default value: `$zabbix::params::ldap_clientcert` + +##### `ldap_clientkey` + +Data type: `Optional[Stdlib::Absolutepath]` + +Set location of client key used by LDAP authentication. + +Default value: `$zabbix::params::ldap_clientkey` + +##### `ldap_reqcert` + +Data type: `Optional[Enum['never', 'allow', 'try', 'demand', 'hard']]` + +Specifies what checks to perform on a server certificate + +Default value: `$zabbix::params::ldap_reqcert` + +##### `zabbix_api_user` + +Data type: `Any` + +Name of the user which the api should connect to. Default: Admin + +Default value: `$zabbix::params::server_api_user` + +##### `zabbix_api_pass` + +Data type: `Any` + +Password of the user which connects to the api. Default: zabbix + +Default value: `$zabbix::params::server_api_pass` + +##### `listenport` + +Data type: `Any` + +Listen port for the zabbix-server. Default: 10051 + +Default value: `$zabbix::params::server_listenport` + +##### `sourceip` + +Data type: `Any` + +Source ip address for outgoing connections. + +Default value: `$zabbix::params::server_sourceip` + +##### `logfile` + +Data type: `Optional[Stdlib::Absolutepath]` + +Name of log file. + +Default value: `$zabbix::params::server_logfile` + +##### `logfilesize` + +Data type: `Any` + +Maximum size of log file in MB. + +Default value: `$zabbix::params::server_logfilesize` + +##### `logtype` + +Data type: `Enum['console', 'file', 'system']` + +Specifies where log messages are written to. (options: console, file, system) + +Default value: `$zabbix::params::server_logtype` + +##### `debuglevel` + +Data type: `Any` + +Specifies debug level. + +Default value: `$zabbix::params::server_debuglevel` + +##### `pidfile` + +Data type: `Any` + +Name of pid file. + +Default value: `$zabbix::params::server_pidfile` + +##### `database_host` + +Data type: `Any` + +Database host name. + +Default value: `$zabbix::params::server_database_host` + +##### `database_name` + +Data type: `Any` + +Database name. + +Default value: `$zabbix::params::server_database_name` + +##### `database_schema` + +Data type: `Any` + +Schema name. used for ibm db2. + +Default value: `$zabbix::params::server_database_schema` + +##### `database_double_ieee754` + +Data type: `Boolean` + +Enable extended range of float values for new installs of Zabbix >= 5.0 and +after patching upgraded installs to 5.0 or greater. +https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values + +Default value: `$zabbix::params::server_database_double_ieee754` + +##### `database_user` + +Data type: `Any` + +Database user. ignored for sqlite. + +Default value: `$zabbix::params::server_database_user` + +##### `database_password` + +Data type: `Any` + +Database password. ignored for sqlite. + +Default value: `$zabbix::params::server_database_password` + +##### `database_socket` + +Data type: `Any` + +Path to mysql socket. + +Default value: `$zabbix::params::server_database_socket` + +##### `database_port` + +Data type: `Any` + +Database port when not using local socket. Ignored for sqlite. + +Default value: `$zabbix::params::server_database_port` + +##### `database_charset` + +Data type: `Any` + +The default charset of the database. + +Default value: `$zabbix::params::server_database_charset` + +##### `database_collate` + +Data type: `Any` + +The default collation of the database. + +Default value: `$zabbix::params::server_database_collate` + +##### `database_tablespace` + +Data type: `Any` + +The tablespace the database will be created in. This setting only affects PostgreSQL databases. + +Default value: `$zabbix::params::server_database_tablespace` + +##### `database_tlsconnect` + +Data type: `Optional[Enum['required', 'verify_ca', 'verify_full']]` + +Available options: +* required - connect using TLS +* verify_ca - connect using TLS and verify certificate +* verify_full - connect using TLS, verify certificate and verify that database identity specified by DBHost matches its certificate + +Default value: `$zabbix::params::server_database_tlsconnect` + +##### `database_tlscafile` + +Data type: `Optional[Stdlib::Absolutepath]` + +Full pathname of a file containing the top-level CA(s) certificates for database certificate verification. + +Default value: `$zabbix::params::server_database_tlscafile` + +##### `startpollers` + +Data type: `Any` + +Number of pre-forked instances of pollers. + +Default value: `$zabbix::params::server_startpollers` + +##### `startpreprocessors` + +Data type: `Integer[1, 1000]` + +Number of pre-forked instances of preprocessing workers + +Default value: `$zabbix::params::server_startpreprocessors` + +##### `startipmipollers` + +Data type: `Any` + +Number of pre-forked instances of ipmi pollers. + +Default value: `$zabbix::params::server_startipmipollers` + +##### `startpollersunreachable` + +Data type: `Any` + +Number of pre-forked instances of pollers for unreachable hosts (including ipmi). + +Default value: `$zabbix::params::server_startpollersunreachable` + +##### `starttrappers` + +Data type: `Any` + +Number of pre-forked instances of trappers. + +Default value: `$zabbix::params::server_starttrappers` + +##### `startpingers` + +Data type: `Any` + +Number of pre-forked instances of icmp pingers. + +Default value: `$zabbix::params::server_startpingers` + +##### `startalerters` + +Data type: `Integer[1, 100]` + +Number of pre-forked instances of alerters. + +Default value: `$zabbix::params::server_startalerters` + +##### `startdiscoverers` + +Data type: `Any` + +Number of pre-forked instances of discoverers. + +Default value: `$zabbix::params::server_startdiscoverers` + +##### `startescalators` + +Data type: `Integer[1, 100]` + +Number of pre-forked instances of escalators. + +Default value: `$zabbix::params::server_startescalators` + +##### `starthttppollers` + +Data type: `Any` + +Number of pre-forked instances of http pollers. + +Default value: `$zabbix::params::server_starthttppollers` + +##### `starttimers` + +Data type: `Any` + +Number of pre-forked instances of timers. + +Default value: `$zabbix::params::server_starttimers` + +##### `javagateway` + +Data type: `Any` + +IP address (or hostname) of zabbix java gateway. + +Default value: `$zabbix::params::server_javagateway` + +##### `javagatewayport` + +Data type: `Any` + +Port that zabbix java gateway listens on. + +Default value: `$zabbix::params::server_javagatewayport` + +##### `startjavapollers` + +Data type: `Any` + +Number of pre-forked instances of java pollers. + +Default value: `$zabbix::params::server_startjavapollers` + +##### `startlldprocessors` + +Data type: `Integer[1, 100]` + +Number of pre-forked instances of low-level discovery (LLD) workers. + +Default value: `$zabbix::params::server_startlldprocessors` + +##### `startvmwarecollectors` + +Data type: `Any` + +Number of pre-forked vmware collector instances. + +Default value: `$zabbix::params::server_startvmwarecollectors` + +##### `vaultdbpath` + +Data type: `Optional[String[1]]` + +Vault path from where credentials for database will be retrieved by keys 'password' and 'username'. + +Default value: `$zabbix::params::server_vaultdbpath` + +##### `vaulttoken` + +Data type: `Optional[String[1]]` + +Vault authentication token that should have been generated exclusively for Zabbix proxy with read-only +permission to the path specified in the optional VaultDBPath configuration parameter. + +Default value: `$zabbix::params::server_vaulttoken` + +##### `vaulturl` + +Data type: `Stdlib::HTTPSUrl` + +Vault server HTTP[S] URL. System-wide CA certificates directory will be used if SSLCALocation is not specified. + +Default value: `$zabbix::params::server_vaulturl` + +##### `vmwarefrequency` + +Data type: `Any` + +How often zabbix will connect to vmware service to obtain a new datan. + +Default value: `$zabbix::params::server_vmwarefrequency` + +##### `vmwarecachesize` + +Data type: `Any` + +Size of vmware cache, in bytes. + +Default value: `$zabbix::params::server_vmwarecachesize` + +##### `vmwaretimeout` + +Data type: `Any` + +The maximum number of seconds vmware collector will wait for a response from VMware service. + +Default value: `$zabbix::params::server_vmwaretimeout` + +##### `snmptrapperfile` + +Data type: `Any` + +Temporary file used for passing data from snmp trap daemon to the server. + +Default value: `$zabbix::params::server_snmptrapperfile` + +##### `startsnmptrapper` + +Data type: `Any` + +If 1, snmp trapper process is started. + +Default value: `$zabbix::params::server_startsnmptrapper` + +##### `listenip` + +Data type: `Any` + +List of comma delimited ip addresses that the zabbix-server should listen on. + +Default value: `$zabbix::params::server_listenip` + +##### `housekeepingfrequency` + +Data type: `Any` + +How often zabbix will perform housekeeping procedure (in hours). + +Default value: `$zabbix::params::server_housekeepingfrequency` + +##### `maxhousekeeperdelete` + +Data type: `Any` + +the table "housekeeper" contains "tasks" for housekeeping procedure in the format: +[housekeeperid], [tablename], [field], [value]. +no more than 'maxhousekeeperdelete' rows (corresponding to [tablename], [field], [value]) +will be deleted per one task in one housekeeping cycle. +sqlite3 does not use this parameter, deletes all corresponding rows without a limit. +if set to 0 then no limit is used at all. in this case you must know what you are doing! + +Default value: `$zabbix::params::server_maxhousekeeperdelete` + +##### `cachesize` + +Data type: `Any` + +Size of configuration cache, in bytes. + +Default value: `$zabbix::params::server_cachesize` + +##### `cacheupdatefrequency` + +Data type: `Any` + +How often zabbix will perform update of configuration cache, in seconds. + +Default value: `$zabbix::params::server_cacheupdatefrequency` + +##### `startdbsyncers` + +Data type: `Any` + +Number of pre-forked instances of db syncers. + +Default value: `$zabbix::params::server_startdbsyncers` + +##### `historycachesize` + +Data type: `Any` + +Size of history cache, in bytes. + +Default value: `$zabbix::params::server_historycachesize` + +##### `historyindexcachesize` + +Data type: `Zabbix::Historyics` + +Size of history index cache, in bytes. + +Default value: `$zabbix::params::server_historyindexcachesize` + +##### `trendcachesize` + +Data type: `Any` + +Size of trend cache, in bytes. + +Default value: `$zabbix::params::server_trendcachesize` + +##### `valuecachesize` + +Data type: `Any` + +Size of history value cache, in bytes. + +Default value: `$zabbix::params::server_valuecachesize` + +##### `timeout` + +Data type: `Any` + +Specifies how long we wait for agent, snmp device or external check (in seconds). + +Default value: `$zabbix::params::server_timeout` + +##### `tlscafile` + +Data type: `Any` + +Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. + +Default value: `$zabbix::params::server_tlscafile` + +##### `tlscertfile` + +Data type: `Any` + +Full pathname of a file containing the server certificate or certificate chain. + +Default value: `$zabbix::params::server_tlscertfile` + +##### `tlscrlfile` + +Data type: `Any` + +Full pathname of a file containing revoked certificates. + +Default value: `$zabbix::params::server_tlscrlfile` + +##### `tlskeyfile` + +Data type: `Any` + +Full pathname of a file containing the server private key. + +Default value: `$zabbix::params::server_tlskeyfile` + +##### `tlscipherall` + +Data type: `Any` + +GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +for certificate- and PSK-based encryption. + +Default value: `$zabbix::params::server_tlscipherall` + +##### `tlscipherall13` + +Data type: `Any` + +Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +for certificate- and PSK-based encryption. + +Default value: `$zabbix::params::server_tlscipherall13` + +##### `tlsciphercert` + +Data type: `Any` + +GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +for certificate-based encryption. + +Default value: `$zabbix::params::server_tlsciphercert` + +##### `tlsciphercert13` + +Data type: `Any` + +Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +for certificate-based encryption. + +Default value: `$zabbix::params::server_tlsciphercert13` + +##### `tlscipherpsk` + +Data type: `Any` + +GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +for PSK-based encryption. + +Default value: `$zabbix::params::server_tlscipherpsk` + +##### `tlscipherpsk13` + +Data type: `Any` + +Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +for PSK-based encryption. + +Default value: `$zabbix::params::server_tlscipherpsk13` + +##### `trappertimeout` + +Data type: `Any` + +Specifies how many seconds trapper may spend processing new data. + +Default value: `$zabbix::params::server_trappertimeout` + +##### `unreachableperiod` + +Data type: `Any` + +After how many seconds of unreachability treat a host as unavailable. + +Default value: `$zabbix::params::server_unreachableperiod` + +##### `unavailabledelay` + +Data type: `Any` + +How often host is checked for availability during the unavailability period, in seconds. + +Default value: `$zabbix::params::server_unavailabledelay` + +##### `unreachabledelay` + +Data type: `Any` + +How often host is checked for availability during the unreachability period, in seconds. + +Default value: `$zabbix::params::server_unreachabledelay` + +##### `alertscriptspath` + +Data type: `Any` + +Full path to location of custom alert scripts. + +Default value: `$zabbix::params::server_alertscriptspath` + +##### `externalscripts` + +Data type: `Any` + +Full path to location of external scripts. + +Default value: `$zabbix::params::server_externalscripts` + +##### `fpinglocation` + +Data type: `Any` + +Location of fping. + +Default value: `$zabbix::params::server_fpinglocation` + +##### `fping6location` + +Data type: `Any` + +Location of fping6. + +Default value: `$zabbix::params::server_fping6location` + +##### `sshkeylocation` + +Data type: `Any` + +Location of public and private keys for ssh checks and actions. + +Default value: `$zabbix::params::server_sshkeylocation` + +##### `logslowqueries` + +Data type: `Any` + +How long a database query may take before being logged (in milliseconds). + +Default value: `$zabbix::params::server_logslowqueries` + +##### `tmpdir` + +Data type: `Any` + +Temporary directory. + +Default value: `$zabbix::params::server_tmpdir` + +##### `startproxypollers` + +Data type: `Any` + +Number of pre-forked instances of pollers for passive proxies. + +Default value: `$zabbix::params::server_startproxypollers` + +##### `proxyconfigfrequency` + +Data type: `Any` + +How often zabbix server sends configuration data to a zabbix proxy in seconds. + +Default value: `$zabbix::params::server_proxyconfigfrequency` + +##### `proxydatafrequency` + +Data type: `Any` + +How often zabbix server requests history data from a zabbix proxy in seconds. + +Default value: `$zabbix::params::server_proxydatafrequency` + +##### `allowroot` + +Data type: `Any` + +Allow the server to run as 'root'. + +Default value: `$zabbix::params::server_allowroot` + +##### `include_dir` + +Data type: `Any` + +You may include individual files or all files in a directory in the configuration file. + +Default value: `$zabbix::params::server_include` + +##### `loadmodulepath` + +Data type: `Any` + +Full path to location of server modules. + +Default value: `$zabbix::params::server_loadmodulepath` + +##### `loadmodule` + +Data type: `Any` + +Module to load at server startup. + +Default value: `$zabbix::params::server_loadmodule` + +##### `socketdir` + +Data type: `Optional[Stdlib::Absolutepath]` + +IPC socket directory. +Directory to store IPC sockets used by internal Zabbix services. + +Default value: `$zabbix::params::server_socketdir` + +##### `manage_selinux` + +Data type: `Boolean` + +Whether we should manage SELinux rules. + +Default value: `$zabbix::params::manage_selinux` + +##### `additional_service_params` + +Data type: `String` + +Additional parameters to pass to the service. + +Default value: `$zabbix::params::additional_service_params` + +##### `zabbix_user` + +Data type: `Optional[String[1]]` + +User the zabbix service will run as. + +Default value: `$zabbix::params::server_zabbix_user` + +##### `zabbix_server_name` + +Data type: `Optional[String]` + +The fqdn name of the host running the zabbix-server. When single node: +localhost +This can also be used to upave a different name such as "Zabbix DEV" + +Default value: `$zabbix::params::zabbix_server` + +##### `saml_sp_key` + +Data type: `Optional[Stdlib::Absolutepath]` + +The location of the SAML Service Provider Key file. + +Default value: `$zabbix::params::saml_sp_key` + +##### `saml_sp_cert` + +Data type: `Optional[Stdlib::Absolutepath]` + +The location of the SAML Service Provider Certificate. + +Default value: `$zabbix::params::saml_sp_cert` + +##### `saml_idp_cert` + +Data type: `Optional[Stdlib::Absolutepath]` + +The location of the SAML Identity Provider Certificate. + +Default value: `$zabbix::params::saml_idp_cert` + +##### `saml_settings` + +Data type: `Hash[String[1], Variant[ScalarData, Hash]]` + +A hash of additional SAML SSO settings. + +Default value: `$zabbix::params::saml_settings` + +### `zabbix::agent` + +This will install and configure the zabbix-agent deamon + +#### Examples + +##### Basic installation: + +```puppet +class { 'zabbix::agent': + zabbix_version => '5.2', + server => '192.168.1.1', +} +``` + +##### With exported resources: + +```puppet +class { 'zabbix::agent': + manage_resources => true, + monitored_by_proxy => 'my_proxy_host', + server => '192.168.1.1', +} +``` + +#### Parameters + +The following parameters are available in the `zabbix::agent` class: + +* [`zabbix_version`](#zabbix_version) +* [`zabbix_package_state`](#zabbix_package_state) +* [`zabbix_package_agent`](#zabbix_package_agent) +* [`manage_firewall`](#manage_firewall) +* [`manage_repo`](#manage_repo) +* [`manage_choco`](#manage_choco) +* [`zabbix_package_provider`](#zabbix_package_provider) +* [`manage_resources`](#manage_resources) +* [`monitored_by_proxy`](#monitored_by_proxy) +* [`agent_use_ip`](#agent_use_ip) +* [`zbx_group`](#zbx_group) +* [`zbx_groups`](#zbx_groups) +* [`zbx_group_create`](#zbx_group_create) +* [`zbx_templates`](#zbx_templates) +* [`zbx_macros`](#zbx_macros) +* [`zbx_interface_type`](#zbx_interface_type) +* [`agent_configfile_path`](#agent_configfile_path) +* [`pidfile`](#pidfile) +* [`servicename`](#servicename) +* [`logfile`](#logfile) +* [`logfilesize`](#logfilesize) +* [`logtype`](#logtype) +* [`debuglevel`](#debuglevel) +* [`sourceip`](#sourceip) +* [`allowkey`](#allowkey) +* [`denykey`](#denykey) +* [`enableremotecommands`](#enableremotecommands) +* [`logremotecommands`](#logremotecommands) +* [`server`](#server) +* [`listenport`](#listenport) +* [`listenip`](#listenip) +* [`startagents`](#startagents) +* [`serveractive`](#serveractive) +* [`service_ensure`](#service_ensure) +* [`service_enable`](#service_enable) +* [`hostname`](#hostname) +* [`hostnameitem`](#hostnameitem) +* [`hostmetadata`](#hostmetadata) +* [`hostmetadataitem`](#hostmetadataitem) +* [`hostinterface`](#hostinterface) +* [`hostinterfaceitem`](#hostinterfaceitem) +* [`refreshactivechecks`](#refreshactivechecks) +* [`buffersend`](#buffersend) +* [`buffersize`](#buffersize) +* [`maxlinespersecond`](#maxlinespersecond) +* [`allowroot`](#allowroot) +* [`zabbix_user`](#zabbix_user) +* [`zabbix_alias`](#zabbix_alias) +* [`timeout`](#timeout) +* [`tlsaccept`](#tlsaccept) +* [`tlscafile`](#tlscafile) +* [`tlscertfile`](#tlscertfile) +* [`tlsconnect`](#tlsconnect) +* [`tlscrlfile`](#tlscrlfile) +* [`tlskeyfile`](#tlskeyfile) +* [`tlspskfile`](#tlspskfile) +* [`tlspskidentity`](#tlspskidentity) +* [`tlscipherall`](#tlscipherall) +* [`tlscipherall13`](#tlscipherall13) +* [`tlsciphercert`](#tlsciphercert) +* [`tlsciphercert13`](#tlsciphercert13) +* [`tlscipherpsk`](#tlscipherpsk) +* [`tlscipherpsk13`](#tlscipherpsk13) +* [`tlsservercertissuer`](#tlsservercertissuer) +* [`tlsservercertsubject`](#tlsservercertsubject) +* [`agent_config_owner`](#agent_config_owner) +* [`agent_config_group`](#agent_config_group) +* [`manage_selinux`](#manage_selinux) +* [`selinux_require`](#selinux_require) +* [`selinux_rules`](#selinux_rules) +* [`additional_service_params`](#additional_service_params) +* [`service_type`](#service_type) +* [`include_dir`](#include_dir) +* [`include_dir_purge`](#include_dir_purge) +* [`unsafeuserparameters`](#unsafeuserparameters) +* [`userparameter`](#userparameter) +* [`loadmodulepath`](#loadmodulepath) +* [`loadmodule`](#loadmodule) +* [`manage_startup_script`](#manage_startup_script) + +##### `zabbix_version` + +Data type: `Any` + +This is the zabbix version. + +Default value: `$zabbix::params::zabbix_version` + +##### `zabbix_package_state` + +Data type: `Any` + +The state of the package that needs to be installed: present or latest. + +Default value: `$zabbix::params::zabbix_package_state` + +##### `zabbix_package_agent` + +Data type: `Any` + +The name of the agent package that we manage + +Default value: `$zabbix::params::zabbix_package_agent` + +##### `manage_firewall` + +Data type: `Boolean` + +When true, it will create iptables rules. + +Default value: `$zabbix::params::manage_firewall` + +##### `manage_repo` + +Data type: `Boolean` + +When true, it will create repository for installing the agent. + +Default value: `$zabbix::params::manage_repo` + +##### `manage_choco` + +Data type: `Boolean` + +When true on windows, it will use chocolatey to install the agent. +The module chocolatey is required https://forge.puppet.com/puppetlabs/chocolatey. + +Default value: `$zabbix::params::manage_choco` + +##### `zabbix_package_provider` + +Data type: `Optional[String[1]]` + +Which package's provider to use to install the agent. +It is undef for all linux os and set to 'chocolatey' on windows. + +Default value: `$zabbix::params::zabbix_package_provider` + +##### `manage_resources` + +Data type: `Boolean` + +When true, it will export resources to something like puppetdb. +When set to true, you'll need to configure 'storeconfigs' to make +this happen. Default is set to false, as not everyone has this +enabled. + +Default value: `$zabbix::params::manage_resources` + +##### `monitored_by_proxy` + +Data type: `Any` + +When this is monitored by an proxy, please fill in the name of this proxy. +If the proxy is also installed via this module, please fill in the FQDN + +Default value: `$zabbix::params::monitored_by_proxy` + +##### `agent_use_ip` + +Data type: `Any` + +When true, when creating hosts via the zabbix-api, it will configure that +connection should me made via ip, not fqdn. + +Default value: `$zabbix::params::agent_use_ip` + +##### `zbx_group` + +Data type: `Any` + +*Deprecated* (see zbx_groups) Name of the hostgroup where this host needs to be added. + +Default value: `$zabbix::params::agent_zbx_group` + +##### `zbx_groups` + +Data type: `Variant[String[1],Array[String[1]]]` + +An array of hostgroups where this host needs to be added. + +Default value: `$zabbix::params::agent_zbx_groups` + +##### `zbx_group_create` + +Data type: `Any` + +Whether to create hostgroup if missing. + +Default value: `$zabbix::params::agent_zbx_group_create` + +##### `zbx_templates` + +Data type: `Any` + +List of templates which will be added when host is configured. + +Default value: `$zabbix::params::agent_zbx_templates` + +##### `zbx_macros` + +Data type: `Array[Hash]` + +List of macros which will be added when host is configured. + +Default value: `[]` + +##### `zbx_interface_type` + +Data type: `Integer[1,4]` + +Integer specifying type of interface to be created + +Default value: `1` + +##### `agent_configfile_path` + +Data type: `Any` + +Agent config file path defaults to /etc/zabbix/zabbix_agentd.conf + +Default value: `$zabbix::params::agent_configfile_path` + +##### `pidfile` + +Data type: `Any` + +Name of pid file. + +Default value: `$zabbix::params::agent_pidfile` + +##### `servicename` + +Data type: `Any` + +Zabbix's agent service name. + +Default value: `$zabbix::params::agent_servicename` + +##### `logfile` + +Data type: `Optional[Stdlib::Absolutepath]` + +Name of log file. + +Default value: `$zabbix::params::agent_logfile` + +##### `logfilesize` + +Data type: `Any` + +Maximum size of log file in MB. + +Default value: `$zabbix::params::agent_logfilesize` + +##### `logtype` + +Data type: `Enum['console', 'file', 'system']` + +Specifies where log messages are written to. Can be one of: console, file, system + +Default value: `$zabbix::params::agent_logtype` + +##### `debuglevel` + +Data type: `Any` + +Specifies debug level. + +Default value: `$zabbix::params::agent_debuglevel` + +##### `sourceip` + +Data type: `Any` + +Source ip address for outgoing connections. + +Default value: `$zabbix::params::agent_sourceip` + +##### `allowkey` + +Data type: `Optional[String[1]]` + +Allow execution of item keys matching pattern. + +Default value: `$zabbix::params::agent_allowkey` + +##### `denykey` + +Data type: `Optional[String[1]]` + +Deny execution of items keys matching pattern. + +Default value: `$zabbix::params::agent_denykey` + +##### `enableremotecommands` + +Data type: `Any` + +Whether remote commands from zabbix server are allowed. + +Default value: `$zabbix::params::agent_enableremotecommands` + +##### `logremotecommands` + +Data type: `Any` + +Enable logging of executed shell commands as warnings. + +Default value: `$zabbix::params::agent_logremotecommands` + +##### `server` + +Data type: `Any` + +List of comma delimited ip addresses (or hostnames) of zabbix servers. + +Default value: `$zabbix::params::agent_server` + +##### `listenport` + +Data type: `Any` + +Agent will listen on this port for connections from the server. + +Default value: `$zabbix::params::agent_listenport` + +##### `listenip` + +Data type: `Any` + +List of comma delimited ip addresses that the agent should listen on. +You can also specify which network interface it should listen on. + +listenip => 'eth0', or +listenip => 'bond0.73', + +It will find out which ip is configured for this ipaddress. Can be handy +if more than 1 interface is on the server. + +Default value: `$zabbix::params::agent_listenip` + +##### `startagents` + +Data type: `Any` + +Number of pre-forked instances of zabbix_agentd that process passive checks. + +Default value: `$zabbix::params::agent_startagents` + +##### `serveractive` + +Data type: `Any` + +List of comma delimited ip:port (or hostname:port) pairs of zabbix servers for active checks. + +Default value: `$zabbix::params::agent_serveractive` + +##### `service_ensure` + +Data type: `Stdlib::Ensure::Service` + +Start / stop the agent service. E.g. to preconfigure a hosts agent and turn on the service at a later time (when the server reaches production SLA) + +Default value: `$zabbix::params::agent_service_ensure` + +##### `service_enable` + +Data type: `Boolean` + +Automatically start the agent on system boot + +Default value: `$zabbix::params::agent_service_enable` + +##### `hostname` + +Data type: `Any` + +Unique, case sensitive hostname. + +Default value: `$zabbix::params::agent_hostname` + +##### `hostnameitem` + +Data type: `Any` + +Zabbix item used for generating hostname if it is undefined. + +Default value: `$zabbix::params::agent_hostnameitem` + +##### `hostmetadata` + +Data type: `Any` + +Optional parameter that defines host metadata. + +Default value: `$zabbix::params::agent_hostmetadata` + +##### `hostmetadataitem` + +Data type: `Any` + +Optional parameter that defines a zabbix item used for getting host metadata. + +Default value: `$zabbix::params::agent_hostmetadataitem` + +##### `hostinterface` + +Data type: `Optional[Stdlib::Fqdn]` + +Optional parameter that defines host metadata. Host metadata is used only at host +auto-registration process (active agent). + +Default value: `$zabbix::params::agent_hostinterface` + +##### `hostinterfaceitem` + +Data type: `Optional[Stdlib::Fqdn]` + +Optional parameter that defines an item used for getting host interface. +Host interface is used at host auto-registration process. + +Default value: `$zabbix::params::agent_hostinterfaceitem` + +##### `refreshactivechecks` + +Data type: `Any` + +How often list of active checks is refreshed, in seconds. + +Default value: `$zabbix::params::agent_refreshactivechecks` + +##### `buffersend` + +Data type: `Any` + +Do not keep data longer than n seconds in buffer. + +Default value: `$zabbix::params::agent_buffersend` + +##### `buffersize` + +Data type: `Any` + +Maximum number of values in a memory buffer. + +Default value: `$zabbix::params::agent_buffersize` + +##### `maxlinespersecond` + +Data type: `Any` + +Maximum number of new lines the agent will send per second to zabbix server or proxy processing. + +Default value: `$zabbix::params::agent_maxlinespersecond` + +##### `allowroot` + +Data type: `Any` + +Allow the agent to run as 'root'. + +Default value: `$zabbix::params::agent_allowroot` + +##### `zabbix_user` + +Data type: `Optional[String[1]]` + +Drop privileges to a specific, existing user on the system. Only has effect if run as 'root' and AllowRoot is disabled. + +Default value: `$zabbix::params::agent_zabbix_user` + +##### `zabbix_alias` + +Data type: `Optional[Array]` + +Sets an alias for parameter. + +Default value: `$zabbix::params::agent_zabbix_alias` + +##### `timeout` + +Data type: `Any` + +Spend no more than timeout seconds on processing. + +Default value: `$zabbix::params::agent_timeout` + +##### `tlsaccept` + +Data type: `Any` + +What incoming connections to accept from Zabbix server. Used for a passive proxy, ignored on an active proxy. + +Default value: `$zabbix::params::agent_tlsaccept` + +##### `tlscafile` + +Data type: `Any` + +Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. + +Default value: `$zabbix::params::agent_tlscafile` + +##### `tlscertfile` + +Data type: `Any` + +Full pathname of a file containing the proxy certificate or certificate chain. + +Default value: `$zabbix::params::agent_tlscertfile` + +##### `tlsconnect` + +Data type: `Any` + +How the proxy should connect to Zabbix server. Used for an active proxy, ignored on a passive proxy. + +Default value: `$zabbix::params::agent_tlsconnect` + +##### `tlscrlfile` + +Data type: `Any` + +Full pathname of a file containing revoked certificates. + +Default value: `$zabbix::params::agent_tlscrlfile` + +##### `tlskeyfile` + +Data type: `Any` + +Full pathname of a file containing the proxy private key. + +Default value: `$zabbix::params::agent_tlskeyfile` + +##### `tlspskfile` + +Data type: `Any` + +Full pathname of a file containing the pre-shared key. + +Default value: `$zabbix::params::agent_tlspskfile` + +##### `tlspskidentity` + +Data type: `Any` + +Unique, case sensitive string used to identify the pre-shared key. + +Default value: `$zabbix::params::agent_tlspskidentity` + +##### `tlscipherall` + +Data type: `Optional[String[1]]` + +GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +for certificate- and PSK-based encryption. + +Default value: `$zabbix::params::agent_tlscipherall` + +##### `tlscipherall13` + +Data type: `Optional[String[1]]` + +Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +for certificate- and PSK-based encryption. + +Default value: `$zabbix::params::agent_tlscipherall13` + +##### `tlsciphercert` + +Data type: `Optional[String[1]]` + +GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +for certificate-based encryption. + +Default value: `$zabbix::params::agent_tlsciphercert` + +##### `tlsciphercert13` + +Data type: `Optional[String[1]]` + +Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +for certificate-based encryption. + +Default value: `$zabbix::params::agent_tlsciphercert13` + +##### `tlscipherpsk` + +Data type: `Optional[String[1]]` + +GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +for PSK-based encryption. + +Default value: `$zabbix::params::agent_tlscipherpsk` + +##### `tlscipherpsk13` + +Data type: `Optional[String[1]]` + +Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +for PSK-based encryption. + +Default value: `$zabbix::params::agent_tlscipherpsk13` + +##### `tlsservercertissuer` + +Data type: `Any` + +Allowed server certificate issuer. + +Default value: `$zabbix::params::agent_tlsservercertissuer` + +##### `tlsservercertsubject` + +Data type: `Any` + +Allowed server certificate subject. + +Default value: `$zabbix::params::agent_tlsservercertsubject` + +##### `agent_config_owner` + +Data type: `Optional[String[1]]` + +The owner of Zabbix's agent config file. + +Default value: `$zabbix::params::agent_config_owner` + +##### `agent_config_group` + +Data type: `Optional[String[1]]` + +The group of Zabbix's agent config file. + +Default value: `$zabbix::params::agent_config_group` + +##### `manage_selinux` + +Data type: `Boolean` + +Whether the module should manage SELinux rules or not. + +Default value: `$zabbix::params::manage_selinux` + +##### `selinux_require` + +Data type: `Array[String]` + +An array of SELinux require {} rules. + +Default value: `$zabbix::params::selinux_require` + +##### `selinux_rules` + +Data type: `Hash[String, Array]` + +A Hash of SELinux rules. + +Default value: `$zabbix::params::selinux_rules` + +##### `additional_service_params` + +Data type: `String` + +Additional parameters to pass to the service. + +Default value: `$zabbix::params::additional_service_params` + +##### `service_type` + +Data type: `String` + +Systemd service type + +Default value: `$zabbix::params::service_type` + +##### `include_dir` + +Data type: `Any` + +You may include individual files or all files in a directory in the configuration file. + +Default value: `$zabbix::params::agent_include` + +##### `include_dir_purge` + +Data type: `Any` + +Include dir to purge. + +Default value: `$zabbix::params::agent_include_purge` + +##### `unsafeuserparameters` + +Data type: `Any` + +Allow all characters to be passed in arguments to user-defined parameters. + +Default value: `$zabbix::params::agent_unsafeuserparameters` + +##### `userparameter` + +Data type: `Any` + +User-defined parameter to monitor. + +Default value: `$zabbix::params::agent_userparameter` + +##### `loadmodulepath` + +Data type: `Optional[String[1]]` + +Full path to location of agent modules. + +Default value: `$zabbix::params::agent_loadmodulepath` + +##### `loadmodule` + +Data type: `Any` + +Module to load at agent startup. + +Default value: `$zabbix::params::agent_loadmodule` + +##### `manage_startup_script` + +Data type: `Boolean` + +If the init script should be managed by this module. Attention: This might +cause problems with some config options of this module (e.g +agent_configfile_path) + +Default value: `$zabbix::params::manage_startup_script` + +### `zabbix::database` + +This will install the correct database and one or more users for correct usage + +#### Examples + +##### The following is an example of an multiple host setup: + +```puppet +node 'wdpuppet04.dj-wasabi.local' { + # class { 'postgresql::server': + # listen_addresses => '192.168.20.14' + # } + class { 'mysql::server': + override_options => { + 'mysqld' => { + 'bind_address' => '192.168.20.14', + }, + }, + } + class { 'zabbix::database': + database_type => 'mysql', + #zabbix_front_ip => '192.168.20.12', + #zabbix_server_ip => '192.168.20.13', + zabbix_server => 'wdpuppet03.dj-wasabi.local', + zabbix_web => 'wdpuppet02.dj-wasabi.local', + } +} + +The above example is when database_type = mysql. When you want to +use the postgresql as database, uncomment the lines of postgresql +class and both *_ip parameters. Comment the mysql class and comment +the zabbix_server and zabbix_web parameter. +``` + +#### Parameters + +The following parameters are available in the `zabbix::database` class: + +* [`zabbix_type`](#zabbix_type) +* [`zabbix_web`](#zabbix_web) +* [`zabbix_web_ip`](#zabbix_web_ip) +* [`zabbix_server`](#zabbix_server) +* [`zabbix_server_ip`](#zabbix_server_ip) +* [`zabbix_proxy`](#zabbix_proxy) +* [`zabbix_proxy_ip`](#zabbix_proxy_ip) +* [`manage_database`](#manage_database) +* [`database_type`](#database_type) +* [`database_schema_path`](#database_schema_path) +* [`database_name`](#database_name) +* [`database_user`](#database_user) +* [`database_password`](#database_password) +* [`database_host`](#database_host) +* [`database_host_ip`](#database_host_ip) +* [`database_charset`](#database_charset) +* [`database_collate`](#database_collate) +* [`database_tablespace`](#database_tablespace) + +##### `zabbix_type` + +Data type: `Any` + +The type of zabbix which is used: server or proxy. +This will determine what sql files will be loaded into database. + +Default value: `'server'` + +##### `zabbix_web` + +Data type: `Any` + +This is the hostname of the server which is running the +zabbix-web package. This parameter is used when database_type = +mysql. When single node: localhost + +Default value: `$zabbix::params::zabbix_web` + +##### `zabbix_web_ip` + +Data type: `Any` + +This is the ip address of the server which is running the +zabbix-web package. This parameter is used when database_type = +postgresql. When single node: 127.0.0.1 + +Default value: `$zabbix::params::zabbix_web_ip` + +##### `zabbix_server` + +Data type: `Any` + +This is the FQDN for the host running zabbix-server. This parameter +is used when database_type = mysql. Default: localhost + +Default value: `$zabbix::params::zabbix_server` + +##### `zabbix_server_ip` + +Data type: `Any` + +This is the actual ip address of the host running zabbix-server +This parameter is used when database_type = postgresql. Default: +127.0.0.1 + +Default value: `$zabbix::params::zabbix_server_ip` + +##### `zabbix_proxy` + +Data type: `Any` + +This is the FQDN for the host running zabbix-proxy. This parameter +is used when database_type = mysql. Default: localhost + +Default value: `$zabbix::params::zabbix_proxy` + +##### `zabbix_proxy_ip` + +Data type: `Any` + +This is the actual ip address of the host running zabbix-proxy +This parameter is used when database_type = postgresql. Default: +127.0.0.1 + +Default value: `$zabbix::params::zabbix_proxy_ip` + +##### `manage_database` + +Data type: `Any` + +When set to true, it will create the database and will load +the sql files for basic setup. Otherwise you should do this manually. + +Default value: `$zabbix::params::manage_database` + +##### `database_type` + +Data type: `Zabbix::Databases` + +The database which is used: postgresql or mysql + +Default value: `$zabbix::params::database_type` + +##### `database_schema_path` + +Data type: `Any` + +The path to the directory containing the .sql schema files + +Default value: `$zabbix::params::database_schema_path` + +##### `database_name` + +Data type: `Any` + +The name of the database. Default: zabbix-server + +Default value: `$zabbix::params::server_database_name` + +##### `database_user` + +Data type: `Any` + +The user which is used for connecting to the database + +Default value: `$zabbix::params::server_database_user` + +##### `database_password` + +Data type: `Any` + +The password of the database_user. + +Default value: `$zabbix::params::server_database_password` + +##### `database_host` + +Data type: `Any` + +The hostname of the server running the database. + +Default value: `$zabbix::params::server_database_host` + +##### `database_host_ip` + +Data type: `Any` + +IP of the machine the database runs on. + +Default value: `$zabbix::params::server_database_host_ip` + +##### `database_charset` + +Data type: `Any` + +The default charset of the database. + +Default value: `$zabbix::params::server_database_charset` + +##### `database_collate` + +Data type: `Any` + +The default collation of the database. + +Default value: `$zabbix::params::server_database_collate` + +##### `database_tablespace` + +Data type: `Optional[String[1]]` + +The tablespace the database will be created in. This setting only affects PostgreSQL databases. + +Default value: `$zabbix::params::server_database_tablespace` + +### `zabbix::database::sqlite` + +Class to handle sqlite database installations zabbix will automatically create a sqlite schema if one does not already exist. + +### `zabbix::javagateway` + +This will install and configure the zabbix-agent deamon + +#### Examples + +##### + +```puppet +class { 'zabbix::javagateway': + zabbix_version => '5.2', +} +``` + +#### Parameters + +The following parameters are available in the `zabbix::javagateway` class: + +* [`zabbix_version`](#zabbix_version) +* [`zabbix_package_state`](#zabbix_package_state) +* [`manage_firewall`](#manage_firewall) +* [`manage_repo`](#manage_repo) +* [`pidfile`](#pidfile) +* [`listenip`](#listenip) +* [`listenport`](#listenport) +* [`startpollers`](#startpollers) +* [`timeout`](#timeout) + +##### `zabbix_version` + +Data type: `Any` + +This is the zabbix version. + +Default value: `$zabbix::params::zabbix_version` + +##### `zabbix_package_state` + +Data type: `Any` + +The state of the package that needs to be installed: present or latest. + +Default value: `$zabbix::params::zabbix_package_state` + +##### `manage_firewall` + +Data type: `Boolean` + +When true, it will create iptables rules. + +Default value: `$zabbix::params::manage_firewall` + +##### `manage_repo` + +Data type: `Boolean` + +When true, it will create repository for installing the javagateway. + +Default value: `$zabbix::params::manage_repo` + +##### `pidfile` + +Data type: `Any` + +Name of pid file. + +Default value: `$zabbix::params::javagateway_pidfile` + +##### `listenip` + +Data type: `Any` + +List of comma delimited ip addresses that the agent should listen on. + +Default value: `$zabbix::params::javagateway_listenip` + +##### `listenport` + +Data type: `Any` + +Agent will listen on this port for connections from the server. + +Default value: `$zabbix::params::javagateway_listenport` + +##### `startpollers` + +Data type: `Any` + +Number of worker threads to start. + +Default value: `$zabbix::params::javagateway_startpollers` + +##### `timeout` + +Data type: `Any` + +Number of worker threads to start. + +Default value: `$zabbix::params::javagateway_timeout` + +### `zabbix::params` + +This class manages zabbix server parameters + +### `zabbix::proxy` + +This will install and configure the zabbix-proxy deamon + +#### Examples + +##### When you want to run everything on one machine, you can use the following: + +```puppet +class { 'zabbix::proxy': + zabbix_server_host => '192.168.1.1', + zabbix_server_port => '10051', +} +``` + +##### When you want to use mysql: + +```puppet +class { 'zabbix::proxy': + zabbix_server_host => '192.168.1.1', + zabbix_server_port => '10051', + database_type => 'mysql', +} +``` + +##### The following is an example of running the proxy on 2 servers: + +```puppet +node 'wdpuppet03.dj-wasabi.local' { + #class { 'postgresql::client': } + class { 'mysql::client': } + class { 'zabbix::proxy': + zabbix_server_host => '192.168.1.1', + manage_database => false, + database_host => 'wdpuppet04.dj-wasabi.local', + database_type => 'mysql', + } +} + +node 'wdpuppet04.dj-wasabi.local' { + #class { 'postgresql::server': + # listen_addresses => '192.168.20.14' + # } + class { 'mysql::server': + override_options => { + 'mysqld' => { + 'bind_address' => '192.168.20.14', + }, + }, + } + class { 'zabbix::database': + database_type => 'mysql', + zabbix_type => 'proxy', + #zabbix_proxy_ip => '192.168.20.13', + zabbix_proxy => 'wdpuppet03.dj-wasabi.local', + database_name => 'zabbix-proxy', + database_user => 'zabbix-proxy', + database_password => 'zabbix-proxy', + } +} +``` + +#### Parameters + +The following parameters are available in the `zabbix::proxy` class: + +* [`database_type`](#database_type) +* [`database_path`](#database_path) +* [`zabbix_version`](#zabbix_version) +* [`zabbix_package_state`](#zabbix_package_state) +* [`manage_database`](#manage_database) +* [`manage_firewall`](#manage_firewall) +* [`manage_repo`](#manage_repo) +* [`manage_resources`](#manage_resources) +* [`manage_service`](#manage_service) +* [`zabbix_proxy`](#zabbix_proxy) +* [`zabbix_proxy_ip`](#zabbix_proxy_ip) +* [`use_ip`](#use_ip) +* [`zbx_templates`](#zbx_templates) +* [`proxy_configfile_path`](#proxy_configfile_path) +* [`proxy_service_name`](#proxy_service_name) +* [`mode`](#mode) +* [`zabbix_server_host`](#zabbix_server_host) +* [`zabbix_server_port`](#zabbix_server_port) +* [`hostname`](#hostname) +* [`listenport`](#listenport) +* [`sourceip`](#sourceip) +* [`enableremotecommands`](#enableremotecommands) +* [`logremotecommands`](#logremotecommands) +* [`logfile`](#logfile) +* [`logfilesize`](#logfilesize) +* [`logtype`](#logtype) +* [`debuglevel`](#debuglevel) +* [`pidfile`](#pidfile) +* [`database_schema_path`](#database_schema_path) +* [`database_host`](#database_host) +* [`database_name`](#database_name) +* [`database_schema`](#database_schema) +* [`database_user`](#database_user) +* [`database_password`](#database_password) +* [`database_socket`](#database_socket) +* [`database_port`](#database_port) +* [`database_tlsconnect`](#database_tlsconnect) +* [`database_tlscafile`](#database_tlscafile) +* [`database_tlscertfile`](#database_tlscertfile) +* [`database_tlskeyfile`](#database_tlskeyfile) +* [`database_tlscipher`](#database_tlscipher) +* [`database_tlscipher13`](#database_tlscipher13) +* [`localbuffer`](#localbuffer) +* [`offlinebuffer`](#offlinebuffer) +* [`heartbeatfrequency`](#heartbeatfrequency) +* [`configfrequency`](#configfrequency) +* [`datasenderfrequency`](#datasenderfrequency) +* [`startpollers`](#startpollers) +* [`startpreprocessors`](#startpreprocessors) +* [`startipmipollers`](#startipmipollers) +* [`startpollersunreachable`](#startpollersunreachable) +* [`starttrappers`](#starttrappers) +* [`startpingers`](#startpingers) +* [`startdiscoverers`](#startdiscoverers) +* [`starthttppollers`](#starthttppollers) +* [`javagateway`](#javagateway) +* [`javagatewayport`](#javagatewayport) +* [`startjavapollers`](#startjavapollers) +* [`startvmwarecollectors`](#startvmwarecollectors) +* [`vmwarefrequency`](#vmwarefrequency) +* [`vmwareperffrequency`](#vmwareperffrequency) +* [`vmwaretimeout`](#vmwaretimeout) +* [`vmwarecachesize`](#vmwarecachesize) +* [`vaultdbpath`](#vaultdbpath) +* [`vaulttoken`](#vaulttoken) +* [`vaulturl`](#vaulturl) +* [`snmptrapperfile`](#snmptrapperfile) +* [`snmptrapper`](#snmptrapper) +* [`listenip`](#listenip) +* [`housekeepingfrequency`](#housekeepingfrequency) +* [`cachesize`](#cachesize) +* [`startdbsyncers`](#startdbsyncers) +* [`historycachesize`](#historycachesize) +* [`historyindexcachesize`](#historyindexcachesize) +* [`historytextcachesize`](#historytextcachesize) +* [`timeout`](#timeout) +* [`tlsaccept`](#tlsaccept) +* [`tlscafile`](#tlscafile) +* [`tlscertfile`](#tlscertfile) +* [`tlsconnect`](#tlsconnect) +* [`tlscrlfile`](#tlscrlfile) +* [`tlskeyfile`](#tlskeyfile) +* [`tlspskfile`](#tlspskfile) +* [`tlspskidentity`](#tlspskidentity) +* [`tlscipherall`](#tlscipherall) +* [`tlscipherall13`](#tlscipherall13) +* [`tlsciphercert`](#tlsciphercert) +* [`tlsciphercert13`](#tlsciphercert13) +* [`tlscipherpsk`](#tlscipherpsk) +* [`tlscipherpsk13`](#tlscipherpsk13) +* [`tlsservercertissuer`](#tlsservercertissuer) +* [`tlsservercertsubject`](#tlsservercertsubject) +* [`trappertimeout`](#trappertimeout) +* [`unreachableperiod`](#unreachableperiod) +* [`unavaliabledelay`](#unavaliabledelay) +* [`unreachabedelay`](#unreachabedelay) +* [`externalscripts`](#externalscripts) +* [`fpinglocation`](#fpinglocation) +* [`fping6location`](#fping6location) +* [`sshkeylocation`](#sshkeylocation) +* [`sslcalocation_dir`](#sslcalocation_dir) +* [`sslcertlocation_dir`](#sslcertlocation_dir) +* [`sslkeylocation_dir`](#sslkeylocation_dir) +* [`logslowqueries`](#logslowqueries) +* [`tmpdir`](#tmpdir) +* [`allowroot`](#allowroot) +* [`include_dir`](#include_dir) +* [`loadmodulepath`](#loadmodulepath) +* [`loadmodule`](#loadmodule) +* [`manage_selinux`](#manage_selinux) +* [`socketdir`](#socketdir) + +##### `database_type` + +Data type: `Zabbix::Databases` + +Type of database. Can use the following 3 databases: postgresql, mysql, sqlite + +Default value: `$zabbix::params::database_type` + +##### `database_path` + +Data type: `Any` + +When database binaries are not found on the default path: +/bin:/usr/bin:/usr/local/sbin:/usr/local/bin +you can use this parameter to add the database_path to the above mentiond +path. + +Default value: `$zabbix::params::database_path` + +##### `zabbix_version` + +Data type: `Any` + +This is the zabbix version. + +Default value: `$zabbix::params::zabbix_version` + +##### `zabbix_package_state` + +Data type: `Any` + +The state of the package that needs to be installed: present or latest. + +Default value: `$zabbix::params::zabbix_package_state` + +##### `manage_database` + +Data type: `Boolean` + +When true, it will configure the database and execute the sql scripts. + +Default value: `$zabbix::params::manage_database` + +##### `manage_firewall` + +Data type: `Boolean` + +When true, it will create iptables rules. + +Default value: `$zabbix::params::manage_firewall` + +##### `manage_repo` + +Data type: `Boolean` + +When true, it will create repository for installing the proxy. + +Default value: `$zabbix::params::manage_repo` + +##### `manage_resources` + +Data type: `Boolean` + +When true, it will export resources so that the zabbix-server can create via the zabbix-api proxy. + +Default value: `$zabbix::params::manage_resources` + +##### `manage_service` + +Data type: `Boolean` + +When true, it will ensure service running and enabled. +When false, it does not care about service + +Default value: `$zabbix::params::manage_service` + +##### `zabbix_proxy` + +Data type: `Any` + +Hostname of zabbix proxy. + +Default value: `$zabbix::params::zabbix_proxy` + +##### `zabbix_proxy_ip` + +Data type: `Any` + +IP of zabbix proxy. + +Default value: `$zabbix::params::zabbix_proxy_ip` + +##### `use_ip` + +Data type: `Any` + +When true, when creating proxies via the zabbix-api, it will configure that +connection should me made via ip, not fqdn. + +Default value: `$zabbix::params::proxy_use_ip` + +##### `zbx_templates` + +Data type: `Any` + +Template which will be added when proxy is configured. + +Default value: `$zabbix::params::proxy_zbx_templates` + +##### `proxy_configfile_path` + +Data type: `Any` + +Proxy config file path defaults to /etc/zabbix/zabbix_proxy.conf + +Default value: `$zabbix::params::proxy_configfile_path` + +##### `proxy_service_name` + +Data type: `Any` + +The service name of Zabbix proxy. + +Default value: `$zabbix::params::proxy_service_name` + +##### `mode` + +Data type: `Any` + +Proxy operating mode. + +Default value: `$zabbix::params::proxy_mode` + +##### `zabbix_server_host` + +Data type: `Any` + +Hostname or the ipaddress of the zabbix-server. + +Default value: `$zabbix::params::proxy_zabbix_server_host` + +##### `zabbix_server_port` + +Data type: `Any` + +Port on which the server is listening. + +Default value: `$zabbix::params::proxy_zabbix_server_port` + +##### `hostname` + +Data type: `Any` + +Hostname for the proxy. Default is $::fqdn or this parameter. + +Default value: `$zabbix::params::proxy_hostname` + +##### `listenport` + +Data type: `Any` + +Listen port for trapper. + +Default value: `$zabbix::params::proxy_listenport` + +##### `sourceip` + +Data type: `Any` + +Source ip address for outgoing connections. + +Default value: `$zabbix::params::proxy_sourceip` + +##### `enableremotecommands` + +Data type: `Integer[0]` + +Whether remote commands from zabbix server are allowed. + +Default value: `$zabbix::params::proxy_enableremotecommands` + +##### `logremotecommands` + +Data type: `Integer[0]` + +Enable logging of executed shell commands as warnings. + +Default value: `$zabbix::params::proxy_logremotecommands` + +##### `logfile` + +Data type: `Optional[Stdlib::Absolutepath]` + +Name of log file. + +Default value: `$zabbix::params::proxy_logfile` + +##### `logfilesize` + +Data type: `Any` + +Maximum size of log file in MB. + +Default value: `$zabbix::params::proxy_logfilesize` + +##### `logtype` + +Data type: `Enum['console', 'file', 'system']` + +Specifies where log messages are written to. Can be one of: console, file, system + +Default value: `$zabbix::params::proxy_logtype` + +##### `debuglevel` + +Data type: `Any` + +Specifies debug level. + +Default value: `$zabbix::params::proxy_debuglevel` + +##### `pidfile` + +Data type: `Any` + +Name of pid file. + +Default value: `$zabbix::params::proxy_pidfile` + +##### `database_schema_path` + +Data type: `Any` + +The path to the directory containing the .sql schema files + +Default value: `$zabbix::params::database_schema_path` + +##### `database_host` + +Data type: `Any` + +Database host name. + +Default value: `$zabbix::params::proxy_database_host` + +##### `database_name` + +Data type: `Any` + +Database name. + +Default value: `$zabbix::params::proxy_database_name` + +##### `database_schema` + +Data type: `Any` + +Schema name. used for ibm db2. + +Default value: `$zabbix::params::proxy_database_schema` + +##### `database_user` + +Data type: `Any` + +Database user. ignored for sqlite. + +Default value: `$zabbix::params::proxy_database_user` + +##### `database_password` + +Data type: `Any` + +Database password. ignored for sqlite. + +Default value: `$zabbix::params::proxy_database_password` + +##### `database_socket` + +Data type: `Any` + +Path to mysql socket. + +Default value: `$zabbix::params::proxy_database_socket` + +##### `database_port` + +Data type: `Any` + +Database port when not using local socket. Ignored for sqlite. + +Default value: `$zabbix::params::proxy_database_port` + +##### `database_tlsconnect` + +Data type: `Optional[Enum['required', 'verify_ca', 'verify_full']]` + +Available options: +* required - connect using TLS +* verify_ca - connect using TLS and verify certificate +* verify_full - connect using TLS, verify certificate and verify that database identity specified by DBHost matches its certificate + +Default value: `$zabbix::params::proxy_database_tlsconnect` + +##### `database_tlscafile` + +Data type: `Optional[Stdlib::Absolutepath]` + +Full pathname of a file containing the top-level CA(s) certificates for database certificate verification. + +Default value: `$zabbix::params::proxy_database_tlscafile` + +##### `database_tlscertfile` + +Data type: `Optional[Stdlib::Absolutepath]` + +Full pathname of file containing Zabbix server certificate for authenticating to database. + +Default value: `$zabbix::params::proxy_database_tlscertfile` + +##### `database_tlskeyfile` + +Data type: `Optional[Stdlib::Absolutepath]` + +Full pathname of file containing the private key for authenticating to database. + +Default value: `$zabbix::params::proxy_database_tlskeyfile` + +##### `database_tlscipher` + +Data type: `Optional[String[1]]` + +The list of encryption ciphers that Zabbix server permits for TLS protocols up through TLSv1.2. + +Default value: `$zabbix::params::proxy_database_tlscipher` + +##### `database_tlscipher13` + +Data type: `Optional[String[1]]` + +The list of encryption ciphersuites that Zabbix server permits for TLSv1.3 protocol. + +Default value: `$zabbix::params::proxy_database_tlscipher13` + +##### `localbuffer` + +Data type: `Any` + +Proxy will keep data locally for N hours, even if the data have already been synced with the server + +Default value: `$zabbix::params::proxy_localbuffer` + +##### `offlinebuffer` + +Data type: `Any` + +Proxy will keep data for N hours in case if no connectivity with Zabbix Server + +Default value: `$zabbix::params::proxy_offlinebuffer` + +##### `heartbeatfrequency` + +Data type: `Any` + +Unique nodeid in distributed setup. + +Default value: `$zabbix::params::proxy_heartbeatfrequency` + +##### `configfrequency` + +Data type: `Any` + +How often proxy retrieves configuration data from Zabbix Server in seconds. + +Default value: `$zabbix::params::proxy_configfrequency` + +##### `datasenderfrequency` + +Data type: `Any` + +Proxy will send collected data to the Server every N seconds. + +Default value: `$zabbix::params::proxy_datasenderfrequency` + +##### `startpollers` + +Data type: `Any` + +Number of pre-forked instances of pollers. + +Default value: `$zabbix::params::proxy_startpollers` + +##### `startpreprocessors` + +Data type: `Integer[1, 1000]` + +Number of pre-forked instances of preprocessing workers + +Default value: `$zabbix::params::proxy_startpreprocessors` + +##### `startipmipollers` + +Data type: `Any` + +Number of pre-forked instances of ipmi pollers. + +Default value: `$zabbix::params::proxy_startipmipollers` + +##### `startpollersunreachable` + +Data type: `Any` + +Number of pre-forked instances of pollers for unreachable hosts (including ipmi). + +Default value: `$zabbix::params::proxy_startpollersunreachable` + +##### `starttrappers` + +Data type: `Any` + +Number of pre-forked instances of trappers. + +Default value: `$zabbix::params::proxy_starttrappers` + +##### `startpingers` + +Data type: `Any` + +Number of pre-forked instances of icmp pingers. + +Default value: `$zabbix::params::proxy_startpingers` + +##### `startdiscoverers` + +Data type: `Any` + +Number of pre-forked instances of discoverers. + +Default value: `$zabbix::params::proxy_startdiscoverers` + +##### `starthttppollers` + +Data type: `Any` + +Number of pre-forked instances of http pollers. + +Default value: `$zabbix::params::proxy_starthttppollers` + +##### `javagateway` + +Data type: `Any` + +IP address (or hostname) of zabbix java gateway. + +Default value: `$zabbix::params::proxy_javagateway` + +##### `javagatewayport` + +Data type: `Any` + +Port that zabbix java gateway listens on. + +Default value: `$zabbix::params::proxy_javagatewayport` + +##### `startjavapollers` + +Data type: `Any` + +Number of pre-forked instances of java pollers. + +Default value: `$zabbix::params::proxy_startjavapollers` + +##### `startvmwarecollectors` + +Data type: `Any` + +Number of pre-forked vmware collector instances. + +Default value: `$zabbix::params::proxy_startvmwarecollectors` + +##### `vmwarefrequency` + +Data type: `Any` + +How often zabbix will connect to vmware service to obtain a new datan. + +Default value: `$zabbix::params::proxy_vmwarefrequency` + +##### `vmwareperffrequency` + +Data type: `Any` + +Delay in seconds between performance counter statistics retrieval from a single VMware service. +This delay should be set to the least update interval of any VMware monitoring item that uses VMware performance counters. + +Default value: `$zabbix::params::proxy_vmwareperffrequency` + +##### `vmwaretimeout` + +Data type: `Any` + +The maximum number of seconds vmware collector will wait for a response from VMware service (vCenter or ESX hypervisor). + +Default value: `$zabbix::params::proxy_vmwaretimeout` + +##### `vmwarecachesize` + +Data type: `Any` + +Size of vmware cache, in bytes. + +Default value: `$zabbix::params::proxy_vmwarecachesize` + +##### `vaultdbpath` + +Data type: `Optional[String[1]]` + +Vault path from where credentials for database will be retrieved by keys 'password' and 'username'. + +Default value: `$zabbix::params::proxy_vaultdbpath` + +##### `vaulttoken` + +Data type: `Optional[String[1]]` + +Vault authentication token that should have been generated exclusively for Zabbix proxy with read-only +permission to the path specified in the optional VaultDBPath configuration parameter. + +Default value: `$zabbix::params::proxy_vaulttoken` + +##### `vaulturl` + +Data type: `Stdlib::HTTPSUrl` + +Vault server HTTP[S] URL. System-wide CA certificates directory will be used if SSLCALocation is not specified. + +Default value: `$zabbix::params::proxy_vaulturl` + +##### `snmptrapperfile` + +Data type: `Any` + +Temporary file used for passing data from snmp trap daemon to the server. + +Default value: `$zabbix::params::proxy_snmptrapperfile` + +##### `snmptrapper` + +Data type: `Any` + +If 1, snmp trapper process is started. + +Default value: `$zabbix::params::proxy_snmptrapper` + +##### `listenip` + +Data type: `Any` + +List of comma delimited ip addresses that the trapper should listen on. + +Default value: `$zabbix::params::proxy_listenip` + +##### `housekeepingfrequency` + +Data type: `Any` + +How often Zabbix will perform housekeeping procedure (in hours). + +Default value: `$zabbix::params::proxy_housekeepingfrequency` + +##### `cachesize` + +Data type: `Any` + +Size of configuration cache, in MB. + +Default value: `$zabbix::params::proxy_cachesize` + +##### `startdbsyncers` + +Data type: `Any` + +Number of pre-forked instances of db syncers. + +Default value: `$zabbix::params::proxy_startdbsyncers` + +##### `historycachesize` + +Data type: `Any` + +Size of history cache, in bytes. + +Default value: `$zabbix::params::proxy_historycachesize` + +##### `historyindexcachesize` + +Data type: `Any` + +Size of history index cache, in bytes. + +Default value: `$zabbix::params::proxy_historyindexcachesize` + +##### `historytextcachesize` + +Data type: `Any` + +Size of text history cache, in bytes. + +Default value: `$zabbix::params::proxy_historytextcachesize` + +##### `timeout` + +Data type: `Any` + +Specifies how long we wait for agent, snmp device or external check (in seconds). + +Default value: `$zabbix::params::proxy_timeout` + +##### `tlsaccept` + +Data type: `Any` + +What incoming connections to accept from Zabbix server. Used for a passive proxy, ignored on an active proxy. + +Default value: `$zabbix::params::proxy_tlsaccept` + +##### `tlscafile` + +Data type: `Any` + +Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. + +Default value: `$zabbix::params::proxy_tlscafile` + +##### `tlscertfile` + +Data type: `Any` + +Full pathname of a file containing the proxy certificate or certificate chain. + +Default value: `$zabbix::params::proxy_tlscertfile` + +##### `tlsconnect` + +Data type: `Any` + +How the proxy should connect to Zabbix server. Used for an active proxy, ignored on a passive proxy. + +Default value: `$zabbix::params::proxy_tlsconnect` + +##### `tlscrlfile` + +Data type: `Any` + +Full pathname of a file containing revoked certificates. + +Default value: `$zabbix::params::proxy_tlscrlfile` + +##### `tlskeyfile` + +Data type: `Any` + +Full pathname of a file containing the proxy private key. + +Default value: `$zabbix::params::proxy_tlskeyfile` + +##### `tlspskfile` + +Data type: `Any` + +Full pathname of a file containing the pre-shared key. + +Default value: `$zabbix::params::proxy_tlspskfile` + +##### `tlspskidentity` + +Data type: `Any` + +Unique, case sensitive string used to identify the pre-shared key. + +Default value: `$zabbix::params::proxy_tlspskidentity` + +##### `tlscipherall` + +Data type: `Optional[String[1]]` + +GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +for certificate- and PSK-based encryption. + +Default value: `$zabbix::params::proxy_tlscipherall` + +##### `tlscipherall13` + +Data type: `Optional[String[1]]` + +Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +for certificate- and PSK-based encryption. + +Default value: `$zabbix::params::proxy_tlscipherall13` + +##### `tlsciphercert` + +Data type: `Optional[String[1]]` + +GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +for certificate-based encryption. + +Default value: `$zabbix::params::proxy_tlsciphercert` + +##### `tlsciphercert13` + +Data type: `Optional[String[1]]` + +Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +for certificate-based encryption. + +Default value: `$zabbix::params::proxy_tlsciphercert13` + +##### `tlscipherpsk` + +Data type: `Optional[String[1]]` + +GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +for PSK-based encryption. + +Default value: `$zabbix::params::proxy_tlscipherpsk` + +##### `tlscipherpsk13` + +Data type: `Optional[String[1]]` + +Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +for PSK-based encryption. + +Default value: `$zabbix::params::proxy_tlscipherpsk13` + +##### `tlsservercertissuer` + +Data type: `Any` + +Allowed server certificate issuer. + +Default value: `$zabbix::params::proxy_tlsservercertissuer` + +##### `tlsservercertsubject` + +Data type: `Any` + +Allowed server certificate subject. + +Default value: `$zabbix::params::proxy_tlsservercertsubject` + +##### `trappertimeout` + +Data type: `Any` + +Specifies how many seconds trapper may spend processing new data. + +Default value: `$zabbix::params::proxy_trappertimeout` + +##### `unreachableperiod` + +Data type: `Any` + +After how many seconds of unreachability treat a host as unavailable. + +Default value: `$zabbix::params::proxy_unreachableperiod` + +##### `unavaliabledelay` + +Data type: `Any` + +How often host is checked for availability during the unavailability period, in seconds. + +Default value: `$zabbix::params::proxy_unavaliabledelay` + +##### `unreachabedelay` + +Data type: `Any` + +How often host is checked for availability during the unreachability period, in seconds. + +Default value: `$zabbix::params::proxy_unreachabedelay` + +##### `externalscripts` + +Data type: `Any` + +Full path to location of external scripts. + +Default value: `$zabbix::params::proxy_externalscripts` + +##### `fpinglocation` + +Data type: `Any` + +Location of fping. + +Default value: `$zabbix::params::proxy_fpinglocation` + +##### `fping6location` + +Data type: `Any` + +Location of fping6. + +Default value: `$zabbix::params::proxy_fping6location` + +##### `sshkeylocation` + +Data type: `Any` + +Location of public and private keys for ssh checks and actions. + +Default value: `$zabbix::params::proxy_sshkeylocation` + +##### `sslcalocation_dir` + +Data type: `Optional[Stdlib::Absolutepath]` + +Location of certificate authority (CA) files for SSL server certificate verification. + +Default value: `$zabbix::params::proxy_sslcalocation` + +##### `sslcertlocation_dir` + +Data type: `Optional[Stdlib::Absolutepath]` + +Location of SSL client certificate files for client authentication. + +Default value: `$zabbix::params::proxy_sslcertlocation` + +##### `sslkeylocation_dir` + +Data type: `Optional[Stdlib::Absolutepath]` + +Location of SSL private key files for client authentication. + +Default value: `$zabbix::params::proxy_sslkeylocation` + +##### `logslowqueries` + +Data type: `Any` + +How long a database query may take before being logged (in milliseconds). + +Default value: `$zabbix::params::proxy_logslowqueries` + +##### `tmpdir` + +Data type: `Any` + +Temporary directory. + +Default value: `$zabbix::params::proxy_tmpdir` + +##### `allowroot` + +Data type: `Any` + +Allow the server to run as 'root'. + +Default value: `$zabbix::params::proxy_allowroot` + +##### `include_dir` + +Data type: `Any` + +You may include individual files or all files in a directory in the configuration file. + +Default value: `$zabbix::params::proxy_include` + +##### `loadmodulepath` + +Data type: `Any` + +Full path to location of server modules. + +Default value: `$zabbix::params::proxy_loadmodulepath` + +##### `loadmodule` + +Data type: `Any` + +Module to load at server startup. + +Default value: `$zabbix::params::proxy_loadmodule` + +##### `manage_selinux` + +Data type: `Boolean` + +Whether we should manage SELinux rules. + +Default value: `$zabbix::params::manage_selinux` + +##### `socketdir` + +Data type: `Optional[Stdlib::Absolutepath]` + +IPC socket directory. Directory to store IPC sockets used by internal Zabbix services. + +Default value: `$zabbix::params::proxy_socketdir` + +### `zabbix::repo` + +If enabled, this will install the repository used for installing zabbix + +#### Parameters + +The following parameters are available in the `zabbix::repo` class: + +* [`manage_repo`](#manage_repo) +* [`manage_apt`](#manage_apt) +* [`zabbix_version`](#zabbix_version) +* [`repo_location`](#repo_location) +* [`frontend_repo_location`](#frontend_repo_location) +* [`unsupported_repo_location`](#unsupported_repo_location) + +##### `manage_repo` + +Data type: `Boolean` + +When true, it will create repository for installing the server. + +Default value: `$zabbix::params::manage_repo` + +##### `manage_apt` + +Data type: `Boolean` + +Whether the module should manage apt repositories for Debian based systems. + +Default value: `$zabbix::params::manage_apt` + +##### `zabbix_version` + +Data type: `String[1]` + +This is the zabbix version. + +Default value: `$zabbix::params::zabbix_version` + +##### `repo_location` + +Data type: `Optional[Stdlib::HTTPUrl]` + +A custom repo location (e.g. your own mirror) + +Default value: `$zabbix::params::repo_location` + +##### `frontend_repo_location` + +Data type: `Optional[Stdlib::HTTPUrl]` + +A custom repo location for frontend package. + +Default value: `$zabbix::params::frontend_repo_location` + +##### `unsupported_repo_location` + +Data type: `Optional[Stdlib::HTTPUrl]` + +A custom repo location for unsupported content (e.g. your own mirror) +Currently only supported under RedHat based systems. + +Default value: `$zabbix::params::unsupported_repo_location` + +### `zabbix::resources::agent` + +This will create resources into puppetdb for automatically configuring agent into zabbix front-end. + +#### Parameters + +The following parameters are available in the `zabbix::resources::agent` class: + +* [`hostname`](#hostname) +* [`ipaddress`](#ipaddress) +* [`use_ip`](#use_ip) +* [`port`](#port) +* [`group`](#group) +* [`groups`](#groups) +* [`group_create`](#group_create) +* [`templates`](#templates) +* [`macros`](#macros) +* [`proxy`](#proxy) +* [`interfacetype`](#interfacetype) + +##### `hostname` + +Data type: `Any` + +Hostname of the machine + +Default value: ``undef`` + +##### `ipaddress` + +Data type: `Any` + +The IP address of the machine running zabbix agent. + +Default value: ``undef`` + +##### `use_ip` + +Data type: `Any` + +Use ipadress instead of dns to connect. + +Default value: ``undef`` + +##### `port` + +Data type: `Any` + +The port that the zabbix agent is listening on. + +Default value: ``undef`` + +##### `group` + +Data type: `Any` + +*Deprecated* (see groups parameter) Name of the hostgroup. + +Default value: ``undef`` + +##### `groups` + +Data type: `Array[String[1]]` + +An array of groups the host belongs to. + +Default value: ``undef`` + +##### `group_create` + +Data type: `Any` + +Whether to create hostgroup if missing. + +Default value: ``undef`` + +##### `templates` + +Data type: `Any` + +List of templates which should be attached to this host. + +Default value: ``undef`` + +##### `macros` + +Data type: `Any` + +Array of hashes (macros) which should be attached to this host. + +Default value: ``undef`` + +##### `proxy` + +Data type: `Any` + +Whether it is monitored by an proxy or not. + +Default value: ``undef`` + +##### `interfacetype` + +Data type: `Any` + +Internally used identifier for the host interface + +Default value: `1` + +### `zabbix::resources::proxy` + +This will create resources into puppetdb for automatically configuring proxy agent into zabbix front-end. + +#### Parameters + +The following parameters are available in the `zabbix::resources::proxy` class: + +* [`hostname`](#hostname) +* [`ipaddress`](#ipaddress) +* [`use_ip`](#use_ip) +* [`mode`](#mode) +* [`port`](#port) + +##### `hostname` + +Data type: `Any` + +Hostname of the proxy. + +Default value: ``undef`` + +##### `ipaddress` + +Data type: `Any` + +The IP address of the machine running zabbix proxy. + +Default value: ``undef`` + +##### `use_ip` + +Data type: `Any` + +Whether to use ipadress instead of dns to connect. + +Default value: ``undef`` + +##### `mode` + +Data type: `Any` + +The kind of mode the proxy running. Active (0) or passive (1). + +Default value: ``undef`` + +##### `port` + +Data type: `Any` + +The port that the zabbix proxy is listening on. + +Default value: ``undef`` + +### `zabbix::resources::web` + +This will load all zabbix related items from the puppet database and uses the zabbixapi gem to add/configure hosts via the zabbix-api + +#### Parameters + +The following parameters are available in the `zabbix::resources::web` class: + +* [`zabbix_url`](#zabbix_url) +* [`zabbix_user`](#zabbix_user) +* [`zabbix_pass`](#zabbix_pass) +* [`apache_use_ssl`](#apache_use_ssl) + +##### `zabbix_url` + +Data type: `String[1]` + +Url on which zabbix is available. + +##### `zabbix_user` + +Data type: `String[1]` + +API username. + +##### `zabbix_pass` + +Data type: `String[1]` + +API password. + +##### `apache_use_ssl` + +Data type: `Boolean` + +Whether to use ssl or not. + +### `zabbix::sender` + +This will install and configure the zabbix-agent deamon + +#### Parameters + +The following parameters are available in the `zabbix::sender` class: + +* [`zabbix_version`](#zabbix_version) +* [`zabbix_package_state`](#zabbix_package_state) +* [`manage_repo`](#manage_repo) + +##### `zabbix_version` + +Data type: `Any` + +This is the zabbix version. + +Default value: `$zabbix::params::zabbix_version` + +##### `zabbix_package_state` + +Data type: `Any` + +The state of the package that needs to be installed: present or latest. + +Default value: `$zabbix::params::zabbix_package_state` + +##### `manage_repo` + +Data type: `Any` + +When true, it will create repository for installing the agent. + +Default value: `$zabbix::params::manage_repo` + +### `zabbix::server` + +This will install and configure the zabbix-server deamon + +#### Examples + +##### + +```puppet +When running everything on a single node, please check +documentation in init.pp +The following is an example of an multiple host setup: + +node 'wdpuppet03.dj-wasabi.local' { + #class { 'postgresql::client': } + class { 'mysql::client': } + class { 'zabbix::server': + zabbix_version => '2.4', + database_host => 'wdpuppet04.dj-wasabi.local', + database_type => 'mysql', + } +} + +The setup of above shows an configuration which used mysql as database. +It will require the database "client" classes, this is needed for executing +the installation files. + +When database_type = postgres, uncomment the postgresql::client class and change or +remove the database_type parameter and comment the mysql::client class. +``` + +#### Parameters + +The following parameters are available in the `zabbix::server` class: + +* [`database_type`](#database_type) +* [`database_path`](#database_path) +* [`zabbix_version`](#zabbix_version) +* [`manage_repo`](#manage_repo) +* [`manage_database`](#manage_database) +* [`zabbix_package_state`](#zabbix_package_state) +* [`manage_firewall`](#manage_firewall) +* [`manage_service`](#manage_service) +* [`server_configfile_path`](#server_configfile_path) +* [`server_config_owner`](#server_config_owner) +* [`server_config_group`](#server_config_group) +* [`server_service_name`](#server_service_name) +* [`pacemaker`](#pacemaker) +* [`pacemaker_resource`](#pacemaker_resource) +* [`listenport`](#listenport) +* [`sourceip`](#sourceip) +* [`logfile`](#logfile) +* [`logfilesize`](#logfilesize) +* [`logtype`](#logtype) +* [`debuglevel`](#debuglevel) +* [`pidfile`](#pidfile) +* [`database_schema_path`](#database_schema_path) +* [`database_host`](#database_host) +* [`database_name`](#database_name) +* [`database_schema`](#database_schema) +* [`database_user`](#database_user) +* [`database_password`](#database_password) +* [`database_socket`](#database_socket) +* [`database_port`](#database_port) +* [`database_tlsconnect`](#database_tlsconnect) +* [`database_tlscafile`](#database_tlscafile) +* [`database_tlscertfile`](#database_tlscertfile) +* [`database_tlskeyfile`](#database_tlskeyfile) +* [`database_tlscipher`](#database_tlscipher) +* [`database_tlscipher13`](#database_tlscipher13) +* [`startpollers`](#startpollers) +* [`startpreprocessors`](#startpreprocessors) +* [`startipmipollers`](#startipmipollers) +* [`startpollersunreachable`](#startpollersunreachable) +* [`starttrappers`](#starttrappers) +* [`startpingers`](#startpingers) +* [`startalerters`](#startalerters) +* [`startdiscoverers`](#startdiscoverers) +* [`startescalators`](#startescalators) +* [`starthttppollers`](#starthttppollers) +* [`starttimers`](#starttimers) +* [`javagateway`](#javagateway) +* [`javagatewayport`](#javagatewayport) +* [`startjavapollers`](#startjavapollers) +* [`startlldprocessors`](#startlldprocessors) +* [`startvmwarecollectors`](#startvmwarecollectors) +* [`vmwarefrequency`](#vmwarefrequency) +* [`vaultdbpath`](#vaultdbpath) +* [`vaulttoken`](#vaulttoken) +* [`vaulturl`](#vaulturl) +* [`vmwarecachesize`](#vmwarecachesize) +* [`vmwaretimeout`](#vmwaretimeout) +* [`snmptrapperfile`](#snmptrapperfile) +* [`startsnmptrapper`](#startsnmptrapper) +* [`listenip`](#listenip) +* [`housekeepingfrequency`](#housekeepingfrequency) +* [`maxhousekeeperdelete`](#maxhousekeeperdelete) +* [`cachesize`](#cachesize) +* [`cacheupdatefrequency`](#cacheupdatefrequency) +* [`startdbsyncers`](#startdbsyncers) +* [`historycachesize`](#historycachesize) +* [`historyindexcachesize`](#historyindexcachesize) +* [`trendcachesize`](#trendcachesize) +* [`valuecachesize`](#valuecachesize) +* [`timeout`](#timeout) +* [`tlscafile`](#tlscafile) +* [`tlscertfile`](#tlscertfile) +* [`tlscrlfile`](#tlscrlfile) +* [`tlskeyfile`](#tlskeyfile) +* [`tlscipherall`](#tlscipherall) +* [`tlscipherall13`](#tlscipherall13) +* [`tlsciphercert`](#tlsciphercert) +* [`tlsciphercert13`](#tlsciphercert13) +* [`tlscipherpsk`](#tlscipherpsk) +* [`tlscipherpsk13`](#tlscipherpsk13) +* [`trappertimeout`](#trappertimeout) +* [`unreachableperiod`](#unreachableperiod) +* [`unavailabledelay`](#unavailabledelay) +* [`unreachabledelay`](#unreachabledelay) +* [`alertscriptspath`](#alertscriptspath) +* [`externalscripts`](#externalscripts) +* [`fpinglocation`](#fpinglocation) +* [`fping6location`](#fping6location) +* [`sshkeylocation`](#sshkeylocation) +* [`logslowqueries`](#logslowqueries) +* [`tmpdir`](#tmpdir) +* [`startproxypollers`](#startproxypollers) +* [`proxyconfigfrequency`](#proxyconfigfrequency) +* [`proxydatafrequency`](#proxydatafrequency) +* [`allowroot`](#allowroot) +* [`include_dir`](#include_dir) +* [`loadmodulepath`](#loadmodulepath) +* [`loadmodule`](#loadmodule) +* [`sslcertlocation_dir`](#sslcertlocation_dir) +* [`sslkeylocation_dir`](#sslkeylocation_dir) +* [`manage_selinux`](#manage_selinux) +* [`additional_service_params`](#additional_service_params) +* [`zabbix_user`](#zabbix_user) +* [`manage_startup_script`](#manage_startup_script) +* [`socketdir`](#socketdir) + +##### `database_type` + +Data type: `Zabbix::Databases` + +Type of database. Can use the following 2 databases: +- postgresql +- mysql + +Default value: `$zabbix::params::database_type` + +##### `database_path` + +Data type: `Any` + +When database binaries are not found on the default path: +/bin:/usr/bin:/usr/local/sbin:/usr/local/bin +you can use this parameter to add the database_path to the above mentioned +path. + +Default value: `$zabbix::params::database_path` + +##### `zabbix_version` + +Data type: `Any` + +This is the zabbix version. Example: 5.0 + +Default value: `$zabbix::params::zabbix_version` + +##### `manage_repo` + +Data type: `Boolean` + +When true (default) this module will manage the Zabbix repository. + +Default value: `$zabbix::params::manage_repo` + +##### `manage_database` + +Data type: `Boolean` + +When true, it will configure the database and execute the sql scripts. + +Default value: `$zabbix::params::manage_database` + +##### `zabbix_package_state` + +Data type: `Any` + +The state of the package that needs to be installed: present or latest. + +Default value: `$zabbix::params::zabbix_package_state` + +##### `manage_firewall` + +Data type: `Boolean` + +When true, it will create iptables rules. + +Default value: `$zabbix::params::manage_firewall` + +##### `manage_service` + +Data type: `Boolean` + +When true, it will ensure service running and enabled. +When false, it does not care about service + +Default value: `$zabbix::params::manage_service` + +##### `server_configfile_path` + +Data type: `Any` + +Server config file path defaults to /etc/zabbix/zabbix_server.conf + +Default value: `$zabbix::params::server_configfile_path` + +##### `server_config_owner` + +Data type: `Any` + +The owner of Zabbix's server config file. + +Default value: `$zabbix::params::server_config_owner` + +##### `server_config_group` + +Data type: `Any` + +The group of Zabbix's server config file. + +Default value: `$zabbix::params::server_config_group` + +##### `server_service_name` + +Data type: `Any` + +The service name of Zabbix server. + +Default value: `$zabbix::params::server_service_name` + +##### `pacemaker` + +Data type: `Any` + +Whether to control zabbix server through Pacemaker. + +Default value: `$zabbix::params::server_pacemaker` + +##### `pacemaker_resource` + +Data type: `Any` + +Zabbix server pacemaker resource. + +Default value: `$zabbix::params::server_pacemaker_resource` + +##### `listenport` + +Data type: `Any` + +Listen port for the zabbix-server. Default: 10051 + +Default value: `$zabbix::params::server_listenport` + +##### `sourceip` + +Data type: `Any` + +Source ip address for outgoing connections. + +Default value: `$zabbix::params::server_sourceip` + +##### `logfile` + +Data type: `Optional[Stdlib::Absolutepath]` + +Name of log file. + +Default value: `$zabbix::params::server_logfile` + +##### `logfilesize` + +Data type: `Any` + +Maximum size of log file in MB. + +Default value: `$zabbix::params::server_logfilesize` + +##### `logtype` + +Data type: `Enum['console', 'file', 'system']` + +Specifies where log messages are written to. (options: console, file, system) + +Default value: `$zabbix::params::server_logtype` + +##### `debuglevel` + +Data type: `Any` + +Specifies debug level. + +Default value: `$zabbix::params::server_debuglevel` + +##### `pidfile` + +Data type: `Any` + +Name of pid file. + +Default value: `$zabbix::params::server_pidfile` + +##### `database_schema_path` + +Data type: `Any` + +The path to the directory containing the .sql schema files + +Default value: `$zabbix::params::database_schema_path` + +##### `database_host` + +Data type: `Any` + +Database host name. + +Default value: `$zabbix::params::server_database_host` + +##### `database_name` + +Data type: `Any` + +Database name. + +Default value: `$zabbix::params::server_database_name` + +##### `database_schema` + +Data type: `Any` + +Schema name. used for ibm db2. + +Default value: `$zabbix::params::server_database_schema` + +##### `database_user` + +Data type: `Any` + +Database user. ignored for sqlite. + +Default value: `$zabbix::params::server_database_user` + +##### `database_password` + +Data type: `Any` + +Database password. ignored for sqlite. + +Default value: `$zabbix::params::server_database_password` + +##### `database_socket` + +Data type: `Any` + +Path to mysql socket. + +Default value: `$zabbix::params::server_database_socket` + +##### `database_port` + +Data type: `Optional[Stdlib::Port::Unprivileged]` + +Database port when not using local socket. Ignored for sqlite. + +Default value: `$zabbix::params::server_database_port` + +##### `database_tlsconnect` + +Data type: `Optional[Enum['required', 'verify_ca', 'verify_full']]` + +Available options: +* required - connect using TLS +* verify_ca - connect using TLS and verify certificate +* verify_full - connect using TLS, verify certificate and verify that database identity specified by DBHost matches its certificate + +Default value: `$zabbix::params::server_database_tlsconnect` + +##### `database_tlscafile` + +Data type: `Optional[Stdlib::Absolutepath]` + +Full pathname of a file containing the top-level CA(s) certificates for database certificate verification. + +Default value: `$zabbix::params::server_database_tlscafile` + +##### `database_tlscertfile` + +Data type: `Optional[Stdlib::Absolutepath]` + +Full pathname of file containing Zabbix server certificate for authenticating to database. + +Default value: `$zabbix::params::server_database_tlscertfile` + +##### `database_tlskeyfile` + +Data type: `Optional[Stdlib::Absolutepath]` + +Full pathname of file containing the private key for authenticating to database. + +Default value: `$zabbix::params::server_database_tlskeyfile` + +##### `database_tlscipher` + +Data type: `Optional[String[1]]` + +The list of encryption ciphers that Zabbix server permits for TLS protocols up through TLSv1.2. + +Default value: `$zabbix::params::server_database_tlscipher` + +##### `database_tlscipher13` + +Data type: `Optional[String[1]]` + +The list of encryption ciphersuites that Zabbix server permits for TLSv1.3 protocol. + +Default value: `$zabbix::params::server_database_tlscipher13` + +##### `startpollers` + +Data type: `Any` + +Number of pre-forked instances of pollers. + +Default value: `$zabbix::params::server_startpollers` + +##### `startpreprocessors` + +Data type: `Integer[1, 1000]` + +Number of pre-forked instances of preprocessing workers + +Default value: `$zabbix::params::server_startpreprocessors` + +##### `startipmipollers` + +Data type: `Any` + +Number of pre-forked instances of ipmi pollers. + +Default value: `$zabbix::params::server_startipmipollers` + +##### `startpollersunreachable` + +Data type: `Any` + +Number of pre-forked instances of pollers for unreachable hosts (including ipmi). + +Default value: `$zabbix::params::server_startpollersunreachable` + +##### `starttrappers` + +Data type: `Any` + +Number of pre-forked instances of trappers. + +Default value: `$zabbix::params::server_starttrappers` + +##### `startpingers` + +Data type: `Any` + +Number of pre-forked instances of icmp pingers. + +Default value: `$zabbix::params::server_startpingers` + +##### `startalerters` + +Data type: `Integer[1, 100]` + +Number of pre-forked instances of alerters. + +Default value: `$zabbix::params::server_startalerters` + +##### `startdiscoverers` + +Data type: `Any` + +Number of pre-forked instances of discoverers. + +Default value: `$zabbix::params::server_startdiscoverers` + +##### `startescalators` + +Data type: `Integer[1, 100]` + +Number of pre-forked instances of escalators. + +Default value: `$zabbix::params::server_startescalators` + +##### `starthttppollers` + +Data type: `Any` + +Number of pre-forked instances of http pollers. + +Default value: `$zabbix::params::server_starthttppollers` + +##### `starttimers` + +Data type: `Any` + +Number of pre-forked instances of timers. + +Default value: `$zabbix::params::server_starttimers` + +##### `javagateway` + +Data type: `Any` + +IP address (or hostname) of zabbix java gateway. + +Default value: `$zabbix::params::server_javagateway` + +##### `javagatewayport` + +Data type: `Any` + +Port that zabbix java gateway listens on. + +Default value: `$zabbix::params::server_javagatewayport` + +##### `startjavapollers` + +Data type: `Any` + +Number of pre-forked instances of java pollers. + +Default value: `$zabbix::params::server_startjavapollers` + +##### `startlldprocessors` + +Data type: `Integer[1, 100]` + +Number of pre-forked instances of low-level discovery (LLD) workers. + +Default value: `$zabbix::params::server_startlldprocessors` + +##### `startvmwarecollectors` + +Data type: `Any` + +Number of pre-forked vmware collector instances. + +Default value: `$zabbix::params::server_startvmwarecollectors` + +##### `vmwarefrequency` + +Data type: `Any` + +How often zabbix will connect to vmware service to obtain a new datan. + +Default value: `$zabbix::params::server_vmwarefrequency` + +##### `vaultdbpath` + +Data type: `Optional[String[1]]` + +Vault path from where credentials for database will be retrieved by keys 'password' and 'username'. + +Default value: `$zabbix::params::server_vaultdbpath` + +##### `vaulttoken` + +Data type: `Optional[String[1]]` + +Vault authentication token that should have been generated exclusively for Zabbix proxy with read-only +permission to the path specified in the optional VaultDBPath configuration parameter. + +Default value: `$zabbix::params::server_vaulttoken` + +##### `vaulturl` + +Data type: `Stdlib::HTTPSUrl` + +Vault server HTTP[S] URL. System-wide CA certificates directory will be used if SSLCALocation is not specified. + +Default value: `$zabbix::params::server_vaulturl` + +##### `vmwarecachesize` + +Data type: `Any` + +Size of vmware cache, in bytes. + +Default value: `$zabbix::params::server_vmwarecachesize` + +##### `vmwaretimeout` + +Data type: `Any` + +The maximum number of seconds vmware collector will wait for a response from VMware service. + +Default value: `$zabbix::params::server_vmwaretimeout` + +##### `snmptrapperfile` + +Data type: `Any` + +Temporary file used for passing data from snmp trap daemon to the server. + +Default value: `$zabbix::params::server_snmptrapperfile` + +##### `startsnmptrapper` + +Data type: `Any` + +If 1, snmp trapper process is started. + +Default value: `$zabbix::params::server_startsnmptrapper` + +##### `listenip` + +Data type: `Any` + +List of comma delimited ip addresses that the zabbix-server should listen on. + +Default value: `$zabbix::params::server_listenip` + +##### `housekeepingfrequency` + +Data type: `Any` + +How often zabbix will perform housekeeping procedure (in hours). + +Default value: `$zabbix::params::server_housekeepingfrequency` + +##### `maxhousekeeperdelete` + +Data type: `Any` + +the table "housekeeper" contains "tasks" for housekeeping procedure in the format: +[housekeeperid], [tablename], [field], [value]. +no more than 'maxhousekeeperdelete' rows (corresponding to [tablename], [field], [value]) +will be deleted per one task in one housekeeping cycle. +sqlite3 does not use this parameter, deletes all corresponding rows without a limit. +if set to 0 then no limit is used at all. in this case you must know what you are doing! + +Default value: `$zabbix::params::server_maxhousekeeperdelete` + +##### `cachesize` + +Data type: `Any` + +Size of configuration cache, in bytes. + +Default value: `$zabbix::params::server_cachesize` + +##### `cacheupdatefrequency` + +Data type: `Any` + +How often zabbix will perform update of configuration cache, in seconds. + +Default value: `$zabbix::params::server_cacheupdatefrequency` + +##### `startdbsyncers` + +Data type: `Any` + +Number of pre-forked instances of db syncers. + +Default value: `$zabbix::params::server_startdbsyncers` + +##### `historycachesize` + +Data type: `Any` + +Size of history cache, in bytes. + +Default value: `$zabbix::params::server_historycachesize` + +##### `historyindexcachesize` + +Data type: `Any` + +Size of history index cache, in bytes. + +Default value: `$zabbix::params::server_historyindexcachesize` + +##### `trendcachesize` + +Data type: `Any` + +Size of trend cache, in bytes. + +Default value: `$zabbix::params::server_trendcachesize` + +##### `valuecachesize` + +Data type: `Any` + +Size of history value cache, in bytes. + +Default value: `$zabbix::params::server_valuecachesize` + +##### `timeout` + +Data type: `Any` + +Specifies how long we wait for agent, snmp device or external check (in seconds). + +Default value: `$zabbix::params::server_timeout` + +##### `tlscafile` + +Data type: `Any` + +Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. + +Default value: `$zabbix::params::server_tlscafile` + +##### `tlscertfile` + +Data type: `Any` + +Full pathname of a file containing the server certificate or certificate chain. + +Default value: `$zabbix::params::server_tlscertfile` + +##### `tlscrlfile` + +Data type: `Any` + +Full pathname of a file containing revoked certificates. + +Default value: `$zabbix::params::server_tlscrlfile` + +##### `tlskeyfile` + +Data type: `Any` + +Full pathname of a file containing the server private key. + +Default value: `$zabbix::params::server_tlskeyfile` + +##### `tlscipherall` + +Data type: `Optional[String[1]]` + +GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +for certificate- and PSK-based encryption. + +Default value: `$zabbix::params::server_tlscipherall` + +##### `tlscipherall13` + +Data type: `Optional[String[1]]` + +Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +for certificate- and PSK-based encryption. + +Default value: `$zabbix::params::server_tlscipherall13` + +##### `tlsciphercert` + +Data type: `Optional[String[1]]` + +GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +for certificate-based encryption. + +Default value: `$zabbix::params::server_tlsciphercert` + +##### `tlsciphercert13` + +Data type: `Optional[String[1]]` + +Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +for certificate-based encryption. + +Default value: `$zabbix::params::server_tlsciphercert13` + +##### `tlscipherpsk` + +Data type: `Optional[String[1]]` + +GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +for PSK-based encryption. + +Default value: `$zabbix::params::server_tlscipherpsk` + +##### `tlscipherpsk13` + +Data type: `Optional[String[1]]` + +Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +for PSK-based encryption. + +Default value: `$zabbix::params::server_tlscipherpsk13` + +##### `trappertimeout` + +Data type: `Any` + +Specifies how many seconds trapper may spend processing new data. + +Default value: `$zabbix::params::server_trappertimeout` + +##### `unreachableperiod` + +Data type: `Any` + +After how many seconds of unreachability treat a host as unavailable. + +Default value: `$zabbix::params::server_unreachableperiod` + +##### `unavailabledelay` + +Data type: `Any` + +How often host is checked for availability during the unavailability period, in seconds. + +Default value: `$zabbix::params::server_unavailabledelay` + +##### `unreachabledelay` + +Data type: `Any` + +How often host is checked for availability during the unreachability period, in seconds. + +Default value: `$zabbix::params::server_unreachabledelay` + +##### `alertscriptspath` + +Data type: `Any` + +Full path to location of custom alert scripts. + +Default value: `$zabbix::params::server_alertscriptspath` + +##### `externalscripts` + +Data type: `Any` + +Full path to location of external scripts. + +Default value: `$zabbix::params::server_externalscripts` + +##### `fpinglocation` + +Data type: `Any` + +Location of fping. + +Default value: `$zabbix::params::server_fpinglocation` + +##### `fping6location` + +Data type: `Any` + +Location of fping6. + +Default value: `$zabbix::params::server_fping6location` + +##### `sshkeylocation` + +Data type: `Any` + +Location of public and private keys for ssh checks and actions. + +Default value: `$zabbix::params::server_sshkeylocation` + +##### `logslowqueries` + +Data type: `Any` + +How long a database query may take before being logged (in milliseconds). + +Default value: `$zabbix::params::server_logslowqueries` + +##### `tmpdir` + +Data type: `Any` + +Temporary directory. + +Default value: `$zabbix::params::server_tmpdir` + +##### `startproxypollers` + +Data type: `Any` + +Number of pre-forked instances of pollers for passive proxies. + +Default value: `$zabbix::params::server_startproxypollers` + +##### `proxyconfigfrequency` + +Data type: `Any` + +How often zabbix server sends configuration data to a zabbix proxy in seconds. + +Default value: `$zabbix::params::server_proxyconfigfrequency` + +##### `proxydatafrequency` + +Data type: `Any` + +How often zabbix server requests history data from a zabbix proxy in seconds. + +Default value: `$zabbix::params::server_proxydatafrequency` + +##### `allowroot` + +Data type: `Any` + +Allow the server to run as 'root'. + +Default value: `$zabbix::params::server_allowroot` + +##### `include_dir` + +Data type: `Any` + +You may include individual files or all files in a directory in the configuration file. + +Default value: `$zabbix::params::server_include` + +##### `loadmodulepath` + +Data type: `Any` + +Full path to location of server modules. + +Default value: `$zabbix::params::server_loadmodulepath` + +##### `loadmodule` + +Data type: `Any` + +Module to load at server startup. + +Default value: `$zabbix::params::server_loadmodule` + +##### `sslcertlocation_dir` + +Data type: `Any` + +Location of SSL client certificate files for client authentication. + +Default value: `$zabbix::params::server_sslcertlocation` + +##### `sslkeylocation_dir` + +Data type: `Any` + +Location of SSL private key files for client authentication. + +Default value: `$zabbix::params::server_sslkeylocation` + +##### `manage_selinux` + +Data type: `Boolean` + +Whether we should manage SELinux rules. + +Default value: `$zabbix::params::manage_selinux` + +##### `additional_service_params` + +Data type: `String` + +Additional parameters to pass to the service. + +Default value: `$zabbix::params::additional_service_params` + +##### `zabbix_user` + +Data type: `Optional[String[1]]` + +User the zabbix service will run as. + +Default value: `$zabbix::params::server_zabbix_user` + +##### `manage_startup_script` + +Data type: `Boolean` + +If the init script should be managed by this module. Attention: This might cause problems with some config options of this module (e.g server_configfile_path) + +Default value: `$zabbix::params::manage_startup_script` + +##### `socketdir` + +Data type: `Optional[Stdlib::Absolutepath]` + +IPC socket directory. +Directory to store IPC sockets used by internal Zabbix services. + +Default value: `$zabbix::params::server_socketdir` + +### `zabbix::userparameter` + +This class can be used when you use hiera or The Foreman. With this tools you can't use and define. This make use of "create_resources". + +#### Examples + +##### + +```puppet +zabbix::userparameter::data: + MySQL: + content: UserParameter=mysql.ping,mysqladmin -uroot ping | grep -c alive +``` + +#### Parameters + +The following parameters are available in the `zabbix::userparameter` class: + +* [`data`](#data) + +##### `data` + +Data type: `Hash` + +This is the data in YAML format + +Default value: `{}` + +### `zabbix::web` + +This will install the zabbix-web package and install an virtual host. + +#### Examples + +##### For multiple host setup: + +```puppet +node 'wdpuppet02.dj-wasabi.local' { + class { 'apache': + mpm_module => 'prefork', + } + class { 'apache::mod::php': } + class { 'zabbix::web': + zabbix_url => 'zabbix.dj-wasabi.nl', + zabbix_server => 'wdpuppet03.dj-wasabi.local', + database_host => 'wdpuppet04.dj-wasabi.local', + database_type => 'mysql', + puppetgem => 'gem', + } +} +``` + +#### Parameters + +The following parameters are available in the `zabbix::web` class: + +* [`zabbix_url`](#zabbix_url) +* [`database_type`](#database_type) +* [`manage_repo`](#manage_repo) +* [`zabbix_version`](#zabbix_version) +* [`zabbix_timezone`](#zabbix_timezone) +* [`zabbix_template_dir`](#zabbix_template_dir) +* [`zabbix_package_state`](#zabbix_package_state) +* [`web_config_owner`](#web_config_owner) +* [`web_config_group`](#web_config_group) +* [`manage_vhost`](#manage_vhost) +* [`default_vhost`](#default_vhost) +* [`manage_resources`](#manage_resources) +* [`apache_use_ssl`](#apache_use_ssl) +* [`apache_ssl_cert`](#apache_ssl_cert) +* [`apache_ssl_key`](#apache_ssl_key) +* [`apache_ssl_cipher`](#apache_ssl_cipher) +* [`apache_ssl_chain`](#apache_ssl_chain) +* [`apache_listen_ip`](#apache_listen_ip) +* [`apache_listenport`](#apache_listenport) +* [`apache_listenport_ssl`](#apache_listenport_ssl) +* [`zabbix_api_user`](#zabbix_api_user) +* [`zabbix_api_pass`](#zabbix_api_pass) +* [`database_host`](#database_host) +* [`database_name`](#database_name) +* [`database_schema`](#database_schema) +* [`database_double_ieee754`](#database_double_ieee754) +* [`database_user`](#database_user) +* [`database_password`](#database_password) +* [`database_socket`](#database_socket) +* [`database_port`](#database_port) +* [`zabbix_server`](#zabbix_server) +* [`zabbix_server_name`](#zabbix_server_name) +* [`zabbix_listenport`](#zabbix_listenport) +* [`apache_php_max_execution_time`](#apache_php_max_execution_time) +* [`apache_php_memory_limit`](#apache_php_memory_limit) +* [`apache_php_post_max_size`](#apache_php_post_max_size) +* [`apache_php_upload_max_filesize`](#apache_php_upload_max_filesize) +* [`apache_php_max_input_time`](#apache_php_max_input_time) +* [`apache_php_always_populate_raw_post_data`](#apache_php_always_populate_raw_post_data) +* [`apache_php_max_input_vars`](#apache_php_max_input_vars) +* [`ldap_cacert`](#ldap_cacert) +* [`ldap_clientcert`](#ldap_clientcert) +* [`ldap_clientkey`](#ldap_clientkey) +* [`ldap_reqcert`](#ldap_reqcert) +* [`saml_sp_key`](#saml_sp_key) +* [`saml_sp_cert`](#saml_sp_cert) +* [`saml_idp_cert`](#saml_idp_cert) +* [`saml_settings`](#saml_settings) +* [`puppetgem`](#puppetgem) +* [`manage_selinux`](#manage_selinux) + +##### `zabbix_url` + +Data type: `Any` + +Url on which zabbix needs to be available. Will create an vhost in +apache. Only needed when manage_vhost is set to true. +Example: zabbix.example.com + +Default value: `$zabbix::params::zabbix_url` + +##### `database_type` + +Data type: `Any` + +Type of database. Can use the following 2 databases: +- postgresql +- mysql + +Default value: `$zabbix::params::database_type` + +##### `manage_repo` + +Data type: `Any` + +When true, it will create repository for installing the webinterface. + +Default value: `$zabbix::params::manage_repo` + +##### `zabbix_version` + +Data type: `Any` + +This is the zabbix version. + +Default value: `$zabbix::params::zabbix_version` + +##### `zabbix_timezone` + +Data type: `Any` + +The current timezone for vhost configuration needed for the php timezone. Example: Europe/Amsterdam + +Default value: `$zabbix::params::zabbix_timezone` + +##### `zabbix_template_dir` + +Data type: `Any` + +The directory where all templates are stored before uploading via API + +Default value: `$zabbix::params::zabbix_template_dir` + +##### `zabbix_package_state` + +Data type: `Any` + +The state of the package that needs to be installed: present or latest. + +Default value: `$zabbix::params::zabbix_package_state` + +##### `web_config_owner` + +Data type: `Any` + +Which user should own the web interface configuration file. + +Default value: `$zabbix::params::web_config_owner` + +##### `web_config_group` + +Data type: `Any` + +Which group should own the web interface configuration file. + +Default value: `$zabbix::params::web_config_group` + +##### `manage_vhost` + +Data type: `Any` + +When true, it will create an vhost for apache. The parameter zabbix_url has to be set. + +Default value: `$zabbix::params::manage_vhost` + +##### `default_vhost` + +Data type: `Any` + +When true priority of 15 is passed to zabbix vhost which would end up +with marking zabbix vhost as default one, when false priority is set to 25 + +Default value: `$zabbix::params::default_vhost` + +##### `manage_resources` + +Data type: `Any` + +When true, it will export resources to something like puppetdb. +When set to true, you'll need to configure 'storeconfigs' to make +this happen. Default is set to false, as not everyone has this +enabled. + +Default value: `$zabbix::params::manage_resources` + +##### `apache_use_ssl` + +Data type: `Any` + +Will create an ssl vhost. Also nonssl vhost will be created for redirect +nonssl to ssl vhost. + +Default value: `$zabbix::params::apache_use_ssl` + +##### `apache_ssl_cert` + +Data type: `Any` + +The location of the ssl certificate file. You'll need to make sure this +file is present on the system, this module will not install this file. + +Default value: `$zabbix::params::apache_ssl_cert` + +##### `apache_ssl_key` + +Data type: `Any` + +The location of the ssl key file. You'll need to make sure this file is +present on the system, this module will not install this file. + +Default value: `$zabbix::params::apache_ssl_key` + +##### `apache_ssl_cipher` + +Data type: `Any` + +The ssl cipher used. Cipher is used from this website: +https://wiki.mozilla.org/Security/Server_Side_TLS + +Default value: `$zabbix::params::apache_ssl_cipher` + +##### `apache_ssl_chain` + +Data type: `Any` + +The ssl chain file. + +Default value: `$zabbix::params::apache_ssl_chain` + +##### `apache_listen_ip` + +Data type: `Any` + +The IP the apache service should listen on. + +Default value: `$zabbix::params::apache_listen_ip` + +##### `apache_listenport` + +Data type: `Any` + +The port for the apache vhost. + +Default value: `$zabbix::params::apache_listenport` + +##### `apache_listenport_ssl` + +Data type: `Any` + +The port for the apache SSL vhost. + +Default value: `$zabbix::params::apache_listenport_ssl` + +##### `zabbix_api_user` + +Data type: `Any` + +Name of the user which the api should connect to. Default: Admin + +Default value: `$zabbix::params::server_api_user` + +##### `zabbix_api_pass` + +Data type: `Any` + +Password of the user which connects to the api. Default: zabbix + +Default value: `$zabbix::params::server_api_pass` + +##### `database_host` + +Data type: `Any` + +Database host name. + +Default value: `$zabbix::params::server_database_host` + +##### `database_name` + +Data type: `Any` + +Database name. + +Default value: `$zabbix::params::server_database_name` + +##### `database_schema` + +Data type: `Any` + +Schema name. used for ibm db2. + +Default value: `$zabbix::params::server_database_schema` + +##### `database_double_ieee754` + +Data type: `Boolean` + +Enable extended range of float values for new installs of Zabbix >= 5.0 and +after patching upgraded installs to 5.0 or greater. +https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values + +Default value: `$zabbix::params::server_database_double_ieee754` + +##### `database_user` + +Data type: `Any` + +Database user. ignored for sqlite. + +Default value: `$zabbix::params::server_database_user` + +##### `database_password` + +Data type: `Any` + +Database password. ignored for sqlite. + +Default value: `$zabbix::params::server_database_password` + +##### `database_socket` + +Data type: `Any` + +Path to mysql socket. + +Default value: `$zabbix::params::server_database_socket` + +##### `database_port` + +Data type: `Any` + +Database port when not using local socket. Ignored for sqlite. + +Default value: `$zabbix::params::server_database_port` + +##### `zabbix_server` + +Data type: `Any` + +The fqdn name of the host running the zabbix-server. When single node: localhost + +Default value: `$zabbix::params::zabbix_server` + +##### `zabbix_server_name` + +Data type: `Optional[String]` + +The fqdn name of the host running the zabbix-server. When single node: +localhost +This can also be used to upave a different name such as "Zabbix DEV" + +Default value: `$zabbix::params::zabbix_server` + +##### `zabbix_listenport` + +Data type: `Any` + +The port on which the zabbix-server is listening. Default: 10051 + +Default value: `$zabbix::params::server_listenport` + +##### `apache_php_max_execution_time` + +Data type: `Any` + +Max execution time for php. Default: 300 + +Default value: `$zabbix::params::apache_php_max_execution_time` + +##### `apache_php_memory_limit` + +Data type: `Any` + +PHP memory size limit. Default: 128M + +Default value: `$zabbix::params::apache_php_memory_limit` + +##### `apache_php_post_max_size` + +Data type: `Any` + +PHP maximum post size data. Default: 16M + +Default value: `$zabbix::params::apache_php_post_max_size` + +##### `apache_php_upload_max_filesize` + +Data type: `Any` + +PHP maximum upload filesize. Default: 2M + +Default value: `$zabbix::params::apache_php_upload_max_filesize` + +##### `apache_php_max_input_time` + +Data type: `Any` + +Max input time for php. Default: 300 + +Default value: `$zabbix::params::apache_php_max_input_time` + +##### `apache_php_always_populate_raw_post_data` + +Data type: `Any` + +Default: -1 + +Default value: `$zabbix::params::apache_php_always_populate_raw_post_data` + +##### `apache_php_max_input_vars` + +Data type: `Any` + +Max amount of vars for GET/POST requests + +Default value: `$zabbix::params::apache_php_max_input_vars` + +##### `ldap_cacert` + +Data type: `Optional[Stdlib::Absolutepath]` + +Set location of ca_cert used by LDAP authentication. + +Default value: `$zabbix::params::ldap_cacert` + +##### `ldap_clientcert` + +Data type: `Optional[Stdlib::Absolutepath]` + +Set location of client cert used by LDAP authentication. + +Default value: `$zabbix::params::ldap_clientcert` + +##### `ldap_clientkey` + +Data type: `Optional[Stdlib::Absolutepath]` + +Set location of client key used by LDAP authentication. + +Default value: `$zabbix::params::ldap_clientkey` + +##### `ldap_reqcert` + +Data type: `Optional[Enum['never','allow','try','demand','hard']]` + +Specifies what checks to perform on a server certificate + +Default value: `$zabbix::params::ldap_reqcert` + +##### `saml_sp_key` + +Data type: `Optional[Stdlib::Absolutepath]` + +The location of the SAML Service Provider Key file. + +Default value: `$zabbix::params::saml_sp_key` + +##### `saml_sp_cert` + +Data type: `Optional[Stdlib::Absolutepath]` + +The location of the SAML Service Provider Certificate. + +Default value: `$zabbix::params::saml_sp_cert` + +##### `saml_idp_cert` + +Data type: `Optional[Stdlib::Absolutepath]` + +The location of the SAML Identity Provider Certificate. + +Default value: `$zabbix::params::saml_idp_cert` + +##### `saml_settings` + +Data type: `Hash[String[1], Variant[ScalarData, Hash]]` + +A hash of additional SAML SSO settings. + +Default value: `$zabbix::params::saml_settings` + +##### `puppetgem` + +Data type: `Any` + +Provider for the zabbixapi gem package. + +Default value: `$zabbix::params::puppetgem` + +##### `manage_selinux` + +Data type: `Boolean` + +Whether we should manage SELinux rules. + +Default value: `$zabbix::params::manage_selinux` + +### `zabbix::zapache` + +This will install and configure the zapache monitoring script Upstream: https://github.com/lorf/zapache + +#### Examples + +##### Basic installation: + +```puppet +class { 'zabbix::agent': + manage_resources => true, + apache_status => true, + zbx_templates => [ 'Template App Apache Web Server zapache'], +} +``` + +#### Parameters + +The following parameters are available in the `zabbix::zapache` class: + +* [`apache_status`](#apache_status) + +##### `apache_status` + +Data type: `Boolean` + +Boolean. False by default. Installs zapache monitoring script when true. + +Default value: `$zabbix::params::apache_status` + +## Defined types + +### `zabbix::resources::template` + +This will create resources into puppetdb for automatically configuring agent into zabbix front-end. + +#### Parameters + +The following parameters are available in the `zabbix::resources::template` defined type: + +* [`template_dir`](#template_dir) +* [`template_name`](#template_name) +* [`template_source`](#template_source) +* [`zabbix_version`](#zabbix_version) + +##### `template_dir` + +Data type: `Any` + +The directory containing zabbix templates + +Default value: `$zabbix::params::zabbix_template_dir` + +##### `template_name` + +Data type: `Any` + +The name of template. + +Default value: `$title` + +##### `template_source` + +Data type: `Any` + +Template source file. + +Default value: `''` + +##### `zabbix_version` + +Data type: `Any` + +Zabbix version that the template will be installed on. + +Default value: `$zabbix::params::zabbix_version` + +### `zabbix::resources::userparameters` + +This will create resources into puppetdb for automatically configuring agent into zabbix front-end. + +#### Parameters + +The following parameters are available in the `zabbix::resources::userparameters` defined type: + +* [`ensure`](#ensure) +* [`hostname`](#hostname) +* [`template`](#template) + +##### `ensure` + +Data type: `Any` + +Ensure resource. + +##### `hostname` + +Data type: `Any` + +Hostname of the machine. + +##### `template` + +Data type: `Any` + +Template which should be attached to this host. + +### `zabbix::startup` + +This manage the zabbix related service startup script. + +#### Examples + +##### + +```puppet +zabbix::startup { 'agent': } +``` + +##### + +```puppet +zabbix::startup { 'server': } +``` + +#### Parameters + +The following parameters are available in the `zabbix::startup` defined type: + +* [`pidfile`](#pidfile) +* [`agent_configfile_path`](#agent_configfile_path) +* [`server_configfile_path`](#server_configfile_path) +* [`database_type`](#database_type) +* [`zabbix_user`](#zabbix_user) +* [`additional_service_params`](#additional_service_params) +* [`service_type`](#service_type) +* [`manage_database`](#manage_database) +* [`service_name`](#service_name) + +##### `pidfile` + +Data type: `Optional[Stdlib::Absolutepath]` + +Location of the PID file + +Default value: ``undef`` + +##### `agent_configfile_path` + +Data type: `Optional[Stdlib::Absolutepath]` + +Location of Zabbix's agent configuration file + +Default value: ``undef`` + +##### `server_configfile_path` + +Data type: `Optional[Stdlib::Absolutepath]` + +Location of Zabbix's server configuration file + +Default value: ``undef`` + +##### `database_type` + +Data type: `Optional[Zabbix::Databases]` + +Type of database. Can use the following 2 databases: +- postgresql +- mysql + +Default value: ``undef`` + +##### `zabbix_user` + +Data type: `Optional[String]` + +User the zabbix service will run as + +Default value: ``undef`` + +##### `additional_service_params` + +Data type: `String` + +Additional parameters to pass to the service + +Default value: `''` + +##### `service_type` + +Data type: `String` + +Systemd service type + +Default value: `'simple'` + +##### `manage_database` + +Data type: `Optional[Boolean]` + +When true, it will configure the database and execute the sql scripts. + +Default value: ``undef`` + +##### `service_name` + +Data type: `Optional[String]` + +Name of the service. Defaults to the resource name + +Default value: `$name` + +### `zabbix::template` + +This will upload an Zabbix Template (XML format) + +#### Examples + +##### + +```puppet +zabbix::template { 'Template App MySQL': + templ_source => 'puppet:///modules/zabbix/MySQL.xml' +} +``` + +#### Parameters + +The following parameters are available in the `zabbix::template` defined type: + +* [`templ_name`](#templ_name) +* [`templ_source`](#templ_source) +* [`zabbix_version`](#zabbix_version) + +##### `templ_name` + +Data type: `Any` + +The name of the template. This name will be found in the Web interface + +Default value: `$title` + +##### `templ_source` + +Data type: `Any` + +The location of the XML file wich needs to be imported. + +Default value: `''` + +##### `zabbix_version` + +Data type: `String[1]` + +The Zabbix version on which the template will be installed on. + +Default value: `$zabbix::params::zabbix_version` + +### `zabbix::userparameters` + +This will install an userparameters file with keys for items that can be checked with zabbix. + +#### Examples + +##### + +```puppet +zabbix::userparameters { 'mysql': + source => 'puppet:///modules/zabbix/mysqld.conf', +} +``` + +##### + +```puppet +zabbix::userparameters { 'mysql': + content => 'UserParameter=mysql.ping,mysqladmin -uroot ping | grep -c alive', +} +``` + +##### Or when using exported resources (manage_resources is set to true) + +```puppet +zabbix::userparameters { 'mysql': + source => 'puppet:///modules/zabbix/mysqld.conf', + template => 'Template App MySQL', +} +``` + +#### Parameters + +The following parameters are available in the `zabbix::userparameters` defined type: + +* [`ensure`](#ensure) +* [`source`](#source) +* [`content`](#content) +* [`script`](#script) +* [`script_ext`](#script_ext) +* [`template`](#template) +* [`script_dir`](#script_dir) +* [`config_mode`](#config_mode) + +##### `ensure` + +Data type: `Enum['present', 'absent']` + +If the userparameter should be `present` or `absent` + +Default value: `'present'` + +##### `source` + +Data type: `Optional[Stdlib::Filesource]` + +File which holds several userparameter entries. + +Default value: ``undef`` + +##### `content` + +Data type: `Optional[String[1]]` + +When you have 1 userparameter entry which you want to install. + +Default value: ``undef`` + +##### `script` + +Data type: `Optional[Stdlib::Filesource]` + +Low level discovery (LLD) script. + +Default value: ``undef`` + +##### `script_ext` + +Data type: `Optional[String[1]]` + +The script extention. Should be started with the dot. Like: .sh .bat .py + +Default value: ``undef`` + +##### `template` + +Data type: `Optional[String[1]]` + +When you use exported resources (when manage_resources is set to true on other components) +you'll can add the name of the template which correspondents with the 'content' or +'source' which you add. The template will be added to the host. + +Default value: ``undef`` + +##### `script_dir` + +Data type: `Stdlib::Absolutepath` + +When 'script' is used, this parameter can provide the directly where this script needs to be placed. Default: '/usr/bin' + +Default value: `'/usr/bin'` + +##### `config_mode` + +Data type: `Stdlib::Filemode` + +When 'config_mode' is used, this parameter can provide the mode of the config file who will be created +to keep some credidentials private. Default: '0644' + +Default value: `'0644'` + +## Resource types + +### `zabbix_application` + +%q(Manage zabbix applications + + zabbix_application{"app1": + ensure => present, + template => 'template1', + } + +It Raise exception on deleting an application which is a part of used template. + +) + +#### Properties + +The following properties are available in the `zabbix_application` type. + +##### `ensure` + +Valid values: `present`, `absent` + +The basic property that the resource should be in. + +Default value: `present` + +#### Parameters + +The following parameters are available in the `zabbix_application` type. + +* [`name`](#name) +* [`provider`](#provider) +* [`template`](#template) + +##### `name` + +namevar + +application name + +##### `provider` + +The specific backend to use for this `zabbix_application` resource. You will seldom need to specify this --- Puppet will +usually discover the appropriate provider for your platform. + +##### `template` + +template to which the application is linked + +### `zabbix_host` + +FQDN of the machine. + +#### Properties + +The following properties are available in the `zabbix_host` type. + +##### `ensure` + +Valid values: `present`, `absent` + +The basic property that the resource should be in. + +Default value: `present` + +##### `group` + +Deprecated! Name of the hostgroup. + +##### `groups` + +An array of groups the host belongs to. + +##### `id` + +Internally used hostid + +##### `interfaceid` + +Internally used identifier for the host interface + +##### `interfacetype` + +Interface type. 1 for zabbix agent. + +##### `ipaddress` + +The IP address of the machine running zabbix agent. + +##### `macros` + +Array of hashes (macros) which should be loaded for this host. + +##### `port` + +The port that the zabbix agent is listening on. + +##### `proxy` + +Whether it is monitored by an proxy or not. + +##### `templates` + +List of templates which should be loaded for this host. + +##### `use_ip` + +Valid values: ``true``, ``false`` + +Using ipadress instead of dns to connect. + +#### Parameters + +The following parameters are available in the `zabbix_host` type. + +* [`group_create`](#group_create) +* [`hostname`](#hostname) +* [`provider`](#provider) + +##### `group_create` + +Valid values: ``true``, ``false`` + +Create hostgroup if missing. + +##### `hostname` + +FQDN of the machine. + +##### `provider` + +The specific backend to use for this `zabbix_host` resource. You will seldom need to specify this --- Puppet will +usually discover the appropriate provider for your platform. + +### `zabbix_hostgroup` + +Manage zabbix hostgroups + +#### Properties + +The following properties are available in the `zabbix_hostgroup` type. + +##### `ensure` + +Valid values: `present`, `absent` + +The basic property that the resource should be in. + +Default value: `present` + +#### Parameters + +The following parameters are available in the `zabbix_hostgroup` type. + +* [`name`](#name) +* [`provider`](#provider) + +##### `name` + +namevar + +hostgroup name + +##### `provider` + +The specific backend to use for this `zabbix_hostgroup` resource. You will seldom need to specify this --- Puppet will +usually discover the appropriate provider for your platform. + +### `zabbix_proxy` + +FQDN of the proxy. + +#### Properties + +The following properties are available in the `zabbix_proxy` type. + +##### `ensure` + +Valid values: `present`, `absent` + +The basic property that the resource should be in. + +Default value: `present` + +##### `interfaceid` + +(readonly) ID of the interface + +##### `ipaddress` + +The IP address of the machine running zabbix proxy. + +##### `mode` + +Valid values: `active`, `passive`, `0`, `1`, `0`, `1` + +The kind of mode the proxy running. Active (0) or passive (1). + +##### `port` + +The port that the zabbix proxy is listening on. + +##### `proxyid` + +(readonly) ID of the proxy + +##### `use_ip` + +Using ipadress instead of dns to connect. Is used by the zabbix-api command. + +#### Parameters + +The following parameters are available in the `zabbix_proxy` type. + +* [`hostname`](#hostname) +* [`provider`](#provider) + +##### `hostname` + +FQDN of the proxy. + +##### `provider` + +The specific backend to use for this `zabbix_proxy` resource. You will seldom need to specify this --- Puppet will +usually discover the appropriate provider for your platform. + +### `zabbix_template` + +The name of template. + +#### Properties + +The following properties are available in the `zabbix_template` type. + +##### `ensure` + +Valid values: `present`, `absent` + +The basic property that the resource should be in. + +Default value: `present` + +#### Parameters + +The following parameters are available in the `zabbix_template` type. + +* [`provider`](#provider) +* [`template_name`](#template_name) +* [`template_source`](#template_source) +* [`zabbix_version`](#zabbix_version) + +##### `provider` + +The specific backend to use for this `zabbix_template` resource. You will seldom need to specify this --- Puppet will +usually discover the appropriate provider for your platform. + +##### `template_name` + +The name of template. + +##### `template_source` + +Template source file. + +##### `zabbix_version` + +Zabbix version that the template will be installed on. + +### `zabbix_template_host` + +Link or Unlink template to host. +Example. +Name should be in the format of "template_name@hostname" + +zabbix_template_host{ 'mysql_template@db1': + ensure => present, + } + +#### Properties + +The following properties are available in the `zabbix_template_host` type. + +##### `ensure` + +Valid values: `present`, `absent` + +The basic property that the resource should be in. + +Default value: `present` + +#### Parameters + +The following parameters are available in the `zabbix_template_host` type. + +* [`name`](#name) +* [`provider`](#provider) + +##### `name` + +Valid values: `%r{.+\@.+}` + +namevar + +template_name@host_name + +##### `provider` + +The specific backend to use for this `zabbix_template_host` resource. You will seldom need to specify this --- Puppet +will usually discover the appropriate provider for your platform. + +### `zabbix_userparameters` + +An unique name for this define. + +#### Properties + +The following properties are available in the `zabbix_userparameters` type. + +##### `ensure` + +Valid values: `present`, `absent` + +The basic property that the resource should be in. + +Default value: `present` + +#### Parameters + +The following parameters are available in the `zabbix_userparameters` type. + +* [`hostname`](#hostname) +* [`name`](#name) +* [`provider`](#provider) +* [`template`](#template) + +##### `hostname` + +FQDN of the machine. + +##### `name` + +namevar + +An unique name for this define. + +##### `provider` + +The specific backend to use for this `zabbix_userparameters` resource. You will seldom need to specify this --- Puppet +will usually discover the appropriate provider for your platform. + +##### `template` + +Template which should be loaded for this host. + +## Data types + +### `Zabbix::Databases` + +Type for supported databases by the zabbix module + +Alias of + +```puppet +Enum['postgresql', 'mysql', 'sqlite'] +``` + +### `Zabbix::Historyics` + +The Zabbix::Historyics data type. + +Alias of + +```puppet +Optional[Pattern[/^\d+[k|K|m|M]?$/]] +``` + diff --git a/manifests/agent.pp b/manifests/agent.pp index c81c0fece..3b3045b5d 100644 --- a/manifests/agent.pp +++ b/manifests/agent.pp @@ -1,281 +1,136 @@ -# == Class: zabbix::agent -# -# This will install and configure the zabbix-agent deamon -# -# === Requirements -# -# If 'manage_resources' is set to true, you'll need to configure -# storeconfigs/exported resources. -# -# Otherwise no requirements. -# -# === Parameters -# -# [*zabbix_version*] -# This is the zabbix version. -# -# [*zabbix_package_state*] -# The state of the package that needs to be installed: present or latest. -# Default: present -# -# [*zabbix_package_agent*] -# The name of the agent package that we manage -# -# [*manage_firewall*] -# When true, it will create iptables rules. -# -# [*manage_repo*] -# When true, it will create repository for installing the agent. -# -# [*manage_choco*] +# @summary This will install and configure the zabbix-agent deamon +# @param zabbix_version This is the zabbix version. +# @param zabbix_package_state The state of the package that needs to be installed: present or latest. +# @param zabbix_package_agent The name of the agent package that we manage +# @param manage_firewall When true, it will create iptables rules. +# @param manage_repo When true, it will create repository for installing the agent. +# @param manage_choco # When true on windows, it will use chocolatey to install the agent. # The module chocolatey is required https://forge.puppet.com/puppetlabs/chocolatey. -# -# [*zabbix_package_provider*] +# @param zabbix_package_provider # Which package's provider to use to install the agent. # It is undef for all linux os and set to 'chocolatey' on windows. -# -# [*manage_resources*] +# @param manage_resources # When true, it will export resources to something like puppetdb. # When set to true, you'll need to configure 'storeconfigs' to make # this happen. Default is set to false, as not everyone has this # enabled. -# -# [*monitored_by_proxy*] +# @param monitored_by_proxy # When this is monitored by an proxy, please fill in the name of this proxy. # If the proxy is also installed via this module, please fill in the FQDN -# -# [*agent_use_ip*] +# @param agent_use_ip # When true, when creating hosts via the zabbix-api, it will configure that # connection should me made via ip, not fqdn. -# -# [*zbx_group*] -# Deprecated! Name of the hostgroup where this host needs to be added. -# -# [*zbx_groups*] -# An array of hostgroups where this host needs to be added. -# -# [*zbx_templates*] -# List of templates which will be added when host is configured. -# -# [*zbx_macros*] -# List of macros which will be added when host is configured. -# -# [*zbx_interface_type*] -# Integer specifying type of interface to be created -# -# [*agent_configfile_path*] -# Agent config file path defaults to /etc/zabbix/zabbix_agentd.conf -# -# [*pidfile*] -# Name of pid file. -# -# [*logfile*] -# Name of log file. -# -# [*logfilesize*] -# Maximum size of log file in MB. -# -# [*logtype*] -# Specifies where log messages are written to. Can be one of: -# - console -# - file -# - system -# -# [*debuglevel*] -# Specifies debug level. -# -# [*sourceip*] -# Source ip address for outgoing connections. -# -# [*allowkey*] -# Allow execution of item keys matching pattern. -# -# [*denykey*] -# Deny execution of items keys matching pattern. -# -# [*enableremotecommands*] -# Whether remote commands from zabbix server are allowed. -# -# [*logremotecommands*] -# Enable logging of executed shell commands as warnings. -# -# [*server*] -# List of comma delimited ip addresses (or hostnames) of zabbix servers. -# -# [*listenport*] -# Agent will listen on this port for connections from the server. -# -# [*listenip*] +# @param zbx_group *Deprecated* (see zbx_groups) Name of the hostgroup where this host needs to be added. +# @param zbx_groups An array of hostgroups where this host needs to be added. +# @param zbx_group_create Whether to create hostgroup if missing. +# @param zbx_templates List of templates which will be added when host is configured. +# @param zbx_macros List of macros which will be added when host is configured. +# @param zbx_interface_type Integer specifying type of interface to be created +# @param agent_configfile_path Agent config file path defaults to /etc/zabbix/zabbix_agentd.conf +# @param pidfile Name of pid file. +# @param servicename Zabbix's agent service name. +# @param logfile Name of log file. +# @param logfilesize Maximum size of log file in MB. +# @param logtype Specifies where log messages are written to. Can be one of: console, file, system +# @param debuglevel Specifies debug level. +# @param sourceip Source ip address for outgoing connections. +# @param allowkey Allow execution of item keys matching pattern. +# @param denykey Deny execution of items keys matching pattern. +# @param enableremotecommands Whether remote commands from zabbix server are allowed. +# @param logremotecommands Enable logging of executed shell commands as warnings. +# @param server List of comma delimited ip addresses (or hostnames) of zabbix servers. +# @param listenport Agent will listen on this port for connections from the server. +# @param listenip # List of comma delimited ip addresses that the agent should listen on. # You can also specify which network interface it should listen on. # -# Example: # listenip => 'eth0', or # listenip => 'bond0.73', # # It will find out which ip is configured for this ipaddress. Can be handy # if more than 1 interface is on the server. # -# [*startagents*] -# Number of pre-forked instances of zabbix_agentd that process passive checks. -# -# [*serveractive*] -# List of comma delimited ip:port (or hostname:port) pairs of zabbix servers for active checks. -# -# [*service_ensure*] -# Start / stop the agent service. E.g. to preconfigure a hosts agent and turn on the service -# at a later time (when the server reaches production SLA) -# Default: 'running' -# -# [*service_enable*] -# Automatically start the agent on system boot -# Default: true -# -# [*hostname*] -# Unique, case sensitive hostname. -# -# [*hostnameitem*] -# Item used for generating hostname if it is undefined. -# -# [*hostmetadata*] -# Optional parameter that defines host metadata. -# -# [*hostmetadataitem*] -# Optional parameter that defines an item used for getting host metadata. -# -# [*hostinterface*] +# @param startagents Number of pre-forked instances of zabbix_agentd that process passive checks. +# @param serveractive List of comma delimited ip:port (or hostname:port) pairs of zabbix servers for active checks. +# @param service_ensure Start / stop the agent service. E.g. to preconfigure a hosts agent and turn on the service at a later time (when the server reaches production SLA) +# @param service_enable Automatically start the agent on system boot +# @param hostname Unique, case sensitive hostname. +# @param hostnameitem Zabbix item used for generating hostname if it is undefined. +# @param hostmetadata Optional parameter that defines host metadata. +# @param hostmetadataitem Optional parameter that defines a zabbix item used for getting host metadata. +# @param hostinterface # Optional parameter that defines host metadata. Host metadata is used only at host # auto-registration process (active agent). -# -# [*hostinterfaceitem*] +# @param hostinterfaceitem # Optional parameter that defines an item used for getting host interface. # Host interface is used at host auto-registration process. -# -# [*refreshactivechecks*] -# How often list of active checks is refreshed, in seconds. -# -# [*buffersend*] -# Do not keep data longer than n seconds in buffer. -# -# [*buffersize*] -# Maximum number of values in a memory buffer. -# -# [*maxlinespersecond*] -# Maximum number of new lines the agent will send per second to zabbix server -# or proxy processing. -# -# [*allowroot*] -# Allow the agent to run as 'root'. -# -# [*zabbix_user*] -# Drop privileges to a specific, existing user on the system. -# Only has effect if run as 'root' and AllowRoot is disabled. -# -# [*zabbix_alias*] -# Sets an alias for parameter. -# -# [*timeout*] -# Spend no more than timeout seconds on processing. -# -# [*tlsaccept*] -# What incoming connections to accept from Zabbix server. Used for a passive proxy, ignored on an active proxy. -# -# [*tlscafile*] -# Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. -# -# [*tlscertfile*] -# Full pathname of a file containing the proxy certificate or certificate chain. -# -# [*tlsconnect*] -# How the proxy should connect to Zabbix server. Used for an active proxy, ignored on a passive proxy. -# -# [*tlscrlfile*] -# Full pathname of a file containing revoked certificates. -# -# [*tlskeyfile*] -# Full pathname of a file containing the proxy private key. -# -# [*tlspskfile*] -# Full pathname of a file containing the pre-shared key. -# -# [*tlspskidentity*] -# Unique, case sensitive string used to identify the pre-shared key. -# -# [*tlscipherall*] +# @param refreshactivechecks How often list of active checks is refreshed, in seconds. +# @param buffersend Do not keep data longer than n seconds in buffer. +# @param buffersize Maximum number of values in a memory buffer. +# @param maxlinespersecond Maximum number of new lines the agent will send per second to zabbix server or proxy processing. +# @param allowroot Allow the agent to run as 'root'. +# @param zabbix_user Drop privileges to a specific, existing user on the system. Only has effect if run as 'root' and AllowRoot is disabled. +# @param zabbix_alias Sets an alias for parameter. +# @param timeout Spend no more than timeout seconds on processing. +# @param tlsaccept What incoming connections to accept from Zabbix server. Used for a passive proxy, ignored on an active proxy. +# @param tlscafile Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. +# @param tlscertfile Full pathname of a file containing the proxy certificate or certificate chain. +# @param tlsconnect How the proxy should connect to Zabbix server. Used for an active proxy, ignored on a passive proxy. +# @param tlscrlfile Full pathname of a file containing revoked certificates. +# @param tlskeyfile Full pathname of a file containing the proxy private key. +# @param tlspskfile Full pathname of a file containing the pre-shared key. +# @param tlspskidentity Unique, case sensitive string used to identify the pre-shared key. +# @param tlscipherall # GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria # for certificate- and PSK-based encryption. -# -# [*tlscipherall13*] +# @param tlscipherall13 # Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria # for certificate- and PSK-based encryption. -# -# [*tlsciphercert*] +# @param tlsciphercert # GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria # for certificate-based encryption. -# -# [*tlsciphercert13*] +# @param tlsciphercert13 # Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria # for certificate-based encryption. -# -# [*tlscipherpsk*] +# @param tlscipherpsk # GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria # for PSK-based encryption. -# -# [*tlscipherpsk13*] +# @param tlscipherpsk13 # Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria # for PSK-based encryption. -# -# [*tlsservercertissuer*] -# Allowed server certificate issuer. -# -# [*tlsservercertsubject*] -# Allowed server certificate subject. -# -# [*include_dir*] -# You may include individual files or all files in a directory in the configuration file. -# -# [*unsafeuserparameters*] -# Allow all characters to be passed in arguments to user-defined parameters. -# -# [*userparameter*] -# User-defined parameter to monitor. -# -# [*loadmodulepath*] -# Full path to location of agent modules. -# -# [*loadmodule*] -# Module to load at agent startup. -# -# [*manage_startup_script*] +# @param tlsservercertissuer Allowed server certificate issuer. +# @param tlsservercertsubject Allowed server certificate subject. +# @param agent_config_owner The owner of Zabbix's agent config file. +# @param agent_config_group The group of Zabbix's agent config file. +# @param manage_selinux Whether the module should manage SELinux rules or not. +# @param selinux_require An array of SELinux require {} rules. +# @param selinux_rules A Hash of SELinux rules. +# @param additional_service_params Additional parameters to pass to the service. +# @param service_type Systemd service type +# @param include_dir You may include individual files or all files in a directory in the configuration file. +# @param include_dir_purge Include dir to purge. +# @param unsafeuserparameters Allow all characters to be passed in arguments to user-defined parameters. +# @param userparameter User-defined parameter to monitor. +# @param loadmodulepath Full path to location of agent modules. +# @param loadmodule Module to load at agent startup. +# @param manage_startup_script # If the init script should be managed by this module. Attention: This might # cause problems with some config options of this module (e.g # agent_configfile_path) -# -# === Example -# -# Basic installation: +# @example Basic installation: # class { 'zabbix::agent': -# zabbix_version => '2.2', +# zabbix_version => '5.2', # server => '192.168.1.1', # } # -# Exported resources: +# @example With exported resources: # class { 'zabbix::agent': # manage_resources => true, # monitored_by_proxy => 'my_proxy_host', # server => '192.168.1.1', # } -# -# === Authors -# -# Author Name: ikben@werner-dijkerman.nl -# -# === Copyright -# -# Copyright 2014 Werner Dijkerman -# - +# @author Werner Dijkerman ikben@werner-dijkerman.nl class zabbix::agent ( $zabbix_version = $zabbix::params::zabbix_version, $zabbix_package_state = $zabbix::params::zabbix_package_state, diff --git a/manifests/database.pp b/manifests/database.pp index b4d938e55..cfa124094 100644 --- a/manifests/database.pp +++ b/manifests/database.pp @@ -1,86 +1,43 @@ -# == Class: zabbix::database -# -# This will install the correct database and one or more users -# for correct usage -# -# === Requirements -# -# The following is needed (or): -# - puppetlabs-mysql -# - puppetlabs-postgresql -# -# === Parameters -# -# [*zabbix_type*] +# @summary This will install the correct database and one or more users for correct usage +# @param zabbix_type # The type of zabbix which is used: server or proxy. # This will determine what sql files will be loaded into database. -# -# [*zabbix_web*] +# @param zabbix_web # This is the hostname of the server which is running the # zabbix-web package. This parameter is used when database_type = # mysql. When single node: localhost -# -# [*zabbix_web_ip*] +# @param zabbix_web_ip # This is the ip address of the server which is running the # zabbix-web package. This parameter is used when database_type = # postgresql. When single node: 127.0.0.1 -# -# [*zabbix_server*] +# @param zabbix_server # This is the FQDN for the host running zabbix-server. This parameter # is used when database_type = mysql. Default: localhost -# -# [*zabbix_server_ip*] +# @param zabbix_server_ip # This is the actual ip address of the host running zabbix-server # This parameter is used when database_type = postgresql. Default: # 127.0.0.1 -# -# [*zabbix_proxy*] +# @param zabbix_proxy # This is the FQDN for the host running zabbix-proxy. This parameter # is used when database_type = mysql. Default: localhost -# -# [*zabbix_proxy_ip*] +# @param zabbix_proxy_ip # This is the actual ip address of the host running zabbix-proxy # This parameter is used when database_type = postgresql. Default: # 127.0.0.1 -# -# [*manage_database*] +# @param manage_database # When set to true, it will create the database and will load # the sql files for basic setup. Otherwise you should do this manually. -# -# [*database_type*] -# The database which is used: postgresql or mysql -# -# [*database_name*] -# The name of the database. Default: zabbix-server -# -# [*database_user*] -# The user which is used for connecting to the database -# default: zabbix-server -# -# [*database_password*] -# The password of the database_user. -# -# [*database_host*] -# The hostname of the server running the database. -# default: localhost -# -# [* database_charset*] -# The default charset of the database. -# default: utf8 -# -# [* database_collate*] -# The default collation of the database. -# default: utf8_general_ci -# -# [* database_tablespace*] -# The tablespace the database will be created in. This setting only -# affects PostgreSQL databases. -# === Example -# -# When running everything on a single node, please check -# documentation in init.pp -# The following is an example of an multiple host setup: -# +# @param database_type The database which is used: postgresql or mysql +# @param database_schema_path The path to the directory containing the .sql schema files +# @param database_name The name of the database. Default: zabbix-server +# @param database_user The user which is used for connecting to the database +# @param database_password The password of the database_user. +# @param database_host The hostname of the server running the database. +# @param database_host_ip IP of the machine the database runs on. +# @param database_charset The default charset of the database. +# @param database_collate The default collation of the database. +# @param database_tablespace The tablespace the database will be created in. This setting only affects PostgreSQL databases. +# @example The following is an example of an multiple host setup: # node 'wdpuppet04.dj-wasabi.local' { # # class { 'postgresql::server': # # listen_addresses => '192.168.20.14' @@ -105,15 +62,7 @@ # use the postgresql as database, uncomment the lines of postgresql # class and both *_ip parameters. Comment the mysql class and comment # the zabbix_server and zabbix_web parameter. -# -# === Authors -# -# Author Name: ikben@werner-dijkerman.nl -# -# === Copyright -# -# Copyright 2014 Werner Dijkerman -# +# @author Werner Dijkerman ikben@werner-dijkerman.nl class zabbix::database ( $zabbix_type = 'server', $zabbix_web = $zabbix::params::zabbix_web, diff --git a/manifests/database/mysql.pp b/manifests/database/mysql.pp index f699412a3..bd4aa05b1 100644 --- a/manifests/database/mysql.pp +++ b/manifests/database/mysql.pp @@ -1,25 +1,15 @@ -# == Class: zabbix::database::mysql -# -# This will install and load the sql files for the tables -# and other data which is needed for zabbix. -# -# Please note: -# This class will be called from zabbix::server or zabbix::proxy. -# No need for calling this class manually. -# -# === Parameters -# -# [*database_port*] -# Database port to be used for the import process. -# -# === Authors -# -# Author Name: ikben@werner-dijkerman.nl -# -# === Copyright -# -# Copyright 2014 Werner Dijkerman -# +# @summary This will install and load the sql files for the tables and other data which is needed for zabbix. +# @api private +# @param zabbix_type Zabbix component type. Can be one of: proxy, server +# @param zabbix_version This is the zabbix version +# @param database_schema_path The path to the directory containing the .sql schema files +# @param database_name Name of the database to connect to +# @param database_user Username to use to connect to the database +# @param database_password Password to use to connect to the database +# @param database_host Hostname to use to connect to the database +# @param database_port Database port to be used for the import process. +# @param database_path Path to the database executable +# @author Werner Dijkerman class zabbix::database::mysql ( $zabbix_type = '', $zabbix_version = $zabbix::params::zabbix_version, diff --git a/manifests/database/postgresql.pp b/manifests/database/postgresql.pp index 2874c0300..8d9fde24d 100644 --- a/manifests/database/postgresql.pp +++ b/manifests/database/postgresql.pp @@ -1,25 +1,15 @@ -# == Class: zabbix::database::postgresql -# -# This will install and load the sql files for the tables -# and other data which is needed for zabbix. -# -# Please note: -# This class will be called from zabbix::server or zabbix::proxy. -# No need for calling this class manually. -# -# === Parameters -# -# [*database_port*] -# Database port to be used for the import process. -# -# === Authors -# -# Author Name: ikben@werner-dijkerman.nl -# -# === Copyright -# -# Copyright 2014 Werner Dijkerman -# +# @summary This will install and load the sql files for the tables and other data which is needed for zabbix. +# @api private +# @param zabbix_type Zabbix component type. Can be one of: proxy, server +# @param zabbix_version This is the zabbix version +# @param database_schema_path The path to the directory containing the .sql schema files +# @param database_name Name of the database to connect to +# @param database_user Username to use to connect to the database +# @param database_password Password to use to connect to the database +# @param database_host Hostname to use to connect to the database +# @param database_port Database port to be used for the import process. +# @param database_path Path to the database executable +# @author Werner Dijkerman class zabbix::database::postgresql ( $zabbix_type = '', $zabbix_version = $zabbix::params::zabbix_version, diff --git a/manifests/database/sqlite.pp b/manifests/database/sqlite.pp index d7df97997..faa6fb5f0 100644 --- a/manifests/database/sqlite.pp +++ b/manifests/database/sqlite.pp @@ -1,19 +1,3 @@ -# == Class: zabbix::database::sqlite3 -# -# This is a dummy helper class to handle sqlite database installations -# zabbix will automatically create a sqlite schema if one does not -# already exist. -# -# Please note: -# This class will be called from zabbix::database. No need for calling -# this class manually. -# -# === Authors -# -# Author Name: mjackson@equalexperts.com -# -# === Copyright -# -# Copyright 2014 Werner Dijkerman -# +# @summary Class to handle sqlite database installations zabbix will automatically create a sqlite schema if one does not already exist. +# @author Werner Dijkerman class zabbix::database::sqlite () {} diff --git a/manifests/init.pp b/manifests/init.pp index c49875c37..b1c1787f5 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,75 +1,216 @@ -# == Class: zabbix -# -# This will install and configure the zabbix-server on a single host. -# -# Before release 1.0.0, there was one single class that was used for -# installing zabbix-server components. So, this zabbix-server class -# could only be used when you have only 1 server. When you want to use -# multiple servers, than you had an problem (Or you just couldn't use -# this puppet module). -# -# With release 1.0.0, this zabbix-server class is split in 3 classes: -# - zabbix::web -# - zabbix::server -# - zabbix::database -# -# As not everyone is using an multiple host setup, this init.pp is created. -# Besides some renaming of some parameters, this class can be used like -# how the zabbix::server was used before release 1.0.0. Instead of using -# class { 'zabbix::server': -# zabbix_url => 'zabbix.dj-wasabi.nl', -# } -# you can now use: -# class { 'zabbix': -# zabbix_url => 'zabbix.dj-wasabi.nl', -# } -# -# === Requirements -# -# === Parameters -# -# All of the parameters which can be used in this script can be found in -# one of the following classes: -# - zabbix::web -# - zabbix::server -# - zabbix::database -# -# When you want to run an multiple host setup, please check the classes -# which are mentioned above. This class is single node only. -# -# === Example -# -# When running everything on a single host, you can use the following -# setup: -# -# class { 'zabbix': -# zabbix_url => 'zabbix.dj-wasabi.nl', -# } -# -# This assumes that you want to use the postgresql database. If not and -# you want to supply your own database crendentials: -# -# class { 'zabbix': -# zabbix_url => 'zabbix.dj-wasabi.nl', -# database_type => 'mysql', -# database_user => 'zabbix', -# database_password => 'ThisIsVeryDifficult.nl', -# } -# -# When you want to run this module on multiple hosts, you'll have to check -# the following classes (They have their own documentation): -# - zabbix::web -# - zabbix::server -# - zabbix::database -# -# === Authors -# -# Author Name: ikben@werner-dijkerman.nl -# -# === Copyright -# -# Copyright 2014 Werner Dijkerman +# @summary This will install and configure the zabbix-server on a single host. +# @param zabbix_url +# Url on which zabbix needs to be available. Will create an vhost in +# apache. Only needed when manage_vhost is set to true. +# Example: zabbix.example.com +# @param zabbix_version This is the zabbix version. +# @param zabbix_timezone The current timezone for vhost configuration needed for the php timezone. Example: Europe/Amsterdam +# @param zabbix_template_dir The directory where all templates are stored before uploading via API +# @param zabbix_package_state The state of the package that needs to be installed: present or latest. +# @param zabbix_server +# This is the FQDN for the host running zabbix-server. This parameter +# is used when database_type = mysql. Default: localhost +# @param zabbix_server_ip +# This is the actual ip address of the host running zabbix-server +# This parameter is used when database_type = postgresql. Default: +# 127.0.0.1 +# @param zabbix_web +# This is the hostname of the server which is running the +# zabbix-web package. This parameter is used when database_type = +# mysql. When single node: localhost +# @param zabbix_web_ip +# This is the ip address of the server which is running the +# zabbix-web package. This parameter is used when database_type = +# postgresql. When single node: 127.0.0.1 +# @param database_type +# Type of database. Can use the following 2 databases: +# - postgresql +# - mysql +# @param database_path +# When database binaries are not found on the default path: +# /bin:/usr/bin:/usr/local/sbin:/usr/local/bin +# you can use this parameter to add the database_path to the above mentioned +# path. +# @param manage_database When true, it will configure the database and execute the sql scripts. +# @param manage_repo When true (default) this module will manage the Zabbix repository. +# @param manage_firewall When true, it will create iptables rules. +# @param manage_service +# When true, it will ensure service running and enabled. +# When false, it does not care about service +# @param manage_resources +# When true, it will export resources to something like puppetdb. +# When set to true, you'll need to configure 'storeconfigs' to make +# this happen. Default is set to false, as not everyone has this +# enabled. +# @param manage_vhost When true, it will create an vhost for apache. The parameter zabbix_url has to be set. +# @param default_vhost +# When true priority of 15 is passed to zabbix vhost which would end up +# with marking zabbix vhost as default one, when false priority is set to 25 +# @param apache_use_ssl +# Will create an ssl vhost. Also nonssl vhost will be created for redirect +# nonssl to ssl vhost. +# @param apache_ssl_cert +# The location of the ssl certificate file. You'll need to make sure this +# file is present on the system, this module will not install this file. +# @param apache_ssl_key +# The location of the ssl key file. You'll need to make sure this file is +# present on the system, this module will not install this file. +# @param apache_ssl_cipher +# The ssl cipher used. Cipher is used from this website: +# https://wiki.mozilla.org/Security/Server_Side_TLS +# @param apache_ssl_chain The ssl chain file. +# @param apache_listen_ip The IP the apache service should listen on. +# @param apache_listenport The port for the apache vhost. +# @param apache_listenport_ssl The port for the apache SSL vhost. +# @param apache_php_max_execution_time Max execution time for php. Default: 300 +# @param apache_php_memory_limit PHP memory size limit. Default: 128M +# @param apache_php_post_max_size PHP maximum post size data. Default: 16M +# @param apache_php_upload_max_filesize PHP maximum upload filesize. Default: 2M +# @param apache_php_max_input_time Max input time for php. Default: 300 +# @param apache_php_always_populate_raw_post_data Default: -1 +# @param ldap_cacert Set location of ca_cert used by LDAP authentication. +# @param ldap_clientcert Set location of client cert used by LDAP authentication. +# @param ldap_clientkey Set location of client key used by LDAP authentication. +# @param ldap_reqcert Specifies what checks to perform on a server certificate +# @param zabbix_api_user Name of the user which the api should connect to. Default: Admin +# @param zabbix_api_pass Password of the user which connects to the api. Default: zabbix +# @param listenport Listen port for the zabbix-server. Default: 10051 +# @param sourceip Source ip address for outgoing connections. +# @param logfile Name of log file. +# @param logfilesize Maximum size of log file in MB. +# @param logtype Specifies where log messages are written to. (options: console, file, system) +# @param debuglevel Specifies debug level. +# @param pidfile Name of pid file. +# @param database_host Database host name. +# @param database_name Database name. +# @param database_schema Schema name. used for ibm db2. +# @param database_double_ieee754 +# Enable extended range of float values for new installs of Zabbix >= 5.0 and +# after patching upgraded installs to 5.0 or greater. +# https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values +# @param database_user Database user. ignored for sqlite. +# @param database_password Database password. ignored for sqlite. +# @param database_socket Path to mysql socket. +# @param database_port Database port when not using local socket. Ignored for sqlite. +# @param database_charset The default charset of the database. +# @param database_collate The default collation of the database. +# @param database_tablespace The tablespace the database will be created in. This setting only affects PostgreSQL databases. +# @param database_tlsconnect +# Available options: +# * required - connect using TLS +# * verify_ca - connect using TLS and verify certificate +# * verify_full - connect using TLS, verify certificate and verify that database identity specified by DBHost matches its certificate +# @param database_tlscafile Full pathname of a file containing the top-level CA(s) certificates for database certificate verification. +# @param startpollers Number of pre-forked instances of pollers. +# @param startpreprocessors Number of pre-forked instances of preprocessing workers +# @param startipmipollers Number of pre-forked instances of ipmi pollers. +# @param startpollersunreachable Number of pre-forked instances of pollers for unreachable hosts (including ipmi). +# @param starttrappers Number of pre-forked instances of trappers. +# @param startpingers Number of pre-forked instances of icmp pingers. +# @param startalerters Number of pre-forked instances of alerters. +# @param startdiscoverers Number of pre-forked instances of discoverers. +# @param startescalators Number of pre-forked instances of escalators. +# @param starthttppollers Number of pre-forked instances of http pollers. +# @param starttimers Number of pre-forked instances of timers. +# @param javagateway IP address (or hostname) of zabbix java gateway. +# @param javagatewayport Port that zabbix java gateway listens on. +# @param startjavapollers Number of pre-forked instances of java pollers. +# @param startlldprocessors Number of pre-forked instances of low-level discovery (LLD) workers. +# @param startvmwarecollectors Number of pre-forked vmware collector instances. +# @param vaultdbpath Vault path from where credentials for database will be retrieved by keys 'password' and 'username'. +# @param vaulttoken +# Vault authentication token that should have been generated exclusively for Zabbix proxy with read-only +# permission to the path specified in the optional VaultDBPath configuration parameter. +# @param vaulturl Vault server HTTP[S] URL. System-wide CA certificates directory will be used if SSLCALocation is not specified. +# @param vmwarefrequency How often zabbix will connect to vmware service to obtain a new datan. +# @param vmwarecachesize Size of vmware cache, in bytes. +# @param vmwaretimeout The maximum number of seconds vmware collector will wait for a response from VMware service. +# @param snmptrapperfile Temporary file used for passing data from snmp trap daemon to the server. +# @param startsnmptrapper If 1, snmp trapper process is started. +# @param listenip List of comma delimited ip addresses that the zabbix-server should listen on. +# @param housekeepingfrequency How often zabbix will perform housekeeping procedure (in hours). +# @param maxhousekeeperdelete +# the table "housekeeper" contains "tasks" for housekeeping procedure in the format: +# [housekeeperid], [tablename], [field], [value]. +# no more than 'maxhousekeeperdelete' rows (corresponding to [tablename], [field], [value]) +# will be deleted per one task in one housekeeping cycle. +# sqlite3 does not use this parameter, deletes all corresponding rows without a limit. +# if set to 0 then no limit is used at all. in this case you must know what you are doing! +# @param cachesize Size of configuration cache, in bytes. +# @param cacheupdatefrequency How often zabbix will perform update of configuration cache, in seconds. +# @param startdbsyncers Number of pre-forked instances of db syncers. +# @param historycachesize Size of history cache, in bytes. +# @param historyindexcachesize Size of history index cache, in bytes. +# @param trendcachesize Size of trend cache, in bytes. +# @param valuecachesize Size of history value cache, in bytes. +# @param timeout Specifies how long we wait for agent, snmp device or external check (in seconds). +# @param tlscafile Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. +# @param tlscertfile Full pathname of a file containing the server certificate or certificate chain. +# @param tlscrlfile Full pathname of a file containing revoked certificates. +# @param tlskeyfile Full pathname of a file containing the server private key. +# @param tlscipherall +# GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +# for certificate- and PSK-based encryption. +# @param tlscipherall13 +# Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +# for certificate- and PSK-based encryption. +# @param tlsciphercert +# GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +# for certificate-based encryption. +# @param tlsciphercert13 +# Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +# for certificate-based encryption. +# @param tlscipherpsk +# GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +# for PSK-based encryption. +# @param tlscipherpsk13 +# Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +# for PSK-based encryption. +# @param trappertimeout Specifies how many seconds trapper may spend processing new data. +# @param unreachableperiod After how many seconds of unreachability treat a host as unavailable. +# @param unavailabledelay How often host is checked for availability during the unavailability period, in seconds. +# @param unreachabledelay How often host is checked for availability during the unreachability period, in seconds. +# @param alertscriptspath Full path to location of custom alert scripts. +# @param externalscripts Full path to location of external scripts. +# @param fpinglocation Location of fping. +# @param fping6location Location of fping6. +# @param sshkeylocation Location of public and private keys for ssh checks and actions. +# @param logslowqueries How long a database query may take before being logged (in milliseconds). +# @param tmpdir Temporary directory. +# @param startproxypollers Number of pre-forked instances of pollers for passive proxies. +# @param proxyconfigfrequency How often zabbix server sends configuration data to a zabbix proxy in seconds. +# @param proxydatafrequency How often zabbix server requests history data from a zabbix proxy in seconds. +# @param allowroot Allow the server to run as 'root'. +# @param include_dir You may include individual files or all files in a directory in the configuration file. +# @param loadmodulepath Full path to location of server modules. +# @param loadmodule Module to load at server startup. +# @param socketdir +# IPC socket directory. +# Directory to store IPC sockets used by internal Zabbix services. +# @param manage_selinux Whether we should manage SELinux rules. +# @param additional_service_params Additional parameters to pass to the service. +# @param zabbix_user User the zabbix service will run as. +# @param zabbix_server_name +# The fqdn name of the host running the zabbix-server. When single node: +# localhost +# This can also be used to upave a different name such as "Zabbix DEV" +# @param saml_sp_key The location of the SAML Service Provider Key file. +# @param saml_sp_cert The location of the SAML Service Provider Certificate. +# @param saml_idp_cert The location of the SAML Identity Provider Certificate. +# @param saml_settings A hash of additional SAML SSO settings. +# @example Single host setup: +# class { 'zabbix': +# zabbix_url => 'zabbix.dj-wasabi.nl', +# } # +# @example This assumes that you want to use the postgresql database. If not and you want to supply your own database crendentials: +# class { 'zabbix': +# zabbix_url => 'zabbix.dj-wasabi.nl', +# database_type => 'mysql', +# database_user => 'zabbix', +# database_password => 'ThisIsVeryDifficult.nl', +# } +# @author Werner Dijkerman ikben@werner-dijkerman.nl class zabbix ( $zabbix_url = '', $zabbix_version = $zabbix::params::zabbix_version, diff --git a/manifests/javagateway.pp b/manifests/javagateway.pp index 4e2c29186..b88b9a86b 100644 --- a/manifests/javagateway.pp +++ b/manifests/javagateway.pp @@ -1,55 +1,18 @@ -# == Class: zabbix::javagateway -# -# This will install and configure the zabbix-agent deamon -# -# === Requirements -# -# No requirements. -# -# === Parameters -# -# [*zabbix_version*] -# This is the zabbix version. -# -# [*zabbix_package_state*] -# The state of the package that needs to be installed: present or latest. -# Default: present -# -# [*manage_firewall*] -# When true, it will create iptables rules. -# -# [*manage_repo*] -# When true, it will create repository for installing the javagateway. -# -# [*pidfile*] -# Name of pid file. -# -# [*listenip*] -# List of comma delimited ip addresses that the agent should listen on. -# -# [*listenport*] -# Agent will listen on this port for connections from the server. -# -# [*startpollers*] -# Number of worker threads to start. -# -# [*timeout*] -# Number of worker threads to start. -# -# === Example -# +# @summary This will install and configure the zabbix-agent deamon +# @param zabbix_version This is the zabbix version. +# @param zabbix_package_state The state of the package that needs to be installed: present or latest. +# @param manage_firewall When true, it will create iptables rules. +# @param manage_repo When true, it will create repository for installing the javagateway. +# @param pidfile Name of pid file. +# @param listenip List of comma delimited ip addresses that the agent should listen on. +# @param listenport Agent will listen on this port for connections from the server. +# @param startpollers Number of worker threads to start. +# @param timeout Number of worker threads to start. +# @example # class { 'zabbix::javagateway': -# zabbix_version => '2.2', +# zabbix_version => '5.2', # } -# -# === Authors -# -# Author Name: ikben@werner-dijkerman.nl -# -# === Copyright -# -# Copyright 2014 Werner Dijkerman -# +# @author Werner Dijkerman ikben@werner-dijkerman.nl class zabbix::javagateway ( $zabbix_version = $zabbix::params::zabbix_version, $zabbix_package_state = $zabbix::params::zabbix_package_state, diff --git a/manifests/params.pp b/manifests/params.pp index 475f431aa..8fdae3833 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,15 +1,4 @@ -# class: zabbix::params -# -# this class manages zabbix server parameters -# -# parameters: -# -# actions: -# -# requires: -# -# sample usage: -# +# @summary This class manages zabbix server parameters class zabbix::params { # It seems that ubuntu has an different fping path... case $facts['os']['name'] { @@ -417,7 +406,6 @@ $proxy_offlinebuffer = '1' $proxy_pidfile = '/var/run/zabbix/zabbix_proxy.pid' $proxy_service_name = 'zabbix-proxy' - $proxy_enablesnmpbulkrequests = undef $proxy_snmptrapper = '0' $proxy_snmptrapperfile = '/tmp/zabbix_traps.tmp' $proxy_sourceip = undef diff --git a/manifests/proxy.pp b/manifests/proxy.pp index 9e26eccd6..df3b2343a 100644 --- a/manifests/proxy.pp +++ b/manifests/proxy.pp @@ -1,322 +1,155 @@ -# == Class: zabbix::proxy -# -# This will install and configure the zabbix-proxy deamon -# -# === Requirements -# -# When 'manage_database' is set to true, the corresponding database class -# in 'database_type' should be required. -# -# === Parameters -# -# [*database_type*] -# Type of database. Can use the following 3 databases: -# - postgresql -# - mysql -# - sqlite -# -# [*database_path*] +# @summary This will install and configure the zabbix-proxy deamon +# @param database_type Type of database. Can use the following 3 databases: postgresql, mysql, sqlite +# @param database_path # When database binaries are not found on the default path: # /bin:/usr/bin:/usr/local/sbin:/usr/local/bin # you can use this parameter to add the database_path to the above mentiond # path. -# -# [*zabbix_version*] -# This is the zabbix version. -# -# [*zabbix_package_state*] -# The state of the package that needs to be installed: present or latest. -# Default: present -# -# [*manage_database*] -# When true, it will configure the database and execute the sql scripts. -# -# [*manage_firewall*] -# When true, it will create iptables rules. -# -# [*manage_repo*] -# When true, it will create repository for installing the proxy. -# -# [*manage_resources*] -# When true, it will export resources so that the zabbix-server can create -# via the zabbix-api proxy. -# -# [*use_ip*] +# @param zabbix_version This is the zabbix version. +# @param zabbix_package_state The state of the package that needs to be installed: present or latest. +# @param manage_database When true, it will configure the database and execute the sql scripts. +# @param manage_firewall When true, it will create iptables rules. +# @param manage_repo When true, it will create repository for installing the proxy. +# @param manage_resources When true, it will export resources so that the zabbix-server can create via the zabbix-api proxy. +# @param manage_service +# When true, it will ensure service running and enabled. +# When false, it does not care about service +# @param zabbix_proxy Hostname of zabbix proxy. +# @param zabbix_proxy_ip IP of zabbix proxy. +# @param use_ip # When true, when creating proxies via the zabbix-api, it will configure that # connection should me made via ip, not fqdn. -# -# [*zbx_templates*] -# Template which will be added when proxy is configured. -# -# [*proxy_configfile_path*] -# Proxy config file path defaults to /etc/zabbix/zabbix_proxy.conf -# -# [*mode*] -# Proxy operating mode. -# -# [*zabbix_server_host*] -# Hostname or the ipaddress of the zabbix-server. -# -# [*zabbix_server_port*] -# Port on which the server is listening. -# -# [*hostname*] -# Hostname for the proxy. Default is $::fqdn or this parameter. -# -# [*listenport*] -# Listen port for trapper. -# -# [*sourceip*] -# Source ip address for outgoing connections. -# -# [*enableremotecommands*] -# Whether remote commands from zabbix server are allowed. -# -# [*logremotecommands*] -# Enable logging of executed shell commands as warnings. -# -# [*logfile*] -# Name of log file. -# -# [*logfilesize*] -# Maximum size of log file in MB. -# -# [*logtype*] -# Specifies where log messages are written to. Can be one of: -# - console -# - file -# - system -# -# [*debuglevel*] -# Specifies debug level. -# -# [*pidfile*] -# Name of pid file. -# -# [*database_host*] -# Database host name. -# -# [*database_name*] -# Database name. -# -# [*database_schema*] -# Schema name. used for ibm db2. -# -# [*database_user*] -# Database user. ignored for sqlite. -# -# [*database_password*] -# Database password. ignored for sqlite. -# -# [*database_socket*] -# Path to mysql socket. -# -# [*database_port*] -# Database port when not using local socket. Ignored for sqlite. -# -# [*localbuffer*] -# Proxy will keep data locally for N hours, even if the data have already been synced with the server -# -# [*offlinebuffer*] -# Proxy will keep data for N hours in case if no connectivity with Zabbix Server -# -# [*heartbeatfrequency*] -# Unique nodeid in distributed setup. -# -# [*configfrequency*] -# How often proxy retrieves configuration data from Zabbix Server in seconds. -# -# [*datasenderfrequency*] -# Proxy will send collected data to the Server every N seconds. -# -# [*startpollers*] -# Number of pre-forked instances of pollers. -# -# [*startpreprocessors*] -# Number of pre-forked instances of preprocessing workers -# -# [*startipmipollers*] -# Number of pre-forked instances of ipmi pollers. -# -# [*startpollersunreachable*] -# Number of pre-forked instances of pollers for unreachable hosts (including ipmi). -# -# [*starttrappers*] -# Number of pre-forked instances of trappers. -# -# [*startpingers*] -# Number of pre-forked instances of icmp pingers. -# -# [*startdiscoverers*] -# Number of pre-forked instances of discoverers. -# -# [*starthttppollers*] -# Number of pre-forked instances of http pollers. -# -# [*javagateway_host*] -# IP address (or hostname) of zabbix java gateway. -# -# [*javagateway_port*] -# Port that zabbix java gateway listens on. -# -# [*startjavapollers*] -# Number of pre-forked instances of java pollers. -# -# [*startvmwarecollectors*] -# Number of pre-forked vmware collector instances. -# -# [*vmwarefrequency*] -# How often zabbix will connect to vmware service to obtain a new datan. -# -# [*vmwarecachesize*] -# Size of vmware cache, in bytes. -# -# [*vaultdbpath*] -# Vault path from where credentials for database will be retrieved by keys 'password' and 'username'. -# -# [*vaulttoken*] +# @param zbx_templates Template which will be added when proxy is configured. +# @param proxy_configfile_path Proxy config file path defaults to /etc/zabbix/zabbix_proxy.conf +# @param proxy_service_name The service name of Zabbix proxy. +# @param mode Proxy operating mode. +# @param zabbix_server_host Hostname or the ipaddress of the zabbix-server. +# @param zabbix_server_port Port on which the server is listening. +# @param hostname Hostname for the proxy. Default is $::fqdn or this parameter. +# @param listenport Listen port for trapper. +# @param sourceip Source ip address for outgoing connections. +# @param enableremotecommands Whether remote commands from zabbix server are allowed. +# @param logremotecommands Enable logging of executed shell commands as warnings. +# @param logfile Name of log file. +# @param logfilesize Maximum size of log file in MB. +# @param logtype Specifies where log messages are written to. Can be one of: console, file, system +# @param debuglevel Specifies debug level. +# @param pidfile Name of pid file. +# @param database_schema_path The path to the directory containing the .sql schema files +# @param database_host Database host name. +# @param database_name Database name. +# @param database_schema Schema name. used for ibm db2. +# @param database_user Database user. ignored for sqlite. +# @param database_password Database password. ignored for sqlite. +# @param database_socket Path to mysql socket. +# @param database_port Database port when not using local socket. Ignored for sqlite. +# @param database_tlsconnect +# Available options: +# * required - connect using TLS +# * verify_ca - connect using TLS and verify certificate +# * verify_full - connect using TLS, verify certificate and verify that database identity specified by DBHost matches its certificate +# @param database_tlscafile Full pathname of a file containing the top-level CA(s) certificates for database certificate verification. +# @param database_tlscertfile Full pathname of file containing Zabbix server certificate for authenticating to database. +# @param database_tlskeyfile Full pathname of file containing the private key for authenticating to database. +# @param database_tlscipher The list of encryption ciphers that Zabbix server permits for TLS protocols up through TLSv1.2. +# @param database_tlscipher13 The list of encryption ciphersuites that Zabbix server permits for TLSv1.3 protocol. +# @param localbuffer Proxy will keep data locally for N hours, even if the data have already been synced with the server +# @param offlinebuffer Proxy will keep data for N hours in case if no connectivity with Zabbix Server +# @param heartbeatfrequency Unique nodeid in distributed setup. +# @param configfrequency How often proxy retrieves configuration data from Zabbix Server in seconds. +# @param datasenderfrequency Proxy will send collected data to the Server every N seconds. +# @param startpollers Number of pre-forked instances of pollers. +# @param startpreprocessors Number of pre-forked instances of preprocessing workers +# @param startipmipollers Number of pre-forked instances of ipmi pollers. +# @param startpollersunreachable Number of pre-forked instances of pollers for unreachable hosts (including ipmi). +# @param starttrappers Number of pre-forked instances of trappers. +# @param startpingers Number of pre-forked instances of icmp pingers. +# @param startdiscoverers Number of pre-forked instances of discoverers. +# @param starthttppollers Number of pre-forked instances of http pollers. +# @param javagateway IP address (or hostname) of zabbix java gateway. +# @param javagatewayport Port that zabbix java gateway listens on. +# @param startjavapollers Number of pre-forked instances of java pollers. +# @param startvmwarecollectors Number of pre-forked vmware collector instances. +# @param vmwarefrequency How often zabbix will connect to vmware service to obtain a new datan. +# @param vmwareperffrequency +# Delay in seconds between performance counter statistics retrieval from a single VMware service. +# This delay should be set to the least update interval of any VMware monitoring item that uses VMware performance counters. +# @param vmwaretimeout The maximum number of seconds vmware collector will wait for a response from VMware service (vCenter or ESX hypervisor). +# @param vmwarecachesize Size of vmware cache, in bytes. +# @param vaultdbpath Vault path from where credentials for database will be retrieved by keys 'password' and 'username'. +# @param vaulttoken # Vault authentication token that should have been generated exclusively for Zabbix proxy with read-only # permission to the path specified in the optional VaultDBPath configuration parameter. -# -# [*vaulturl*] -# Vault server HTTP[S] URL. System-wide CA certificates directory will be used if SSLCALocation is not specified. -# -# [*snmptrapperfile*] -# Temporary file used for passing data from snmp trap daemon to the server. -# -# [*startsnmptrapper*] -# If 1, snmp trapper process is started. -# -# [*listenip*] -# List of comma delimited ip addresses that the trapper should listen on. -# -# [*housekeepingfrequency*] -# How often Zabbix will perform housekeeping procedure (in hours). -# -# [*cachesize*] -# Size of configuration cache, in MB. -# -# [*startdbsyncers*] -# Number of pre-forked instances of db syncers. -# -# [*historycachesize*] -# Size of history cache, in bytes. -# -# [*historyindexcachesize*] -# Size of history index cache, in bytes. -# -# [*historytextcachesize*] -# Size of text history cache, in bytes. -# -# [*timeout*] -# Specifies how long we wait for agent, snmp device or external check (in seconds). -# -# [*tlsaccept*] -# What incoming connections to accept from Zabbix server. Used for a passive proxy, ignored on an active proxy. -# -# [*tlscafile*] -# Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. -# -# [*tlscertfile*] -# Full pathname of a file containing the proxy certificate or certificate chain. -# -# [*tlsconnect*] -# How the proxy should connect to Zabbix server. Used for an active proxy, ignored on a passive proxy. -# -# [*tlscrlfile*] -# Full pathname of a file containing revoked certificates. -# -# [*tlskeyfile*] -# Full pathname of a file containing the proxy private key. -# -# [*tlspskfile*] -# Full pathname of a file containing the pre-shared key. -# -# [*tlspskidentity*] -# Unique, case sensitive string used to identify the pre-shared key. -# -# [*tlsservercertissuer*] -# Allowed server certificate issuer. -# -# [*tlsservercertsubject*] -# Allowed server certificate subject. -# -# [*trappertimeout*] -# Specifies how many seconds trapper may spend processing new data. -# -# [*unreachableperiod*] -# After how many seconds of unreachability treat a host as unavailable. -# -# [*unavailabledelay*] -# How often host is checked for availability during the unavailability period, in seconds. -# -# [*unreachabledelay*] -# How often host is checked for availability during the unreachability period, in seconds. -# -# [*externalscripts*] -# Full path to location of external scripts. -# -# [*fpinglocation*] -# Location of fping. -# -# [*fping6location*] -# Location of fping6. -# -# [*sshkeylocation*] -# Location of public and private keys for ssh checks and actions. -# -# [*sslcalocation_dir*] -# Location of certificate authority (CA) files for SSL server certificate verification. -# -# [*sslcertlocation_dir*] -# Location of SSL client certificate files for client authentication. -# -# [*sslkeylocation_dir*] -# Location of SSL private key files for client authentication. -# -# [*logslowqueries*] -# How long a database query may take before being logged (in milliseconds). -# -# [*tmpdir*] -# Temporary directory. -# -# [*allowroot*] -# Allow the server to run as 'root'. -# -# [*include_dir*] -# You may include individual files or all files in a directory in the configuration file. -# -# [*loadmodulepath*] -# Full path to location of server modules. -# -# [*loadmodule*] -# Module to load at server startup. -# -# [*socketdir*] -# IPC socket directory. -# Directory to store IPC sockets used by internal Zabbix services. -# -# === Example -# -# When you want to run everything on one machine, you can use the following -# example: +# @param vaulturl Vault server HTTP[S] URL. System-wide CA certificates directory will be used if SSLCALocation is not specified. +# @param snmptrapperfile Temporary file used for passing data from snmp trap daemon to the server. +# @param snmptrapper If 1, snmp trapper process is started. +# @param listenip List of comma delimited ip addresses that the trapper should listen on. +# @param housekeepingfrequency How often Zabbix will perform housekeeping procedure (in hours). +# @param cachesize Size of configuration cache, in MB. +# @param startdbsyncers Number of pre-forked instances of db syncers. +# @param historycachesize Size of history cache, in bytes. +# @param historyindexcachesize Size of history index cache, in bytes. +# @param historytextcachesize Size of text history cache, in bytes. +# @param timeout Specifies how long we wait for agent, snmp device or external check (in seconds). +# @param tlsaccept What incoming connections to accept from Zabbix server. Used for a passive proxy, ignored on an active proxy. +# @param tlscafile Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. +# @param tlscertfile Full pathname of a file containing the proxy certificate or certificate chain. +# @param tlsconnect How the proxy should connect to Zabbix server. Used for an active proxy, ignored on a passive proxy. +# @param tlscrlfile Full pathname of a file containing revoked certificates. +# @param tlskeyfile Full pathname of a file containing the proxy private key. +# @param tlspskfile Full pathname of a file containing the pre-shared key. +# @param tlspskidentity Unique, case sensitive string used to identify the pre-shared key. +# @param tlscipherall +# GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +# for certificate- and PSK-based encryption. +# @param tlscipherall13 +# Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +# for certificate- and PSK-based encryption. +# @param tlsciphercert +# GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +# for certificate-based encryption. +# @param tlsciphercert13 +# Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +# for certificate-based encryption. +# @param tlscipherpsk +# GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria +# for PSK-based encryption. +# @param tlscipherpsk13 +# Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria +# for PSK-based encryption. +# @param tlsservercertissuer Allowed server certificate issuer. +# @param tlsservercertsubject Allowed server certificate subject. +# @param trappertimeout Specifies how many seconds trapper may spend processing new data. +# @param unreachableperiod After how many seconds of unreachability treat a host as unavailable. +# @param unavaliabledelay How often host is checked for availability during the unavailability period, in seconds. +# @param unreachabedelay How often host is checked for availability during the unreachability period, in seconds. +# @param externalscripts Full path to location of external scripts. +# @param fpinglocation Location of fping. +# @param fping6location Location of fping6. +# @param sshkeylocation Location of public and private keys for ssh checks and actions. +# @param sslcalocation_dir Location of certificate authority (CA) files for SSL server certificate verification. +# @param sslcertlocation_dir Location of SSL client certificate files for client authentication. +# @param sslkeylocation_dir Location of SSL private key files for client authentication. +# @param logslowqueries How long a database query may take before being logged (in milliseconds). +# @param tmpdir Temporary directory. +# @param allowroot Allow the server to run as 'root'. +# @param include_dir You may include individual files or all files in a directory in the configuration file. +# @param loadmodulepath Full path to location of server modules. +# @param loadmodule Module to load at server startup. +# @param manage_selinux Whether we should manage SELinux rules. +# @param socketdir IPC socket directory. Directory to store IPC sockets used by internal Zabbix services. +# @example When you want to run everything on one machine, you can use the following: # class { 'zabbix::proxy': # zabbix_server_host => '192.168.1.1', # zabbix_server_port => '10051', # } -# -# When you want to use mysql: +# @example When you want to use mysql: # class { 'zabbix::proxy': # zabbix_server_host => '192.168.1.1', # zabbix_server_port => '10051', # database_type => 'mysql', # } -# -# The zabbix::proxy can also be split like the server into 2 servers: -# - zabbix::proxy -# - zabbix::database -# -# The following is an example of running the proxy on 2 servers: +# @example The following is an example of running the proxy on 2 servers: # node 'wdpuppet03.dj-wasabi.local' { # #class { 'postgresql::client': } # class { 'mysql::client': } @@ -349,20 +182,7 @@ # database_password => 'zabbix-proxy', # } # } -# -# The example of above is running the proxy with an mysql backend. When -# you want to use postgresql, you'll need to uncomment the postgresql class -# and the zabbix_proxy_ip and comment the mysql class, database_type and the -# zabbix_proxy parameters. -# -# === Authors -# -# Author Name: ikben@werner-dijkerman.nl -# -# === Copyright -# -# Copyright 2014 Werner Dijkerman -# +# @author Werner Dijkerman class zabbix::proxy ( Zabbix::Databases $database_type = $zabbix::params::database_type, $database_path = $zabbix::params::database_path, @@ -430,7 +250,6 @@ $vmwareperffrequency = $zabbix::params::proxy_vmwareperffrequency, $vmwarecachesize = $zabbix::params::proxy_vmwarecachesize, $vmwaretimeout = $zabbix::params::proxy_vmwaretimeout, - $enablesnmpbulkrequests = $zabbix::params::proxy_enablesnmpbulkrequests, $snmptrapperfile = $zabbix::params::proxy_snmptrapperfile, $snmptrapper = $zabbix::params::proxy_snmptrapper, $listenip = $zabbix::params::proxy_listenip, diff --git a/manifests/repo.pp b/manifests/repo.pp index 800ce0d7e..33411edc1 100644 --- a/manifests/repo.pp +++ b/manifests/repo.pp @@ -1,36 +1,14 @@ -# == Class: zabbix::repo -# -# If enabled, this will install the repository used for installing zabbix -# -# Please note: -# This class will be called from zabbix::server, zabbix::proxy and -# zabbix::agent. No need for calling this class manually. -# -# === Parameters -# -# [*manage_repo*] -# When true, it will create repository for installing the server. -# -# [*zabbix_version*] -# This is the zabbix version. -# -# [*repo_location*] -# A custom repo location (e.g. your own mirror) -# -# [*unsupported_repo_location*] +# @summary If enabled, this will install the repository used for installing zabbix +# @param manage_repo When true, it will create repository for installing the server. +# @param manage_apt Whether the module should manage apt repositories for Debian based systems. +# @param zabbix_version This is the zabbix version. +# @param repo_location A custom repo location (e.g. your own mirror) +# @param frontend_repo_location A custom repo location for frontend package. +# @param unsupported_repo_location # A custom repo location for unsupported content (e.g. your own mirror) # Currently only supported under RedHat based systems. -# -# === Authors -# -# Author Name: -# ikben@werner-dijkerman.nl -# Tim Meusel -# -# === Copyright -# -# Copyright 2014 Werner Dijkerman -# +# @author Werner Dijkerman +# @author Tim Meusel class zabbix::repo ( Boolean $manage_repo = $zabbix::params::manage_repo, Boolean $manage_apt = $zabbix::params::manage_apt, diff --git a/manifests/resources/agent.pp b/manifests/resources/agent.pp index a53bc76a8..670f69c7a 100644 --- a/manifests/resources/agent.pp +++ b/manifests/resources/agent.pp @@ -1,18 +1,15 @@ -# == Class zabbix::resources::agent -# -# This will create an resources into puppetdb -# for automatically configuring agent into -# zabbix front-end. -# -# === Requirements -# -# Nothing. -# -# When manage_resource is set to true, this class -# will be loaded from 'zabbix::agent'. So no need -# for loading this class manually. -# -# +# @summary This will create resources into puppetdb for automatically configuring agent into zabbix front-end. +# @param hostname Hostname of the machine +# @param ipaddress The IP address of the machine running zabbix agent. +# @param use_ip Use ipadress instead of dns to connect. +# @param port The port that the zabbix agent is listening on. +# @param group *Deprecated* (see groups parameter) Name of the hostgroup. +# @param groups An array of groups the host belongs to. +# @param group_create Whether to create hostgroup if missing. +# @param templates List of templates which should be attached to this host. +# @param macros Array of hashes (macros) which should be attached to this host. +# @param proxy Whether it is monitored by an proxy or not. +# @param interfacetype Internally used identifier for the host interface class zabbix::resources::agent ( $hostname = undef, $ipaddress = undef, diff --git a/manifests/resources/proxy.pp b/manifests/resources/proxy.pp index df3a2bc36..ebbc4a199 100644 --- a/manifests/resources/proxy.pp +++ b/manifests/resources/proxy.pp @@ -1,17 +1,9 @@ -# == Class zabbix::resources::proxy -# -# This will create an resources into puppetdb -# for automatically configuring proxy agent into -# zabbix front-end. -# -# === Requirements -# -# Nothing. -# -# When manage_resource is set to true, this class -# will be loaded from 'zabbix::proxy'. So no need -# for loading this class manually. - +# @summary This will create resources into puppetdb for automatically configuring proxy agent into zabbix front-end. +# @param hostname Hostname of the proxy. +# @param ipaddress The IP address of the machine running zabbix proxy. +# @param use_ip Whether to use ipadress instead of dns to connect. +# @param mode The kind of mode the proxy running. Active (0) or passive (1). +# @param port The port that the zabbix proxy is listening on. class zabbix::resources::proxy ( $hostname = undef, $ipaddress = undef, diff --git a/manifests/resources/template.pp b/manifests/resources/template.pp index 818249250..96545dbbf 100644 --- a/manifests/resources/template.pp +++ b/manifests/resources/template.pp @@ -1,18 +1,8 @@ -# == Class zabbix::resources::template -# -# This will create an resources into puppetdb -# for automatically configuring agent into -# zabbix front-end. -# -# === Requirements -# -# Nothing. -# -# When manage_resource is set to true, this class -# will be loaded from 'zabbix::template'. So no need -# for loading this class manually. -# -# +# @summary This will create resources into puppetdb for automatically configuring agent into zabbix front-end. +# @param template_dir The directory containing zabbix templates +# @param template_name The name of template. +# @param template_source Template source file. +# @param zabbix_version Zabbix version that the template will be installed on. define zabbix::resources::template ( $template_dir = $zabbix::params::zabbix_template_dir, $template_name = $title, diff --git a/manifests/resources/userparameters.pp b/manifests/resources/userparameters.pp index ceca69226..23ed58417 100644 --- a/manifests/resources/userparameters.pp +++ b/manifests/resources/userparameters.pp @@ -1,17 +1,7 @@ -# == Define zabbix::resources::userparameters -# -# This will create an resources into puppetdb -# for automatically configuring agent into -# zabbix front-end. -# -# === Requirements -# -# Nothing. -# -# When manage_resource is set to true, this class -# will be loaded from 'zabbix::userparameters'. So -# no need for loading this class manually. -# +# @summary This will create resources into puppetdb for automatically configuring agent into zabbix front-end. +# @param ensure Ensure resource. +# @param hostname Hostname of the machine. +# @param template Template which should be attached to this host. define zabbix::resources::userparameters ( $ensure, $hostname, diff --git a/manifests/resources/web.pp b/manifests/resources/web.pp index 4d8d8abdf..8de4c2c97 100644 --- a/manifests/resources/web.pp +++ b/manifests/resources/web.pp @@ -1,17 +1,8 @@ -# == Class zabbix::resources::server -# -# This will load all zabbix related items from -# the puppet database and uses the zabbixapi -# gem to add/configure hosts via the zabbix-api -# -# === Requirements -# -# Nothing. -# -# When manage_resource is set to true, this class -# will be loaded from 'zabbix::server'. So no need -# for loading this class manually. -# +# @summary This will load all zabbix related items from the puppet database and uses the zabbixapi gem to add/configure hosts via the zabbix-api +# @param zabbix_url Url on which zabbix is available. +# @param zabbix_user API username. +# @param zabbix_pass API password. +# @param apache_use_ssl Whether to use ssl or not. class zabbix::resources::web ( String[1] $zabbix_url, String[1] $zabbix_user, diff --git a/manifests/sender.pp b/manifests/sender.pp index d7c0f4f6f..57a61e71e 100644 --- a/manifests/sender.pp +++ b/manifests/sender.pp @@ -1,23 +1,7 @@ -# == Class zabbix::sender -# -# This will install and configure the zabbix-agent deamon -# -# === Requirements -# -# No special requirements -# -# === Parameters -# -# [*zabbix_version*] -# This is the zabbix version. -# -# [*zabbix_package_state*] -# The state of the package that needs to be installed: present or latest. -# Default: present -# -# [*manage_repo*] -# When true, it will create repository for installing the agent. -# +# @summary This will install and configure the zabbix-agent deamon +# @param zabbix_version This is the zabbix version. +# @param zabbix_package_state The state of the package that needs to be installed: present or latest. +# @param manage_repo When true, it will create repository for installing the agent. class zabbix::sender ( $zabbix_version = $zabbix::params::zabbix_version, $zabbix_package_state = $zabbix::params::zabbix_package_state, diff --git a/manifests/server.pp b/manifests/server.pp index 726a8d4c4..d4fb6ae9b 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -1,327 +1,145 @@ -# == Class: zabbix::server -# -# This will install and configure the zabbix-server deamon -# -# === Requirements -# -# -# === Parameters -# -# [*database_type*] +# @summary This will install and configure the zabbix-server deamon +# @param database_type # Type of database. Can use the following 2 databases: # - postgresql # - mysql -# -# [*database_path*] +# @param database_path # When database binaries are not found on the default path: # /bin:/usr/bin:/usr/local/sbin:/usr/local/bin # you can use this parameter to add the database_path to the above mentioned # path. -# -# [*zabbix_version*] -# This is the zabbix version. -# Example: 2.4 -# -# [*manage_repo*] -# When true (default) this module will manage the Zabbix repository -# -# [*zabbix_package_state*] -# The state of the package that needs to be installed: present or latest. -# Default: present -# -# [*manage_firewall*] -# When true, it will create iptables rules. -# -# [*manage_service*] +# @param zabbix_version This is the zabbix version. Example: 5.0 +# @param manage_repo When true (default) this module will manage the Zabbix repository. +# @param manage_database When true, it will configure the database and execute the sql scripts. +# @param zabbix_package_state The state of the package that needs to be installed: present or latest. +# @param manage_firewall When true, it will create iptables rules. +# @param manage_service # When true, it will ensure service running and enabled. # When false, it does not care about service -# Default: true -# -# [*server_configfile_path*] -# Server config file path defaults to /etc/zabbix/zabbix_server.conf -# -# [*listenport*] -# Listen port for the zabbix-server. Default: 10051 -# -# [*sourceip*] -# Source ip address for outgoing connections. -# -# [*logfile*] -# Name of log file. -# -# [*logfilesize*] -# Maximum size of log file in MB. -# -# [*logtype*] -# Specifies where log messages are written to. Can be one of: -# - console -# - file -# - system -# -# [*debuglevel*] -# Specifies debug level. -# -# [*pidfile*] -# Name of pid file. -# -# [*database_host*] -# Database host name. -# -# [*database_name*] -# Database name. -# -# [*database_schema*] -# Schema name. used for ibm db2. -# -# [*database_user*] -# Database user. ignored for sqlite. -# -# [*database_password*] -# Database password. ignored for sqlite. -# -# [*database_socket*] -# Path to mysql socket. -# -# [*database_port*] -# Database port when not using local socket. Ignored for sqlite. -# -# [*database_tlsconnect*] +# @param server_configfile_path Server config file path defaults to /etc/zabbix/zabbix_server.conf +# @param server_config_owner The owner of Zabbix's server config file. +# @param server_config_group The group of Zabbix's server config file. +# @param server_service_name The service name of Zabbix server. +# @param pacemaker Whether to control zabbix server through Pacemaker. +# @param pacemaker_resource Zabbix server pacemaker resource. +# @param listenport Listen port for the zabbix-server. Default: 10051 +# @param sourceip Source ip address for outgoing connections. +# @param logfile Name of log file. +# @param logfilesize Maximum size of log file in MB. +# @param logtype Specifies where log messages are written to. (options: console, file, system) +# @param debuglevel Specifies debug level. +# @param pidfile Name of pid file. +# @param database_schema_path The path to the directory containing the .sql schema files +# @param database_host Database host name. +# @param database_name Database name. +# @param database_schema Schema name. used for ibm db2. +# @param database_user Database user. ignored for sqlite. +# @param database_password Database password. ignored for sqlite. +# @param database_socket Path to mysql socket. +# @param database_port Database port when not using local socket. Ignored for sqlite. +# @param database_tlsconnect # Available options: # * required - connect using TLS # * verify_ca - connect using TLS and verify certificate # * verify_full - connect using TLS, verify certificate and verify that database identity specified by DBHost matches its certificate -# -# [*database_tlscafile*] -# Full pathname of a file containing the top-level CA(s) certificates for database certificate verification. -# -# [*database_tlscertfile*] -# Full pathname of file containing Zabbix server certificate for authenticating to database. -# -# [*database_tlskeyfile*] -# Full pathname of file containing the private key for authenticating to database. -# -# [*database_tlscipher*] -# The list of encryption ciphers that Zabbix server permits for TLS protocols up through TLSv1.2. -# -# [*database_tlscipher13*] -# The list of encryption ciphersuites that Zabbix server permits for TLSv1.3 protocol. -# -# [*startpollers*] -# Number of pre-forked instances of pollers. -# -# [*startpreprocessors*] -# Number of pre-forked instances of preprocessing workers -# -# [*startipmipollers*] -# Number of pre-forked instances of ipmi pollers. -# -# [*startpollersunreachable*] -# Number of pre-forked instances of pollers for unreachable hosts (including ipmi). -# -# [*starttrappers*] -# Number of pre-forked instances of trappers. -# -# [*startpingers*] -# Number of pre-forked instances of icmp pingers. -# -# [*startalerters*] -# Number of pre-forked instances of alerters. -# -# [*startdiscoverers*] -# Number of pre-forked instances of discoverers. -# -# [*startescalators*] -# Number of pre-forked instances of escalators. -# -# [*starthttppollers*] -# Number of pre-forked instances of http pollers. -# -# [*starttimers*] -# Number of pre-forked instances of timers. -# -# [*javagateway*] -# IP address (or hostname) of zabbix java gateway. -# -# [*javagatewayport*] -# Port that zabbix java gateway listens on. -# -# [*startjavapollers*] -# Number of pre-forked instances of java pollers. -# -# [*startlldprocessors*] -# Number of pre-forked instances of low-level discovery (LLD) workers. -# -# [*startvmwarecollectors*] -# Number of pre-forked vmware collector instances. -# -# [*vmwarefrequency*] -# How often zabbix will connect to vmware service to obtain a new datan. -# -# [*vaultdbpath*] -# Vault path from where credentials for database will be retrieved by keys 'password' and 'username'. -# -# [*vaulttoken*] +# @param database_tlscafile Full pathname of a file containing the top-level CA(s) certificates for database certificate verification. +# @param database_tlscertfile Full pathname of file containing Zabbix server certificate for authenticating to database. +# @param database_tlskeyfile Full pathname of file containing the private key for authenticating to database. +# @param database_tlscipher The list of encryption ciphers that Zabbix server permits for TLS protocols up through TLSv1.2. +# @param database_tlscipher13 The list of encryption ciphersuites that Zabbix server permits for TLSv1.3 protocol. +# @param startpollers Number of pre-forked instances of pollers. +# @param startpreprocessors Number of pre-forked instances of preprocessing workers +# @param startipmipollers Number of pre-forked instances of ipmi pollers. +# @param startpollersunreachable Number of pre-forked instances of pollers for unreachable hosts (including ipmi). +# @param starttrappers Number of pre-forked instances of trappers. +# @param startpingers Number of pre-forked instances of icmp pingers. +# @param startalerters Number of pre-forked instances of alerters. +# @param startdiscoverers Number of pre-forked instances of discoverers. +# @param startescalators Number of pre-forked instances of escalators. +# @param starthttppollers Number of pre-forked instances of http pollers. +# @param starttimers Number of pre-forked instances of timers. +# @param javagateway IP address (or hostname) of zabbix java gateway. +# @param javagatewayport Port that zabbix java gateway listens on. +# @param startjavapollers Number of pre-forked instances of java pollers. +# @param startlldprocessors Number of pre-forked instances of low-level discovery (LLD) workers. +# @param startvmwarecollectors Number of pre-forked vmware collector instances. +# @param vmwarefrequency How often zabbix will connect to vmware service to obtain a new datan. +# @param vaultdbpath Vault path from where credentials for database will be retrieved by keys 'password' and 'username'. +# @param vaulttoken # Vault authentication token that should have been generated exclusively for Zabbix proxy with read-only # permission to the path specified in the optional VaultDBPath configuration parameter. -# -# [*vaulturl*] -# Vault server HTTP[S] URL. System-wide CA certificates directory will be used if SSLCALocation is not specified. -# -# [*vmwarecachesize*] -# Size of vmware cache, in bytes. -# -# [*vmwaretimeout*] -# The maximum number of seconds vmware collector will wait for a response from VMware service. -# -# [*snmptrapperfile*] -# Temporary file used for passing data from snmp trap daemon to the server. -# -# [*startsnmptrapper*] -# If 1, snmp trapper process is started. -# -# [*listenip*] -# List of comma delimited ip addresses that the zabbix-server should listen on. -# -# [*housekeepingfrequency*] -# How often zabbix will perform housekeeping procedure (in hours). -# -# [*maxhousekeeperdelete*] +# @param vaulturl Vault server HTTP[S] URL. System-wide CA certificates directory will be used if SSLCALocation is not specified. +# @param vmwarecachesize Size of vmware cache, in bytes. +# @param vmwaretimeout The maximum number of seconds vmware collector will wait for a response from VMware service. +# @param snmptrapperfile Temporary file used for passing data from snmp trap daemon to the server. +# @param startsnmptrapper If 1, snmp trapper process is started. +# @param listenip List of comma delimited ip addresses that the zabbix-server should listen on. +# @param housekeepingfrequency How often zabbix will perform housekeeping procedure (in hours). +# @param maxhousekeeperdelete # the table "housekeeper" contains "tasks" for housekeeping procedure in the format: # [housekeeperid], [tablename], [field], [value]. # no more than 'maxhousekeeperdelete' rows (corresponding to [tablename], [field], [value]) # will be deleted per one task in one housekeeping cycle. # sqlite3 does not use this parameter, deletes all corresponding rows without a limit. # if set to 0 then no limit is used at all. in this case you must know what you are doing! -# -# [*cachesize*] -# Size of configuration cache, in bytes. -# -# [*cacheupdatefrequency*] -# How often zabbix will perform update of configuration cache, in seconds. -# -# [*startdbsyncers*] -# Number of pre-forked instances of db syncers. -# -# [*historycachesize*] -# Size of history cache, in bytes. -# -# [*historyindexcachesize*] -# Size of history index cache, in bytes. -# -# [*trendcachesize*] -# Size of trend cache, in bytes. -# -# [*valuecachesize*] -# Size of history value cache, in bytes. -# -# [*timeout*] -# Specifies how long we wait for agent, snmp device or external check (in seconds). -# -# [*tlscafile*] -# Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. -# -# [*tlscertfile*] -# Full pathname of a file containing the server certificate or certificate chain. -# -# [*tlscrlfile*] -# Full pathname of a file containing revoked certificates. -# -# [*tlskeyfile*] -# Full pathname of a file containing the server private key. -# -# [*tlscipherall*] +# @param cachesize Size of configuration cache, in bytes. +# @param cacheupdatefrequency How often zabbix will perform update of configuration cache, in seconds. +# @param startdbsyncers Number of pre-forked instances of db syncers. +# @param historycachesize Size of history cache, in bytes. +# @param historyindexcachesize Size of history index cache, in bytes. +# @param trendcachesize Size of trend cache, in bytes. +# @param valuecachesize Size of history value cache, in bytes. +# @param timeout Specifies how long we wait for agent, snmp device or external check (in seconds). +# @param tlscafile Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. +# @param tlscertfile Full pathname of a file containing the server certificate or certificate chain. +# @param tlscrlfile Full pathname of a file containing revoked certificates. +# @param tlskeyfile Full pathname of a file containing the server private key. +# @param tlscipherall # GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria # for certificate- and PSK-based encryption. -# -# [*tlscipherall13*] +# @param tlscipherall13 # Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria # for certificate- and PSK-based encryption. -# -# [*tlsciphercert*] +# @param tlsciphercert # GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria # for certificate-based encryption. -# -# [*tlsciphercert13*] +# @param tlsciphercert13 # Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria # for certificate-based encryption. -# -# [*tlscipherpsk*] +# @param tlscipherpsk # GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria # for PSK-based encryption. -# -# [*tlscipherpsk13*] +# @param tlscipherpsk13 # Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria # for PSK-based encryption. -# -# [*trappertimeout*] -# Specifies how many seconds trapper may spend processing new data. -# -# [*unreachableperiod*] -# After how many seconds of unreachability treat a host as unavailable. -# -# [*unavailabledelay*] -# How often host is checked for availability during the unavailability period, in seconds. -# -# [*unreachabledelay*] -# How often host is checked for availability during the unreachability period, in seconds. -# -# [*alertscriptspath*] -# Full path to location of custom alert scripts. -# -# [*externalscripts*] -# Full path to location of external scripts. -# -# [*fpinglocation*] -# Location of fping. -# -# [*fping6location*] -# Location of fping6. -# -# [*sshkeylocation*] -# Location of public and private keys for ssh checks and actions. -# -# [*logslowqueries*] -# How long a database query may take before being logged (in milliseconds). -# -# [*tmpdir*] -# Temporary directory. -# -# [*startproxypollers*] -# Number of pre-forked instances of pollers for passive proxies. -# -# [*proxyconfigfrequency*] -# How often zabbix server sends configuration data to a zabbix proxy in seconds. -# -# [*proxydatafrequency*] -# How often zabbix server requests history data from a zabbix proxy in seconds. -# -# [*allowroot*] -# Allow the server to run as 'root'. -# -# [*include_dir*] -# You may include individual files or all files in a directory in the configuration file. -# -# [*loadmodulepath*] -# Full path to location of server modules. -# -# [*loadmodule*] -# Module to load at server startup. -# -# [*sslcertlocation_dir*] -# Location of SSL client certificate files for client authentication. -# -# [*sslkeylocation_dir*] -# Location of SSL private key files for client authentication. -# -# [*manage_startup_script*] -# If the init script should be managed by this module. Attention: This might cause problems with some config options of this module (e.g server_configfile_path) -# -# [*socketdir*] +# @param trappertimeout Specifies how many seconds trapper may spend processing new data. +# @param unreachableperiod After how many seconds of unreachability treat a host as unavailable. +# @param unavailabledelay How often host is checked for availability during the unavailability period, in seconds. +# @param unreachabledelay How often host is checked for availability during the unreachability period, in seconds. +# @param alertscriptspath Full path to location of custom alert scripts. +# @param externalscripts Full path to location of external scripts. +# @param fpinglocation Location of fping. +# @param fping6location Location of fping6. +# @param sshkeylocation Location of public and private keys for ssh checks and actions. +# @param logslowqueries How long a database query may take before being logged (in milliseconds). +# @param tmpdir Temporary directory. +# @param startproxypollers Number of pre-forked instances of pollers for passive proxies. +# @param proxyconfigfrequency How often zabbix server sends configuration data to a zabbix proxy in seconds. +# @param proxydatafrequency How often zabbix server requests history data from a zabbix proxy in seconds. +# @param allowroot Allow the server to run as 'root'. +# @param include_dir You may include individual files or all files in a directory in the configuration file. +# @param loadmodulepath Full path to location of server modules. +# @param loadmodule Module to load at server startup. +# @param sslcertlocation_dir Location of SSL client certificate files for client authentication. +# @param sslkeylocation_dir Location of SSL private key files for client authentication. +# @param manage_selinux Whether we should manage SELinux rules. +# @param additional_service_params Additional parameters to pass to the service. +# @param zabbix_user User the zabbix service will run as. +# @param manage_startup_script If the init script should be managed by this module. Attention: This might cause problems with some config options of this module (e.g server_configfile_path) +# @param socketdir # IPC socket directory. -# Directory to store IPC sockets used by internal Zabbix services. -# -# === Example -# +# Directory to store IPC sockets used by internal Zabbix services. +# @example # When running everything on a single node, please check # documentation in init.pp # The following is an example of an multiple host setup: @@ -343,14 +161,7 @@ # When database_type = postgres, uncomment the postgresql::client class and change or # remove the database_type parameter and comment the mysql::client class. # -# === Authors -# -# Author Name: ikben@werner-dijkerman.nl -# -# === Copyright -# -# Copyright 2014 Werner Dijkerman -# +# @author Werner Dijkerman ikben@werner-dijkerman.nl# class zabbix::server ( Zabbix::Databases $database_type = $zabbix::params::database_type, $database_path = $zabbix::params::database_path, diff --git a/manifests/startup.pp b/manifests/startup.pp index 4417cf125..e9ed42480 100644 --- a/manifests/startup.pp +++ b/manifests/startup.pp @@ -1,15 +1,21 @@ -# == Define: zabbix::startup +# @summary This manage the zabbix related service startup script. +# @param pidfile Location of the PID file +# @param agent_configfile_path Location of Zabbix's agent configuration file +# @param server_configfile_path Location of Zabbix's server configuration file +# @param database_type +# Type of database. Can use the following 2 databases: +# - postgresql +# - mysql +# @param zabbix_user User the zabbix service will run as +# @param additional_service_params Additional parameters to pass to the service +# @param service_type Systemd service type +# @param manage_database When true, it will configure the database and execute the sql scripts. +# @param service_name Name of the service. Defaults to the resource name +# @example +# zabbix::startup { 'agent': } # -# This manage the zabbix related service startup script. -# -# === Requirements -# -# === Parameters -# -# === Example -# -# zabbix::startup { 'agent': -# } +# @example +# zabbix::startup { 'server': } # define zabbix::startup ( Optional[Stdlib::Absolutepath] $pidfile = undef, diff --git a/manifests/template.pp b/manifests/template.pp index 5df617839..4bc6e6653 100644 --- a/manifests/template.pp +++ b/manifests/template.pp @@ -1,34 +1,12 @@ -# == Define zabbix::template -# -# This will upload an Zabbix Template (XML format) -# -# === Requirements -# -# === Parameters -# -# [*templ_name*] -# The name of the template. This name will be found in the Web interface -# -# [*templ_source*] -# The location of the XML file wich needs to be imported. -# -# [*zabbix_version*] -# The Zabbix version on which the template will be installed on. -# -# === Example -# -# zabbix::template { 'Template App MySQL': -# templ_source => 'puppet:///modules/zabbix/MySQL.xml' -# } -# -# === Authors -# -# Author Name: vlad.tkatchev@gmail.com -# -# === Copyright -# -# Copyright 2015 Vladislav Tkatchev -# +# @summary This will upload an Zabbix Template (XML format) +# @param templ_name The name of the template. This name will be found in the Web interface +# @param templ_source The location of the XML file wich needs to be imported. +# @param zabbix_version The Zabbix version on which the template will be installed on. +# @example +# zabbix::template { 'Template App MySQL': +# templ_source => 'puppet:///modules/zabbix/MySQL.xml' +# } +# @author Vladislav Tkatchev define zabbix::template ( $templ_name = $title, $templ_source = '', diff --git a/manifests/userparameter.pp b/manifests/userparameter.pp index 18c0dd839..d6ea3fc88 100644 --- a/manifests/userparameter.pp +++ b/manifests/userparameter.pp @@ -1,33 +1,10 @@ -# == Class: zabbix::userparameter -# -# This class can be used when you use hiera or The Foreman. With this tools -# you can't use and define. This make use of "create_resources". -# -# == Requirements -# -# Hiera or The Foreman -# -# == Parameters -# -# [*data*] -# This is the data in YAML format -# -# == Example -# -# zabbix::userparameter::data: -# MySQL: -# content: UserParameter=mysql.ping,mysqladmin -uroot ping | grep -c alive -# -# -# === Authors -# -# Author Name: ikben@werner-dijkerman.nl -# -# === Copyright -# -# Copyright 2014 Werner Dijkerman -# - +# @summary This class can be used when you use hiera or The Foreman. With this tools you can't use and define. This make use of "create_resources". +# @param data This is the data in YAML format +# @example +# zabbix::userparameter::data: +# MySQL: +# content: UserParameter=mysql.ping,mysqladmin -uroot ping | grep -c alive +# @author Werner Dijkerman class zabbix::userparameter ( Hash $data = {}, ) { diff --git a/manifests/userparameters.pp b/manifests/userparameters.pp index 2ffcbd56e..c77deee40 100644 --- a/manifests/userparameters.pp +++ b/manifests/userparameters.pp @@ -1,64 +1,32 @@ -# == Define: zabbix::userparameters -# -# This will install an userparameters file with keys for items that can be checked -# with zabbix. -# -# === Requirements -# -# === Parameters -# -# [*ensure*] -# If the userparameter should be `present` or `absent` -# -# [*source*] -# File which holds several userparameter entries. -# -# [*content*] -# When you have 1 userparameter entry which you want to install. -# -# [*script*] -# Low level discovery (LLD) script. -# -# [*script_ext*] -# The script extention. Should be started with the dot. Like: .sh .bat .py -# -# [*template*] +# @summary This will install an userparameters file with keys for items that can be checked with zabbix. +# @param ensure If the userparameter should be `present` or `absent` +# @param source File which holds several userparameter entries. +# @param content When you have 1 userparameter entry which you want to install. +# @param script Low level discovery (LLD) script. +# @param script_ext The script extention. Should be started with the dot. Like: .sh .bat .py +# @param template # When you use exported resources (when manage_resources is set to true on other components) # you'll can add the name of the template which correspondents with the 'content' or # 'source' which you add. The template will be added to the host. -# -# [*script_dir*] -# When 'script' is used, this parameter can provide the directly where this script needs to -# be placed. Default: '/usr/bin' -# -# [*config_mode*] +# @param script_dir +# When 'script' is used, this parameter can provide the directly where this script needs to be placed. Default: '/usr/bin' +# @param config_mode # When 'config_mode' is used, this parameter can provide the mode of the config file who will be created # to keep some credidentials private. Default: '0644' -# -# === Example -# +# @example # zabbix::userparameters { 'mysql': # source => 'puppet:///modules/zabbix/mysqld.conf', # } -# +# @example # zabbix::userparameters { 'mysql': # content => 'UserParameter=mysql.ping,mysqladmin -uroot ping | grep -c alive', # } -# -# Or when using exported resources (manage_resources is set to true) +# @example Or when using exported resources (manage_resources is set to true) # zabbix::userparameters { 'mysql': # source => 'puppet:///modules/zabbix/mysqld.conf', # template => 'Template App MySQL', # } -# -# === Authors -# -# Author Name: ikben@werner-dijkerman.nl -# -# === Copyright -# -# Copyright 2014 Werner Dijkerman -# +# @author Werner Dijkerman define zabbix::userparameters ( Enum['present', 'absent'] $ensure = 'present', Optional[Stdlib::Filesource] $source = undef, diff --git a/manifests/web.pp b/manifests/web.pp index 5088cdb5b..ce8a055bd 100644 --- a/manifests/web.pp +++ b/manifests/web.pp @@ -1,185 +1,82 @@ -# == Class: zabbix::web -# -# This will install the zabbix-web package and install an virtual host. -# -# === Requirements -# -# The following is needed (or): -# - puppetlabs-apache -# -# === Parameters -# -# [*zabbix_url*] +# @summary This will install the zabbix-web package and install an virtual host. +# @param zabbix_url # Url on which zabbix needs to be available. Will create an vhost in # apache. Only needed when manage_vhost is set to true. # Example: zabbix.example.com -# -# [*database_type*] +# @param database_type # Type of database. Can use the following 2 databases: # - postgresql # - mysql -# -# [*manage_repo*] +# @param manage_repo # When true, it will create repository for installing the webinterface. -# -# [*zabbix_version*] -# This is the zabbix version. -# Example: 2.4 -# -# [*zabbix_timezone*] -# The current timezone for vhost configuration needed for the php timezone. -# Example: Europe/Amsterdam -# -# [*zabbix_template_dir*] -# The directory where all templates are stored before uploading via API -# -# [*zabbix_package_state*] -# The state of the package that needs to be installed: present or latest. -# Default: present -# -# [*web_config_owner*] -# Which user should own the web interface configuration file. -# -# [*web_config_group*] -# Which group should own the web interface configuration file. -# -# [*manage_vhost*] -# When true, it will create an vhost for apache. The parameter zabbix_url -# has to be set. -# -# [*default_vhost*] +# @param zabbix_version This is the zabbix version. +# @param zabbix_timezone The current timezone for vhost configuration needed for the php timezone. Example: Europe/Amsterdam +# @param zabbix_template_dir The directory where all templates are stored before uploading via API +# @param zabbix_package_state The state of the package that needs to be installed: present or latest. +# @param web_config_owner Which user should own the web interface configuration file. +# @param web_config_group Which group should own the web interface configuration file. +# @param manage_vhost When true, it will create an vhost for apache. The parameter zabbix_url has to be set. +# @param default_vhost # When true priority of 15 is passed to zabbix vhost which would end up # with marking zabbix vhost as default one, when false priority is set to 25 -# -# [*manage_resources*] +# @param manage_resources # When true, it will export resources to something like puppetdb. # When set to true, you'll need to configure 'storeconfigs' to make # this happen. Default is set to false, as not everyone has this # enabled. -# -# [*apache_use_ssl*] +# @param apache_use_ssl # Will create an ssl vhost. Also nonssl vhost will be created for redirect # nonssl to ssl vhost. -# -# [*apache_ssl_cert*] +# @param apache_ssl_cert # The location of the ssl certificate file. You'll need to make sure this # file is present on the system, this module will not install this file. -# -# [*apache_ssl_key*] +# @param apache_ssl_key # The location of the ssl key file. You'll need to make sure this file is # present on the system, this module will not install this file. -# -# [*apache_ssl_cipher*] +# @param apache_ssl_cipher # The ssl cipher used. Cipher is used from this website: # https://wiki.mozilla.org/Security/Server_Side_TLS -# -# [*apache_ssl_chain*} -# The ssl chain file. -# -# [*apache_listenport*} -# The port for the apache vhost. -# -# [*apache_listenport_ssl*} -# The port for the apache SSL vhost. -# -# [*zabbix_api_user*] -# Name of the user which the api should connect to. Default: Admin -# -# [*zabbix_api_pass*] -# Password of the user which connects to the api. Default: zabbix -# -# [*database_host*] -# Database host name. -# -# [*database_name*] -# Database name. -# -# [*database_schema*] -# Schema name. used for ibm db2. -# -# [*database_double_ieee754*] +# @param apache_ssl_chain The ssl chain file. +# @param apache_listen_ip The IP the apache service should listen on. +# @param apache_listenport The port for the apache vhost. +# @param apache_listenport_ssl The port for the apache SSL vhost. +# @param zabbix_api_user Name of the user which the api should connect to. Default: Admin +# @param zabbix_api_pass Password of the user which connects to the api. Default: zabbix +# @param database_host Database host name. +# @param database_name Database name. +# @param database_schema Schema name. used for ibm db2. +# @param database_double_ieee754 # Enable extended range of float values for new installs of Zabbix >= 5.0 and # after patching upgraded installs to 5.0 or greater. # https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values -# -# [*database_user*] -# Database user. ignored for sqlite. -# -# [*database_password*] -# Database password. ignored for sqlite. -# -# [*database_socket*] -# Path to mysql socket. -# -# [*database_port*] -# Database port when not using local socket. Ignored for sqlite. -# -# [*zabbix_server*] -# The fqdn name of the host running the zabbix-server. When single node: -# localhost -# -# [*zabbix_server_name*] +# @param database_user Database user. ignored for sqlite. +# @param database_password Database password. ignored for sqlite. +# @param database_socket Path to mysql socket. +# @param database_port Database port when not using local socket. Ignored for sqlite. +# @param zabbix_server The fqdn name of the host running the zabbix-server. When single node: localhost +# @param zabbix_server_name # The fqdn name of the host running the zabbix-server. When single node: # localhost # This can also be used to upave a different name such as "Zabbix DEV" -# -# [*zabbix_listenport*] -# The port on which the zabbix-server is listening. Default: 10051 -# -# [*apache_php_max_execution_time*] -# Max execution time for php. Default: 300 -# -# [*apache_php_memory_limit*] -# PHP memory size limit. Default: 128M -# -# [*apache_php_post_max_size*] -# PHP maximum post size data. Default: 16M -# -# [*apache_php_upload_max_filesize*] -# PHP maximum upload filesize. Default: 2M -# -# [*apache_php_max_input_time*] -# Max input time for php. Default: 300 -# -# [*apache_php_always_populate_raw_post_data*] -# Default: -1 -# -# [*apache_php_max_input_vars*] -# Max amount of vars for GET/POST requests -# -# [*ldap_cacert*] -# Set location of ca_cert used by LDAP authentication. -# -# [*ldap_clientcrt*] -# Set location of client cert used by LDAP authentication. -# -# [*ldap_clientkey*] -# Set location of client key used by LDAP authentication. -# -# [*ldap_reqcert *] -# Specifies what checks to perform on a server certificate -# -# [*saml_sp_key*] -# The location of the SAML Service Provider Key file. -# -# [*saml_sp_cert*] -# The location of the SAML Service Provider Certificate. -# -# [*saml_idp_cert*] -# The location of the SAML Identity Provider Certificate. -# -# [*saml_settings*] -# A hash of additional SAML SSO settings. -# -# [*puppetgem*] -# Provider for the zabbixapi gem package -# -# === Example -# -# When running everything on a single node, please check -# documentation in init.pp -# The following is an example of an multiple host setup: -# +# @param zabbix_listenport The port on which the zabbix-server is listening. Default: 10051 +# @param apache_php_max_execution_time Max execution time for php. Default: 300 +# @param apache_php_memory_limit PHP memory size limit. Default: 128M +# @param apache_php_post_max_size PHP maximum post size data. Default: 16M +# @param apache_php_upload_max_filesize PHP maximum upload filesize. Default: 2M +# @param apache_php_max_input_time Max input time for php. Default: 300 +# @param apache_php_always_populate_raw_post_data Default: -1 +# @param apache_php_max_input_vars Max amount of vars for GET/POST requests +# @param ldap_cacert Set location of ca_cert used by LDAP authentication. +# @param ldap_clientcert Set location of client cert used by LDAP authentication. +# @param ldap_clientkey Set location of client key used by LDAP authentication. +# @param ldap_reqcert Specifies what checks to perform on a server certificate +# @param saml_sp_key The location of the SAML Service Provider Key file. +# @param saml_sp_cert The location of the SAML Service Provider Certificate. +# @param saml_idp_cert The location of the SAML Identity Provider Certificate. +# @param saml_settings A hash of additional SAML SSO settings. +# @param puppetgem Provider for the zabbixapi gem package. +# @param manage_selinux Whether we should manage SELinux rules. +# @example For multiple host setup: # node 'wdpuppet02.dj-wasabi.local' { # class { 'apache': # mpm_module => 'prefork', @@ -193,15 +90,7 @@ # puppetgem => 'gem', # } # } -# -# === Authors -# -# Author Name: ikben@werner-dijkerman.nl -# -# === Copyright -# -# Copyright 2016 Werner Dijkerman -# +# @author Werner Dijkerman class zabbix::web ( $zabbix_url = $zabbix::params::zabbix_url, $database_type = $zabbix::params::database_type, diff --git a/manifests/zapache.pp b/manifests/zapache.pp index 15015b142..62fc02ca4 100644 --- a/manifests/zapache.pp +++ b/manifests/zapache.pp @@ -1,47 +1,12 @@ -# == Class: zabbix::zapache -# -# This will install and configure the zapache monitoring script -# Upstream: https://github.com/lorf/zapache -# -# === Requirements -# -# Must import zapache-template.xml and zapache-template-active.xml -# Using the Zabbix web portal -# Note: I believe this can be automated via the API but have not done s. -# -# Must bind "Template App Apache Web Server zapache" OR "Template App Apache Web Server zapache Agent Active" -# to the node. -# -# manage_resources must be true. -# -# Otherwise, no requirements -# -# === Parameters -# -# [*apache_status*] -# Boolean. False by default. Installs zapache monitoring script when true. -# -# === Example -# -# Basic installation: +# @summary This will install and configure the zapache monitoring script Upstream: https://github.com/lorf/zapache +# @param apache_status Boolean. False by default. Installs zapache monitoring script when true. +# @example Basic installation: # class { 'zabbix::agent': # manage_resources => true, # apache_status => true, # zbx_templates => [ 'Template App Apache Web Server zapache'], # } -# -# -# === Authors -# -# Author Name: rob@roberttisdale.com -# -# === Copyright -# -# The MIT License (MIT) -# Copyright (c) [2015] [Robert Tisdale] -# - -# Check if apache_status is true, installs Zapache scripts. Defaults to false. +# @author Robert Tisdale class zabbix::zapache ( Boolean $apache_status = $zabbix::params::apache_status, ) inherits zabbix::params { diff --git a/types/databases.pp b/types/databases.pp index d6d10c87c..cfd491c23 100644 --- a/types/databases.pp +++ b/types/databases.pp @@ -1 +1,2 @@ +# @summary Type for supported databases by the zabbix module type Zabbix::Databases = Enum['postgresql', 'mysql', 'sqlite']