web stats
Data Pruner Monitoring/Alerts Possible? - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 07-26-2019, 08:13 AM
jridderhoff jridderhoff is offline
OBX.1 Kenobi
Join Date: Jan 2015
Posts: 42
jridderhoff is on a distinguished road
Default Data Pruner Monitoring/Alerts Possible?

We're running Connect 3.6.1, and we've got a couple of channels that process substantial message volume on a daily basis. We've got pruning set up, and haven't ever had any issues with pruning... until this week.

As we were investigating an issue where the database cluster was nearly running out of disk space yesterday, I happened to be verifying a few channels in Mirth that process large amounts of data to make sure our pruning settings hadn't changed, and I discovered that Data Pruner had been running against the largest channel for nearly 6 days (a little over 8300 minutes). I had to eventually restart mcservice entirely (stopping the pruning from the Admin console just hung and never finished).

Which led me to wonder if there's any way to monitor & be notified about issues relating to Data Pruner? I know we can set up alerts around channels, but I don't obviously see anything in the UI that lets us configure alerts for things like errors related to pruning, pruner processes that are running longer than normal or are hung, etc.

Had we not encountered the disk space issue, we might not have even noticed that the pruner was stuck, at least not for a lot longer. That seems like something we should be able to keep tabs on with something more high tech than "log in regularly & look at it manually". Any ideas? Thanks!
Reply With Quote
Old 08-02-2019, 06:58 AM
schillert schillert is offline
OBX.1 Kenobi
Join Date: Jul 2012
Posts: 31
schillert is on a distinguished road

Just a vague idea: Every pruning result is recorded in the EVENT Table of mirthdb.
The table looks like this:

mysql> describe EVENT;
| Field        | Type        | Null | Key | Default | Extra          |
| ID           | int(11)     | NO   | PRI | NULL    | auto_increment |
| DATE_CREATED | timestamp   | YES  |     | NULL    |                |
| NAME         | longtext    | NO   |     | NULL    |                |
| EVENT_LEVEL  | varchar(40) | NO   |     | NULL    |                |
| OUTCOME      | varchar(40) | NO   |     | NULL    |                |
| ATTRIBUTES   | longtext    | YES  |     | NULL    |                |
| USER_ID      | int(11)     | NO   |     | NULL    |                |
| IP_ADDRESS   | varchar(40) | YES  |     | NULL    |                |
| SERVER_ID    | varchar(36) | YES  |     | NULL    |                |
9 rows in set (0.02 sec)
A sample pruning result looks like this

| 41767 | 2019-07-18 12:10:00 | Data Pruner | INFORMATION | SUCCESS | <map>
    <string>Messages Pruned</string>
    <string>Content Rows Pruned</string>
    <string>Channel ID</string>
    <string>Channel Name</string>
    <string>Time Elapsed</string>
    <string>0 minutes, 0 seconds</string>
</map>                                     |       0 | NULL       | 84cfe3aa-e8bb-4d6a-92ab-c02ffe253f6a |
If you select Events with NAME="Data Pruner" and the appropriate DATE_CREATED you would at least get the number of channels processed by the data pruner.
You could raise an alert if this number doesn't match the expected number of channels to be pruned.
You could even parse ATTRIBUTES and see how long it took to prune a channel and the number of records deleted.
Reply With Quote

pruner, slow, stuck

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 02:57 AM.

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