Need to send Notification when MID server goes down and check status until up

Josh80
Tera Expert

Hi -

Our MID server went down and there was only one notification that was sent to someone no longer responsible.

I want to automate this so that it follows our standard alerting process; this will require a notification be sent but have a script or something that sends out a notification 'alert' until the status is 'Up'

I'm not sure I want to add a scheduled job which would run every 15 minutes or so, or if I can only have the notification sent once the status changes.

Any recommendations on how?

Thanks

1 ACCEPTED SOLUTION

Hi Josh,



I generally attach my workflows to a record whenever possible and avoid scripting to start/stop/reset. I have friends who have told me that it is possible to attach workflows to non-task records, but I've never done it. The dictionary attribute workflow=true may be required. Again, all untested, but clues that may help.



If you want to do it from script, this should help.



Workflow Script - ServiceNow Wiki



Be bold - be brave.


View solution in original post

7 REPLIES 7

Chuck Tomasi
Tera Patron

Hi Josh,



I'd create a notification on the ecc_agent (MID server) table that watches for changes on the status field. If it changes, send a notification. This should require zero scripting.



Email Notifications - ServiceNow Wiki


Hello Chuck



Well, the issue is that this notification will be sent to our monitoring tool...and we would like to mirror the alerting for the MID server after all other alerts.   That is to say, we want an alert every 10 minutes...so it the notification on that table needs to do a status check every 10 minutes.



Thanks!


Hi Josh,



Thanks for the clarification. Here's an idea.



Have a business rule watch for a change on the status field (e.g. current.status.changesTo('Down') // or whatever



The script of that BR triggers a workflow that has a 10 minute timer in it that triggers a notification.



When the status changes back to Up, another business rule cancels the workflow, notifications stop.


Chuck,



This sounds like the best approach so that we don't have the overhead of a scheduled job.


Do you have any good examples of calling workflow from a business rule?



I know I've seen something similar before.



Thanks