[Check_mk (english)] Event Handler configuration

Dear List,

I want to configure an event_handler in my Check MK 1.2.4p5, for all the host, and all services.

What I have done:

In /opt/omd/sites/my_site/etc/check_mk/main.mk :

extra_service_conf[“event_handler_enabled”]=[“1”, ALL_HOSTS, ALL_SERVICES]

extra_service_conf[“event_handler”]=[“run_my_script”,ALL_HOSTS,ALL_SERVICES]

In /omd/sites/my_site/etc/nagios/conf.d/commands.cfg :

define command{

    command_name run_my_script

    command_line python /opt/omd/versions/1.20/lib/nagios/plugins/my_script.py

}

I have the my_script.py file in the path /opt/omd/versions/1.20/lib/nagios/plugins/

Then I run cmk -U

I get the message: Generating configuration for core (type nagios)…Configuration Error: Invalid rule ‘‘1’’ in service configuration list: must have 3 or 4 elements

What’s the meaning of this message?

I think there is something missing for the event handler configuration…but I don’t know what.

Can you help me please?

Thanks in advance

Yolanda

Hi Yolanda,

your variables must be these:

extra_service_conf[“event_handler_enabled”]=[(“1”, ALL_HOSTS, ALL_SERVICES)]

extra_service_conf[“event_handler”]=[(“run_my_script”, ALL_HOSTS, ALL_SERVICES)]

…do you see the round braces? :wink:

Regards,

Marcel

···

Yolanda Santos iamyolanda@gmail.com schrieb am Do., 17. Sep. 2015 um 13:51 Uhr:

Dear List,

I want to configure an event_handler in my Check MK 1.2.4p5, for all the host, and all services.

What I have done:

In /opt/omd/sites/my_site/etc/check_mk/main.mk :

extra_service_conf[“event_handler_enabled”]=[“1”, ALL_HOSTS, ALL_SERVICES]

extra_service_conf[“event_handler”]=[“run_my_script”,ALL_HOSTS,ALL_SERVICES]

In /omd/sites/my_site/etc/nagios/conf.d/commands.cfg :

define command{

    command_name run_my_script
    command_line python /opt/omd/versions/1.20/lib/nagios/plugins/my_script.py

}

I have the my_script.py file in the path /opt/omd/versions/1.20/lib/nagios/plugins/

Then I run cmk -U

I get the message: Generating configuration for core (type nagios)…Configuration Error: Invalid rule ‘‘1’’ in service configuration list: must have 3 or 4 elements

What’s the meaning of this message?

I think there is something missing for the event handler configuration…but I don’t know what.

Can you help me please?

Thanks in advance

Yolanda


checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

We’ll meet in Munich for the 2nd Check_MK Conference!

Book your place now and be part of it.

October 18th-20th, 2015

http://mathias-kettner.com/conference