|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- icinga2:
- master_host: salt
- port: 5665
- config:
- templates:
- generic-host:
- type: Host
- conf:
- max_check_attempts: 3
- check_interval: 1m
- retry_interval: 30s
- check_command: hostalive
- generic-service:
- type: Service
- conf:
- max_check_attempts: 5
- check_interval: 1m
- retry_interval: 30s
- generic-user:
- type: User
- generic-template-all:
- type: Notification
- conf:
- types:
- - Problem
- - Acknowledgenment
- - Recovery
- - Custom
- - FlappingStart
- - FlappingEnd
- - DowntimeStart
- - DowntimeEnd
- - DowntimeRemoved
- period: "24x7"
- mail-host-notification:
- type: Notification
- conf:
- import: generic-template-all
- command: mail-host-notification
- states:
- - Up
- - Down
- mail-service-notification:
- type: Notification
- conf:
- import: generic-template-all
- command: mail-service-notification
- states:
- - OK
- - Warning
- - Critical
- - Unknown
- hosts:
- NodeName:
- type: Host
- conf:
- import: generic-host
- address: 127.0.0.1
- vars:
- os: Linux
- disk_wfree: 15%
- ssh_port: 22
- notification.slack: "true"
- http_vhosts:
- Icinga web 2:
- http_uri: /icingaweb2
- http_port: 443
- http_ssl: "true"
- disks:
- disk:
- groups:
- linux-servers:
- type: HostGroup
- conf:
- display_name: "Linux Servers"
- assign:
- - host.vars.os == "Linux"
- windows-servers:
- type: HostGroup
- conf:
- display_name: "Windows Servers"
- assign:
- - host.vars.os == "Windows"
- ping:
- type: ServiceGroup
- conf:
- display_name: "Ping Service"
- assign:
- - match("ping*", service.name)
- http:
- type: ServiceGroup
- conf:
- display_name: "HTTP Service"
- assign:
- - match("http*", service.check_command)
- disk:
- type: ServiceGroup
- conf:
- display_name: "Disk Checks"
- assign:
- - match("disk*", service.check_command)
- downtimes:
- backup-downtime:
- type: ScheduledDowntime
- to: Service
- conf:
- author: icingaadmin
- comment: Scheduled downtime for backup
- ranges:
- monday: service.vars.backup_downtime
- tuesday: service.vars.backup_downtime
- wednesday: service.vars.backup_downtime
- thursday: service.vars.backup_downtime
- friday: service.vars.backup_downtime
- saturday: service.vars.backup_downtime
- sunday: service.vars.backup_downtime
- assign:
- - service.vars.backup_downtime != ""
- notifications:
- mail-icingaadmin-host:
- type: Notification
- to: Host
- conf:
- import: mail-host-notification
- user_groups: host.vars.notification.mail.groups
- users: host.vars.notification.mail.users
- assign:
- - host.vars.notification.mail
- mail-icingaadmin-service:
- type: Notification
- to: Service
- conf:
- import: mail-service-notification
- user_groups: host.vars.notification.mail.groups
- users: host.vars.notification.mail.users
- assign:
- - host.vars.notification.mail
- services:
- icinga:
- type: Service
- conf:
- import: generic-service
- check_command: icinga
- assign:
- - host.name == NodeName
- procs:
- type: Service
- conf:
- import: generic-service
- check_command: procs
- assign:
- - host.name == NodeName
- swap:
- type: Service
- conf:
- import: generic-service
- check_command: swap
- assign:
- - host.name == NodeName
- users:
- type: Service
- conf:
- import: generic-service
- check_command: users
- assign:
- - host.name == NodeName
- ping4:
- type: Service
- conf:
- import: generic-service
- check_command: ping4
- assign:
- - host.address
- ssh:
- type: Service
- conf:
- import: generic-service
- check_command: ssh
- assign:
- - (host.address || host.address6) && host.vars.os == "Linux"
- load:
- type: Service
- conf:
- import: generic-service
- check_command: load
- vars:
- backup_downtime: "02:00-03:00"
- assign:
- - host.name == NodeName
- http_vhosts:
- type: Service
- for: (http_vhost => config in host.vars.http_vhosts)
- conf:
- import: generic-service
- check_command: http
- disks:
- type: Service
- for: (disk => config in host.vars.disks)
- conf:
- import: generic-service
- check_command: disk
|