I'm new to Icinga2. I have set up a couple of service checks. Now I want to check if a TCP port is responding, and if it does raise a down event. Basically I want to reverse the status, because normally this port should not be listening. How can I do that?
Asked
Active
Viewed 2,076 times
1 Answers
3
I found the solution. There is a plugin called "negate" that does exactly this. That's how you configure it:
object Host "hostname" {
address = "192.168.1.11"
vars.negate_command = "/usr/lib/nagios/plugins/check_tcp"
vars.negate_arguments["-p"] = "443"
vars.negate_arguments["-t"] = "3"
check_command = "negate"
}
Hakan
- 225
- 1
- 3
- 8