Event Command runs on Master and Satellite

Hi togehter,
after checking the log i will find out that an event command runs on the master and the satellite.
But i need this event commad only on the master.
The log on the satellite shows me this line:

[2021-01-14 13:56:37 +0100] warning/PluginEventTask: Event command for object ‘xxxx-server.de!GENESYS_SERVER_ALARM’ (PID: 10880, arguments: ‘/usr/lib/nagios/plugins/eventhandler/notification_flagfile.pl’ ‘-h’ ‘xxxx-server.de’ ‘-n’ ‘GENESYS_SERVER_ALARM’ ‘-s’ ‘CRITICAL’) terminated with exit code 128, output: execvpe(/usr/lib/nagios/plugins/eventhandler/notification_flagfile.pl) failed: No such file or directory

I’d created the eventhandler in director:

object EventCommand "set-notification-flag" {
    import "plugin-event-command"
    command = [
    arguments += {
        "-h" = "$host.name$"
        "-n" = "$service.name$"
        "-s" = "$service.state$"
    vars.rpc_service_name = "$service.vars.rpc_service_name$"
    vars.rpc_service_state_id = "$service.state_id$"

Then i added the new eventhandler to the service template:

template Service "Passive Service Volatile mit Notification Flag Template" {
    check_command = "trap-passive"
    max_check_attempts = "1"
    check_period = "timeperiod-24x7"
    check_interval = 1d
    enable_notifications = true
    enable_active_checks = true
    enable_passive_checks = true
    enable_event_handler = true
    enable_flapping = false
    enable_perfdata = false
    event_command = "set-notification-flag"
    volatile = true
    vars.enable_trap_notification = true

At last the service:

How can i configure the eventhandler that the script will only run on ther master zone?

ICINGA is running on Debian 9:

  • ICINGA Web: 2.8.2
  • director: master
  • Icinga: r2.12.3-1


This is impossible at the moment, eventhandler will always be executed where the check is executed.

Hi Dirk
Thanks for you reply and the links.
The documentation is clear, but i do not understand why the master node run the same eventhandler.
I‘m using the eventhandler since last year and the master works like i want. Today i‘d checked the logs on the satelite and found the error messages.

Unfortunately it is a simple run on the agent endpoint if the check_endpoint is set and run on parents if not. It should be at least run in the zone the service is part of for consistent behaviour which would exactly not what you want, but it is not implemented like this. :frowning: It also runs on all of them perhaps resulting in multiple restarts of a service or even more bad things, so we can only hope the developers will find a proper solution in the future. So it is totally on Icinga and not you or your configuration.

Hi Dirk,
ok - then I hope that the developers will soon process the open ticket. I believe that an ICINGA setup with multiple zones is not uncommon. Thanks again for the clarification