No announcement yet.

Getting error count of last 2 days using channelutil

  • Filter
  • Time
  • Show
Clear All
new posts

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

  • #2
    Did you find the solution?


    • #3
      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.


      • #4

        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


        • #5
          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!