Closed Virsacer closed 1 year ago
Acording to documentation this should be the minimal command to execute an EventCommand on an endpoint:
How did you come to this conclusion? Your example omits filters like "type": "Service", "service": "agent!custom_service"
in the example.
The command shoud run once without the need for undocumented parameter 'Type', 'Host' or 'Service'
Those are filters that apply to the whole API: https://icinga.com/docs/icinga-2/latest/doc/12-icinga2-api/#filters
Event commands run in the context of a checkable, so that checkable has to be specified.
I came to that conclusion, because there is no In addition to these parameters a filter must be provided
below the table like on others.
But when filters are global this makes sense now... Sorry
Describe the bug
Acording to documentation this should be the minimal command to execute an EventCommand on an endpoint:
But the results is
{"error":404,"status":"No objects found."}
When adding any existing hostname to the json like
"host":"icinga2master",
, the command is executed on the endpoint. And when just adding"type":"Host",
it executes the command on the endpoint as many times as you have hosts.To Reproduce
Expected behavior
The command shoud run once without the need for undocumented parameter 'Type', 'Host' or 'Service'
Your Environment
icinga2 --version
): 2.13.7