check_nmap.sh/command_nmap.conf

33 lines
700 B
Text

object CheckCommand "nmap" {
import "ipv4-or-ipv6"
command = [ "/home/nagios/check_nmap.sh/check_nmap.sh" ]
timeout = 24h
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
}
"--ipv4" = {
set_if = "$nmap_ipv4$"
description = "Use IPv4 for scanning"
}
"--ipv6" = {
set_if = "$nmap_ipv6$"
description = "Use IPv6 for scanning"
}
}
vars.nmap_host = "$check_address$"
}