On Mon, 6 Aug 2018 18:06:16 +0200
Edgar Fuß <e...@math.uni-bonn.de> wrote:

> Is there a mathod to prevent, on the same machine, two concurrent
> invocations of the same plugin (without preventing concurrent
> invocations of any plugins)? For example, with check_dhcp, the second
> invocation is bound to fail because it can't grab the bootpc port.

Hey, I ran into this problem too!  I solved it by re-defining the check
to use flock so that the checks wait for each other to finish instead
of running concurrently:

object CheckCommand "dhcp-lock" {
        import "dhcp"

        command = [ "/usr/bin/flock", "-w", "15", 
"/run/icinga2/check_dhcp.lock" ] + command
}
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to