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?


I found the solution. There is a plugin called "negate" that does exactly this. That's how you configure it:

object Host "hostname" {
        address  = ""
        vars.negate_command = "/usr/lib/nagios/plugins/check_tcp"
        vars.negate_arguments["-p"] = "443"
        vars.negate_arguments["-t"] = "3"
        check_command = "negate"

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.