web stats
Heartbeat process in Mirth Service - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 08-07-2014, 07:32 AM
chuckpfaff chuckpfaff is offline
What's HL7?
 
Join Date: Dec 2013
Posts: 5
chuckpfaff is on a distinguished road
Default Heartbeat process in Mirth Service

I would like the Mirth service to send an HTTP POST heartbeat message every x number of minutes to a heartbeat monitoring service.

I'm having trouble figuring out how to set up a background loop process in Mirth.

Something like this...
setInterval(function(){postToHeartbeatMonitor()}, 120000);

I've been checking the forums for a while now and haven't been able to find anything to help me accomplish this.

Anyone have any ideas?

Thanks in advance.
Reply With Quote
  #2  
Old 08-07-2014, 09:10 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default

That's easy to do. Just set up a JavaScript Reader to handle the polling, and an HTTP Sender to dispatch the request. I'll attach a channel (for 3.0.3) to illustrate.
Attached Files
File Type: xml Example - Send HTTP POST Heartbeat.xml (17.4 KB, 85 views)
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 08-07-2014, 09:36 AM
chuckpfaff chuckpfaff is offline
What's HL7?
 
Join Date: Dec 2013
Posts: 5
chuckpfaff is on a distinguished road
Default

Thank you very much, this is exactly what I needed
Reply With Quote
  #4  
Old 01-01-2015, 05:34 AM
syamat syamat is offline
What's HL7?
 
Join Date: Nov 2014
Posts: 1
syamat is on a distinguished road
Default Need to send a email if the heartbeat stops

How to write a monitor that will send a email if the Heartbeat stops?
Reply With Quote
Reply

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 11:08 AM.


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