web stats
Getting error count of last 2 days using channelutil - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 10-07-2017, 08:32 PM
rakesh_waghulde rakesh_waghulde is offline
What's HL7?
Join Date: Jul 2014
Posts: 4
rakesh_waghulde is on a distinguished road
Smile Getting error count of last 2 days using channelutil


If we want to get of error message count of particular mirth channel, we can easily get it using inbuilt function "ChannelUtil.getErrorCount(channelid)".

I want to get error count of that channel only of last 2 days. How I can do it using channelutil function ?

My mirth version is latest 3.x version.

Note - I don't want to use advanced mirth alerting. I want to implement it using channelUtil only.

Can anyone help me in this ?

Thanks in advance.
Reply With Quote
Old 10-05-2018, 07:36 AM
ashishshetty1992 ashishshetty1992 is offline
Mirth Newb
Join Date: Jan 2018
Location: Boston
Posts: 17
ashishshetty1992 is on a distinguished road

Did you find the solution?
Reply With Quote
Old 10-05-2018, 02:02 PM
stormcel stormcel is offline
OBX.3 Kenobi
Join Date: Mar 2010
Location: Phoenix
Posts: 173
stormcel is on a distinguished road

you have to do that proactively.
I have a channel that is tasked with monitoring all channel activity and statistics.
It runs every 5 minutes and uses the global channelMap.
It checks for storage space and inactivity and alerts on issues via email.
It outputs stat differences every 1/2 hour to a log file that is displayed in a live zoomable web chart.
It outputs twice-daily reports to an email chain with 12-hr statistics.
So if you implement something similar, you would just add up the last four twice-daily reports on errors to get your result.
Reply With Quote
Old 10-06-2018, 05:09 AM
AlexNeiva AlexNeiva is offline
Mirth Guru
Join Date: Oct 2013
Location: Portugal
Posts: 282
AlexNeiva is on a distinguished road


Can you use a JavaScript Writer to do that? In Pool settings you can set to run the ChannelUtil script every 48h I guess.
Give it a try.
Best Regards,
Alex Neiva
Reply With Quote
Old 10-07-2018, 10:05 PM
siddharth siddharth is offline
Mirth Guru
Join Date: Feb 2013
Posts: 841
siddharth is on a distinguished road

ChannelUtil methods don't really have a date filter in them, and whenever you are pulling statistics from it, it returns historical count. So in place of that we took a diff of statistics, but we had to use a DB to achieve it, so we can store/update daily stats and calculate difference. It is tricky.
HL7v2.7 Certified Control Specialist!
Reply With Quote

alerting, channelutil, count, error, mirth

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 12:44 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation