Heartbeat feature can be used to ensure that your environment is able to connect to OpsGenie continuously :
- There is no network problems between your system and OpsGenie
- Your heartbeat sender system is working as expected.
Heartbeat feature can also be used to monitor your periodic tasks are running as expected by using a suitable heartbeat expire interval regarding your periodic task run time.
When a heartbeat is added to OpsGenie with an interval of 10 minutes, your system is expected to send http based heartbeat requests periodically, at least every 10 minutes. If a heartbeat request is not received for more than 10 minutes, OpsGenie will conclude that there is a problem between your system and OpsGenie and create an alert according to your settings.
You can add any number of heartbeats to work. You can configure the check intervals for each heartbeat separately up to once per minute.
- Create a Heartbeat Integration from Integrations page, copy the API Key from that page
- Add your heartbeats from Heartbeats page, for each heartbeat define a unique name and select your desired interval. Without adding heartbeat you are not able to send heartbeat.
- You can also add heartbeats via Web API .
- Choose one of the following methods to send heartbeat to OpsGenie :
- Lamp, the command line utility can be easily called from any programming language, easy as : lamp heartbeat
- Web API, you may directly call OpsGenie Web API from any programming language
- Java API, if you are familiar with Java you can go with this option
- You can also use the Script Monitoring Client to automatically create and send heartbeat messages using a single command. The client is released for both Linux and Windows distributions. It's also a fit for monitoring one-time script jobs.
- Send Heartbeat policies, one of our new features, can also send heartbeat when a new alert is created in OpsGenie. Basically, you can turn alert creation into heartbeat monitoring with this policy.
- Make sure that your system sends heartbeats periodically at least every 10 minutes
- Make sure your Heartbeat Integration & Hearbeat is enabled.
- Configuration of Heartbeats is only available to admins & owner, but all users can browse heartbeat status on Heartbeats page.
Add Heartbeat Integration
- Create a Heartbeat Integration from Integrations page
- Enter recipients, you may select multiple users or groups
- Enter an Alert Message indicating heartbeat failures
- From Heartbeats page add a new heartbeat with a unique name and your desired expire interval.
- Send a heartbeat, open Heartbeats page, it will show your latest active heartbeat.
- Wait until your last heartbeat expires do not send again, open Heartbeats page, it will show your latest expired heartbeat.
- An alert will be created soon after heartbeat expiry, notifying the recipients.
Heartbeat active again
- Send another heartbeat, it will show your latest active heartbeat
- The expiry alert will be automatically closed soon