cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Thingworx Alert History - EndTime & Duration

LP_10027711
14-Alexandrite

Thingworx Alert History - EndTime & Duration

I am using the MFG apps to create Alert templates for separate alert states (stopped, faulted, offline, manual). Everything works fine but I would like to get the timestamp for the End Time and total Duration of the alert. Similar to the Alert Summary. Per https://support.ptc.com/help/thingworx/apps/r9.1/en/#page/thingworx_apps/Exploring_the_Apps/alert_monitoring.html 

LP_10027711_0-1642601258147.pngLP_10027711_1-1642601274094.png

 

4 REPLIES 4
slangley
23-Emerald II
(To:LP_10027711)

Hi @LP_10027711.

 

We see in the screenshot the time the alert happened and the duration.  You mention "total Duration".  Can you explain what you mean?

 

Are you expecting the End Time to be the time the Ack occurred?  

 

Regards.

 

--Sharon

LP_10027711
14-Alexandrite
(To:slangley)

I found a solution to my problem. thank you

slangley
23-Emerald II
(To:slangley)

Hi @LP_10027711.

 

Would you mind sharing your solution with the community?

 

Thanks.

 

--Sharon

 

geva
15-Moonstone
(To:slangley)

Alerts are stored in a system ThingWorx Stream called AlertHistoryStream which you can query for the related data.  The Stream is populated with an entry for the Alert event as well as the AlertReset event, so you'll need to query for the source thing, timestamp range, source property, and eventName.  Just be careful with Stream query best practices to ensure that you don't pull too many results into memory as this will be slow and not scalable if you're doing the query frequently.

AlertHistoryStream.png

 

Announcements


Top Tags