How to create event handler for TCP Port connection check -- test and email results

Hi,
I’m trying to read up on how to do the following:

I have a working tcp port connection check and I can see it defined in
~/etc/check_mk/conf.d/wato/rules.mk

the service check definition contains the port # to test, along with the list of hostnames where the test should be ran.

if the test result is CRITICAL,
I’d like to run /bin/nc -z -v $HOSTADDRESS$ $PORT$ (or however the arguments are passed)
and then send the output of this command as part of the notification email.

please let me know if anyone can point me in the right direction, I read somewhere that CRE doesn’t have native event handler setups and requires cfg from the CLI…?

thanks

Hi,
haven’t used it myself with nagios (CRE) for years, but Event handler definition - #11 by joaoe33 looks helpful.

Gerd

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.