Added icinga command and service file

This commit is contained in:
Jonny007-MKD 2020-02-28 21:42:40 +01:00 committed by root
parent 0ddb049772
commit 0d344b456f
2 changed files with 38 additions and 0 deletions

25
command_nmap.conf Normal file
View File

@ -0,0 +1,25 @@
object CheckCommand "nmap" {
import "ipv4-or-ipv6"
command = [ "/home/nagios/check_nmap.sh/check_nmap.sh" ]
timeout = 10m
arguments = {
"--host" = {
value = "$nmap_host$"
description = "Hostname or address to scan"
required = true
}
"--portrange" = {
value = "$nmap_scan_ports$"
description = "String with ports in nmap format"
}
"--known" = {
value = "$nmap_allowed_ports$"
description = "String with ports in nmap format"
repeat_key = true
}
}
vars.nmap_host = "$check_address$"
}

13
service_nmap.conf Normal file
View File

@ -0,0 +1,13 @@
apply Service "nmap" {
import "generic-service"
check_command = "nmap"
check_interval = 24h
retry_interval = 2h
for (k => v in host.vars.nmap) {
vars["nmap_" + k] = v
}
assign where host.vars.nmap != null
}