Question
· Jul 16, 2019

Interface Monitoring

Hi all,

I'm looking to set up monitoring for several interfaces. I understand that I can set an Inactivity Timeout. However, obviously there are messages coming through more frequently during certain hours than other hours. 

Is there a way to set an Inactivity Timeout for each hour of the day instead of one value that is used all day long? 

Best,

Erin

Discussion (12)1
Log in or sign up to continue

The Inactivity Timeout is a fixed value, and you can't easily reset it for different times of the day. You can, however, fairly easily control which times of the day alerts are actually sent, based on a variety of criteria:

The TimeIsBetween() and DayIsAWeekDay() functions in the screenshot above are relatively simple custom methods in a class that extends Ens.Rule.FunctionSet, which makes them selectable in the rule editor's function editor dropdown. I wrote them simply for the improved readability they provide for the routing rule.

In the rule above, alerts for the HIE_ADT_out interface are sent only between 7am and 7pm to the Integration team; on weekdays only the help desk is included. Any that fall outside of that timeframe are discarded.

Follow up Question....   We currently use a Rule similar to Jeff's; however, if the Service does not have further activity after we suppress the Alert, the status can remain "inactive" well into normal business hours.

Is there a way to "reset" the connection status?  (Or to programmatically restart the Service?), specifically to be called from the Rule.

You could write a simple classmethod that starts and stops the offending component when an inactivity alert is received. It would do little more than executing:

Do  ##class(Ens.Director).EnableConfigItem("service name",0,1)

Do  ##class(Ens.Director).EnableConfigItem("service name",1,1)

That would almost certainly reset the inactivity timer. As long as the class it's in extends Ens.Rule.FunctionSet, you'll have it available in the function selector in the Rule Editor drop-down list.