Written by

Question Erin Dolson · 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

Comments

Jeffrey Drumm · Jul 16, 2019

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.

0
Erin Dolson  Jul 16, 2019 to Jeffrey Drumm

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".

Best,

Erin

0
Jeffrey Drumm  Jul 16, 2019 to Erin Dolson

You aren't by any chance related to the lead interface programmer, are you? laugh

0
Erin Dolson  Jul 16, 2019 to Jeffrey Drumm

Unfortunately, yes I am. Following in his footsteps by majoring in Computer Science.

You're being much more helpful on this project than he is. He's a better Dad than he is a boss cheeky

0
Brian Schoen · Jul 22, 2019

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.

0
Stuart Byrne  Jul 23, 2019 to Brian Schoen

We are currently implementing something similar to Jeff's code above.

We're trying to reduce the amount of alert spam

For the out of hours alerts, I have them sent to a custom BO (business operation) where we send a summary in a single email.

This way you don't lose what's alerted overnight and take action if necessary.

0
Brian Schoen  Jul 23, 2019 to Stuart Byrne

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".

0
Stuart Byrne  Jul 23, 2019 to Brian Schoen

Have you tried applying a schedule to it, so it's only active when you want to send out the critical alerts summary.

0
Brian Schoen  Jul 23, 2019 to Stuart Byrne

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 :)

0
Jeffrey Drumm  Jul 23, 2019 to Brian Schoen

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.

0
Brian Schoen  Jul 23, 2019 to Jeffrey Drumm

Thank you Sir!   I could not for the life of me remember this simple callout.  I think that is exactly what I need.

0
Brian Schoen  Aug 1, 2019 to Brian Schoen

Apparently, calling Ens.Director from an Ensemble Class can cause errors :)

I was able to accomplish my goal of resetting the job status by using a Schedule on the Service.

START:*-*-*T07:01:00,STOP:*-*-*T07:00:59   

Essentially, stopping and restarting the Service each day at 7am. 

Thanks!

0