A salt formula that installs and configures Icinga2. Based on the Icinga2 Puppet module by the Icinga2 team.
- Configure Icinga2 repository
- Install Icinga2
- Configure Icinga2 with a set of defaults
- Manage Icinga2 service
Installs Icinga2 as a client agent, creating client certificates against an Icinga2 master. Requires permissions for remote signing.
# Example client/agent configuration
icinga2:
lookup:
master_fqdn: icinga.example.com
master_minion_id: icinga
constants:
PluginContribDir: /usr/local/lib/monitoring-plugins
conf:
zone:
master:
endpoints:
- icinga.example.com
ZoneName:
endpoints:
- NodeName
parent: master
# Enable the global-templates zone so that
# commands are automatically synced
global-templates:
global: True
endpoint:
NodeName: {}
icinga.example.com:
host: icinga.example.com
Enable and configure the api
feature.
# Example ApiListener configuration.
icinga2:
lookup:
features:
api:
ca_path: /var/lib/icinga2/ca/ca.crt
Enables and configures the ido-pgsql
feature.
# Example IdoPgsqlConnection configuration
icinga2:
lookup:
features:
ido-pgsql:
host: localhost
port: 5432
name: icinga
user: root
password: password
Enable and configure the debuglog feature. Use the icinga2.features.debuglog.disabled
state to disable the feature.
# Example FileLogger configuration
icinga2:
lookup:
features:
debuglog:
path: LogDir + "/debug.log"
Enable and configure the graphite
feature.
# Example GraphiteWriter configuration
icinga2:
lookup:
features:
graphite:
enable_send_thresholds: True
enable_send_metadata: True
Enable and configure the mainlog
feature.
# Example FileLogger configuration
icinga2:
lookup:
features:
mainlog:
severity: critical
Installs and configures an Icinga2 master with a CA for generating client certs for Icinga2 agents. Requires permissions for remote signing.
# Example Icinga2 master configuration
icinga2:
lookup:
master_fqdn: icinga.example.com
master_minion_id: icinga
constants:
TicketSalt: iamarandomstring
PluginContribDir: /usr/local/lib/monitoring-plugins
plugins:
- itl
- plugins
- plugins-contrib
Installs and configures Icingaweb2.
icinga2:
lookup:
web:
user: www-data
group: icingaweb2
global:
show_stacktraces: 1
logging:
log: syslog
level: ERROR
db:
host: localhost
port: 5432
name: icingaweb2
user: root
password: password
type: pgsql
Enable the Icingaweb2 audit module.
Enable the Icingaweb2 businessprocess
module.
# Extend the state to specify
# a particular version/tag
extend:
icingaweb2_businessprocess_module_dir:
git.latest:
- rev: v2.1.0
Pillar key for IDO features have changed to match the feature name:
- ido_pgsql > ido-pgsql
- ido_mysql > ido-mysql