· 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? 



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.

Thank you for the reply.

I'm an intern and have been tasked with figuring out how to monitor the interfaces, taking into account the different message rates throughout a 24 hour period.

The lead interface programmer here, who I'm working under, tells me that I should refer to you as "The Mighty Jeff Drumm."  He says to say "Hi".



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.

Thanks.  Yeah, I actually have a BO that sends non-critical alerts the next business day.  The specific problem here is that this Service goes Inactivity Every night... so they would always get an alert.    I tried to set the Stay Connected to 1800, but it when the connection disconnects and re-connects, the Job still stays "Inactive".

I've thought about that as well.  I think my issue will be the customer wanting the ability to send data at any time, even though they typically don't have (much) data over night.  

I also have considered sending in a bogus message every 30 min to keep the connection "active"...  but I was really hoping to find some code to reset the status :)

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.