Closed sol1-matt closed 4 years ago
Hello @sol1-matt and thank you for reporting!
Does Icinga Web acknowledge the problem via Icinga 2 API or command pipe?
Best, AK
Looking at the config in /icingaweb2/monitoring/config/edittransport?transport=icinga2 the settings are transport type is local command file command file is /var/run/icinga2/cmd/icinga2.cmd.
The logs have the following
Add Ack
[2020-11-02 15:28:38 +1100] information/ExternalCommandListener: Executing external command: [1604291318] ACKNOWLEDGE_SVC_PROBLEM_EXPIRE;test.host.example;Check Free Memory;0;1;0;1604291369;sol1;test acknowledge 2 [2020-11-02 15:28:38 +1100] information/ConfigObjectUtility: Created and activated object 'test.host.example!Check Free Memory!126c506f-4fc0-4110-bcfd-ea390b3bdf87' of type 'Comment'. [2020-11-02 15:28:38 +1100] information/Checkable: Acknowledgement set for checkable 'test.host.example!Check Free Memory'.
Just after the expiry time passes we get this
[2020-11-02 15:29:50 +1100] information/ConfigObjectUtility: Deleted object 'test.host.example!Check Free Memory!126c506f-4fc0-4110-bcfd-ea390b3bdf87' of type 'Comment'.
The service is still acknowledged at this time, if I cancel it through the icinga2 web UI I see this
[2020-11-02 15:32:11 +1100] information/ExternalCommandListener: Executing external command: [1604291531] REMOVE_SVC_ACKNOWLEDGEMENT;test.host.example;Check Free Memory [2020-11-02 15:32:11 +1100] information/Checkable: Acknowledgement cleared for checkable 'test.host.example!Check Free Memory'.
Please try using the API command transport.
Configuring the API monitoring transport, in addition to the existing CLI monitoring transport, and changing the order so the API is first in the list of transports worked.
eg:
Transport icinga api (Type: Api) icinga2 (Type: Local)
Both the comment and acknowledgement were removed.
[2020-11-03 10:55:49 +1100] information/Checkable: Acknowledgement cleared for checkable 'test.host.example!Check Disk Space'. [2020-11-03 10:56:12 +1100] information/ConfigObjectUtility: Deleted object 'test.host.example!Check Disk Space!07f68106-0226-4eff-910c-b357b4856b60' of type 'Comment'. Acknowledgement
This is a valid workaround for this problem.
Note: This doesn't clean up services that had previously expired the comment but not the acknowledgement, those still needed to have the old acknowledgement removed and a new acknowledgement with comment and expiry for that service to behave correctly.
Some sql would probably clean that up but I didn't have that many services in a bad state so clean up was done manually to be safe.
This is a valid workaround for this problem.
... especially as the command pipe has been deprecated.
Describe the bug
When an expiry time is added to a service acknowledgement with a comment the comment is shown along with a cancel button (X) and countdown to the expiry time.
When the expiry time passes the comment and countdown disappear, correctly, but the service is still acknowledged and the cancel button still exists.
To Reproduce
Note if you look at the DB at this stage the icinga_servicestatus.acknowledgement_type is set to 1
Expected behavior
When an Acknowledgement with comment and expiry time expires the service should no longer be acknowledged.
Include as many relevant details about the environment you experienced the problem in
icinga2 --version
):icinga2 feature list
):icinga2 daemon -C
):zones.conf
file (oricinga2 object list --type Endpoint
andicinga2 object list --type Zone
) from all affected nodes.Additional Info
Clicking on the X to remove the Acknowledgement on the service will return the service to the expected state, strong colours and no acknowledgement. The database value icinga_servicestatus.acknowledgement_type will now be set to 0.