Jump to content
DarrenWhite99

Sticky Tickets - Keeps tickets active until they are corrected

Recommended Posts

This is the "Internal Monitor For Automatic Resets on Ticket Status".

The tickets themselves aren't sticky, this is a solution for designating specific monitors so that if the ticket is closed without the monitor healing, the alert will be reset and a new ticket will be created. This is specifically for the scenario that exists for Internal Monitors that are configured to "Send Fail After Success". These monitors are useful because they do not continuously generate tickets or ticket comments. But issues can be lost if the ticket is closed without the monitor actually healing. If a monitor alert must be ignored, the agent should be excluded from the monitor instead of just closing the ticket. I am not saying that this should apply to every monitor (sometimes you may accept just closing the ticket). But if you have a monitor that you want to insure is not ignored, this monitor this can help.

The monitor works by searching for open alerts and tickets that have been generated by the all monitors. Any alerts found where the ticket has been closed but the alert is still active will be returned as a result. You do not want to alert (create a ticket or other action) on the result of this monitor. The results are only there to show you what alerts are currently not being watched because there is an active alert with no active ticket. Based on this, you can decide which monitors you want to enforce.

For monitors that you have chosen to enforce, if they are found to have no active ticket the previous alert will be cleared, allowing the monitor to generate a new alert (and ticket) the next time that monitor is processed. This monitor determines which monitors are being watched by a keyword in the other monitor's definition.

To enforce a monitor (so that it's tickets will be re-opened), you need to include the string "ENABLEIMFARTS" in the Additional Condition field. A simple way to do this is to add " AND ~'ENABLEIMFARTS' " to the Additional Condition field. This will always evaluate to TRUE, so it will not change the existing monitor's logic.  You could also use 'ENABLEIMFARTS'='ENABLEIMFARTS' as a test, or computers.name NOT LIKE 'ENABLEIMFARTS'. As long as the string is in the Additional Conditions, the monitor will be watched. It can easily be incorporated for regular or RAWSQL monitors.

An example: A Drive Monitor is reporting that under 2GB of free space exists for the "C" drive on AgentX. A ticket is created, and the monitor is configured for "Send Fail After Success". A technician accidentally closes the ticket. This Monitor detects that there is an active alert for AgentX on the "C" drive, but all tickets from that alert have been closed. If the string 'ENABLEIMFARTS' is found in that monitor, the current alert for AgentX "C" drive will be cleared. When the Drive Monitor processes next and it still finds that AgentX has an issue with "C", because there are now no active alerts this is treated as a new alert and a new ticket will be created.

To use: import the attached SQL. I have prepared it to be safe for import using SQLYog or Control Center, and if you had added it previously it will safely update your current monitor.

Revision History:

2017-09-09 20:00:00 - Version 1 Posted.

2017-10-18 06:00:00 - Version 2. Adds support for ignored alerts (so it ignores that the ticket may be closed) and greatly improves the matches by catching alert tickets with customized alert subjects.

2018-12-11 03:00:00 - Attachment removed. Version 3 has been posted to https://www.labtechgeek.com/files/file/39-sticky-tickets-keeps-tickets-active-until-they-are-corrected/

 

Edited by DarrenWhite99
Removing Attachment
  • Like 2
  • Thanks 2

Share this post


Link to post
Share on other sites

Would this also work for say an offline server alert ticket that was accidentally put into another status like "completed" (not closed), or tickets are all childed/bundled with other irrelevant tickets and a server is still offline?

Share this post


Link to post
Share on other sites
3 hours ago, smsuttell87 said:

Would this also work for say an offline server alert ticket that was accidentally put into another status like "completed" (not closed), or tickets are all childed/bundled with other irrelevant tickets and a server is still offline?

Automate only has 3 different statuses a ticket can be in. Open, Stalled, Closed. Darren's monitor will trigger only if a ticket is in the closed state. So any Manage status that sets the Automate ticket status to closed will trigger this monitor.

It will also trigger if the ticket is merged in with another ticket via the Automate ticketing system. I am yet to test this from within Manage.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×