11 Commits

Author SHA1 Message Date
Eric Lippmann
1e1b4b74ad If appropriate, set the API parameter all_services for schedule-downtime
Since Icinga 2.11.0 the schedule-downtime API supports the
all_services parameter. So far we've always sent a separate
request for scheduling service downtimes. As of Icinga 2.13.0,
these service downtimes are automatically removed when the host
downtimes are removed. Of course, this doesn't work if we don't
use the all_services parameter but send a separate request.
With this commit we set this parameter if the transport is API
and Icinga is equal to or greater than 2.11.0.

In addition, if child_options and all_services were previously set,
a request was sent per host and service. This is now also only a
single request if an API command transport is requested or only
API command transports are configured.
2021-08-09 16:55:05 +02:00
Alexander A. Klimov
6af1e5d43b Monitoring: add expire option for comments
refs #3447
2020-11-30 17:24:57 +01:00
Johannes Meyer
f6edad9336 Transmit the user who clears an acknowledgement 2020-05-14 13:58:19 +02:00
Johannes Meyer
08bc671fb7 Transmit the user who cancels a downtime 2020-05-14 13:58:03 +02:00
Johannes Meyer
287edb7932 Transmit the user who deletes a comment 2020-05-14 13:57:22 +02:00
Eric Lippmann
74d1c78465 Respect persistent when acknowledging over API
refs #3467
2018-06-27 09:47:08 +02:00
Michael Friedrich
6f9e046220 Send the correct 'force' attribute for 'check now' to the Icinga 2 API transport
refs icinga/icinga2#6140
2018-03-02 14:54:29 +01:00
Michael Friedrich
2c312adf94 API Commands: Only send acknowledgement expire time if not null
Icinga 2 v2.7.0 is more strict with the `expiry` attribute if sent
(cannot be null, or in the past).

While acknowledgments with expire time worked well (and do so with this patch),
the command renderer did not check whether the value is actually not null
before setting it into the data form. The boolean value from the checkbox is
not available in the command renderer unfortunately.

@lippserd: Verified working with and without expire time inside the Vagrant boxes.

fixes #2911
2017-08-08 12:53:39 +02:00
Eric Lippmann
4f6c54e62c Support scheduling a downtime for all services of a host w/ the Icinga 2 API as command transport
fixes #12810
2016-12-08 10:40:22 +01:00
Eric Lippmann
93474972bf Enable propagate host downtime commands for Icinga 2
This only works when using the latest Icinga 2 snapshot packages. Before releasing Web 2.4.0, we have to include a check to only offer these commands when using Icinga 2 2.6.0+

refs #10774
2016-11-08 15:27:29 +01:00
Eric Lippmann
ad658b049c Add IcingaApiCommandRenderer class
refs #11398
2016-09-01 10:45:28 +02:00