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

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
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

Hello,

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
  #2  
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
Default

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

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
  #4  
Old 10-06-2018, 05:09 AM
AlexNeiva AlexNeiva is offline
Mirth Guru
 
Join Date: Oct 2013
Location: Portugal
Posts: 277
AlexNeiva is on a distinguished road
Default

Hello,

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
  #5  
Old 10-07-2018, 10:05 PM
siddharth siddharth is offline
Mirth Guru
 
Join Date: Feb 2013
Posts: 832
siddharth is on a distinguished road
Default

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
Reply

Tags
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:16 PM.


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