icinga: add apt and disk service definitions
This commit is contained in:
parent
c2b8944756
commit
df069adc5e
21
roles/icinga/files/icinga2/zones.d/master/services.conf
Normal file
21
roles/icinga/files/icinga2/zones.d/master/services.conf
Normal file
@ -0,0 +1,21 @@
|
||||
apply Service "apt" {
|
||||
import "generic-service"
|
||||
|
||||
check_command = "apt"
|
||||
|
||||
command_endpoint = host.vars.agent_endpoint
|
||||
|
||||
assign where host.vars.agent_endpoint && host.vars.os == "Linux"
|
||||
}
|
||||
|
||||
apply Service "disk" for (disk => config in host.vars.disks) {
|
||||
import "generic-service"
|
||||
|
||||
check_command = "disk"
|
||||
|
||||
command_endpoint = host.vars.agent_endpoint
|
||||
|
||||
assign where host.vars.agent_endpoint
|
||||
|
||||
vars += config
|
||||
}
|
@ -72,6 +72,10 @@
|
||||
owner: "{{ icinga_user }}"
|
||||
group: "{{ icinga_group }}"
|
||||
|
||||
- name: Configure services
|
||||
copy: src=icinga2/zones.d/master/services.conf dest=/etc/icinga2/zones.d/master/services.conf owner={{ icinga_user }} group={{ icinga_group }}
|
||||
notify: Restart icinga2
|
||||
|
||||
- name: Configure zones
|
||||
template: src=icinga2/zones.conf.j2 dest=/etc/icinga2/zones.conf owner={{ icinga_user }} group={{ icinga_group }}
|
||||
notify: Restart icinga2
|
||||
|
Loading…
Reference in New Issue
Block a user