Monitoring Marid via Heartbeat

If you're using OpsGenie's Marid Utility, you want to make sure that it's up and running. You can monitor Marid easily, by using OpsGenie's cool features.

To monitor Marid, you need to be able to use OpsGenie Heartbeat Monitoring functionality. To use OpsGenie Heartbeat Monitoring, add a Heartbeat Integration and add heartbeats. To send heartbeats from Marid to OpsGenie, configure Marid as a web server and send heartbeats by using Marid's Script Proxy functionality. Marid should send heartbeats periodically, and the period should be shorter than the heartbeat's interval. You can get detailed information by referring following support documents.

Marid has a built-in script (SendHeartbeat.groovy). The script uses special opsgenie variable to send heartbeat with the least lines of code.

Script File

<SCRIPTS_DIR>/SendHeartbeat.groovy

logger.debug("sending heartbeat with params:${params}")
opsgenie.heartbeat(params)
URL to be Called via CURL
curl -XPOST 'http://<marid_server>:<marid_port>/script/SendHeartbeat.groovy?name=maridheartbeat' -d 'content data'
Expected curl Output
{"success":true}