Agent history shows the name of the alert action script instead of the alert resolved script
sebvonhelsinki opened this issue · comments
Server Info (please complete the following information):
- OS: Debian 12
- Browser: Firefox
- RMM Version (as shown in top left of web UI): 0.18.2
Installation Method:
- Standard
- Standard with
--insecure
flag at install - Docker
Agent Info (please complete the following information):
- Agent version (as shown in the 'Summary' tab of the agent from web UI): v2.7.0
- Agent OS: Windows Server 2012R2 (yes, it's EOL. No, I don't think that has anything to do with the issue at hand)
Describe the bug
I created two scripts: "Failure_Action_CreateTicket" and "Resolve_Action_CloseTicket". As the name implies, these are used in an alerting template to create or close tickets in our issue tracking system. However, the history shows the name of the "Failure_Action_CreateTicket" as the executed script no matter if an alert was triggered or resolved.
To Reproduce
Steps to reproduce the behavior:
- Create two scripts
- Create an Alert Template
- In the Alert Template, under Alert Actions, set one script in "Alert Failure Settings" and the other under "Alert Resolved Settings"
- Apply the template to an agent
- Create a check that will always fail (i.e.: pingcheck to a private IP range different from the one the agent is part of)
- Wait for the check to fail. The agent history should show an action "Script Run", the name of the script set at Alert Failure Settings, and Initiated by "alert-action-failure"
- resolve the check (i.e.: change the IP in the ping-check to the IP of a known active device)
- wait for the check to resolve. The agent history now shows an action "Script Run", still the name of the script set at Alert Failure Settings, but Initiated by "alert-action-resolved"
Expected behavior
The history should show that the script "Resolve_Action_CloseTicket" has been run.
Screenshots
Screenshot of the Alert template:
Screenshot of the client history:
Additional context
My understanding is that this is only a display error in the History section of the agents. The scripts I wrote and the alert template work as intended and tickets are created and closed as expected, so I can confirm that the alert template actually runs the second script as it should. The "output" column in the History section also returns the output I expect form the second script.
thanks, fix will be in next release (for new entries only, can't fix what's already in db)
Great, thanks for the quick fix!