Add check_local_unread_emails
This commit is contained in:
parent
eb3272252a
commit
90a9121a3c
3 changed files with 20 additions and 0 deletions
|
@ -26,6 +26,15 @@
|
||||||
group: root
|
group: root
|
||||||
mode: 0440
|
mode: 0440
|
||||||
validate: 'visudo -cf %s'
|
validate: 'visudo -cf %s'
|
||||||
|
- name: Copy check_local_unread_emails script
|
||||||
|
become: true
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: "https://gitlab.easter-eggs.com/brenard/check_local_unread_emails/-/raw/master/check_local_unread_emails"
|
||||||
|
checksum: "sha256:1b8a10ab32255b56a405bc43d391b1545b052181f2be964ae08828d05da4690e"
|
||||||
|
dest: /usr/lib/nagios/plugins/check_local_unread_emails
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
- name: Setup Icinga2 master
|
- name: Setup Icinga2 master
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
|
|
|
@ -76,3 +76,7 @@ object CheckCommand "memory" {
|
||||||
vars.memory_output_g = false
|
vars.memory_output_g = false
|
||||||
vars.memory_vmstats = false
|
vars.memory_vmstats = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
object CheckCommand "local_unread_emails" {
|
||||||
|
command = [ PluginDir + "/check_local_unread_emails" ]
|
||||||
|
}
|
||||||
|
|
|
@ -114,3 +114,10 @@ apply Service for (device => config in host.vars.smart_devices) {
|
||||||
assign where true
|
assign where true
|
||||||
vars += config
|
vars += config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply Service "local_unread_emails" {
|
||||||
|
import "generic-service"
|
||||||
|
check_command = "local_unread_emails"
|
||||||
|
command_endpoint = host.name
|
||||||
|
assign where true
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue