how to supress mid server down incients over weekend
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi Everyone,
We have a scenario where incidents are being generated whenever MID Servers go down. These alerts are triggered through the MID Server down script. We would like to suppress the creation of these incidents during weekends since that period falls under our maintenance window. Could you please suggest the best approach to prevent incident generation during this time?
Note: Event Management has not been implemented.
Best Regards,
Pranitha D.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @pranithadar ,
The above situation can be handled in many ways and here is the best one i thought of, so you have to create a system property which will be a "True/False" type and which ever week you guys have the maintenance just make the system property to false if you have every weekend as the maintenance then there won't be a necessary of the system property , but it is better to have that cause in future there might be need for that . And just add the following code to that script where incident creation script is written.
var suppressWeekend = gs.getProperty('mid.server.incident.suppress.weekend') == 'true'; //only if you create system property
var now = new GlideDateTime();
var dayOfWeek = now.getDayOfWeek(); // 1=Mon, 2=Tue,........7=Sun
if (suppressWeekend && (dayOfWeek == 6 || dayOfWeek == 7)) {
return;
}
//Your existing incident creation code
Hope this helps you, Please do mark it as helpful . And accept the solution.
