External monitoring of URLs including Opsgenie support
Asked by Rogier:

At our company we use the prometheus/grafana stack for measuring quality and uptime of our landscape. Opsgenie is being used as our alerting mechanism. So far so good!

But... as a final check we want to have a ++*total independent*++ "last resort"-check, from external locations. What are best practices for this?

What we want:

* Being able to validate uptime (read: HTTP response codes) from (multiple) locations
* If something is down (!= 200 range), then alert the corresponding innovation team using opsgenie

Curious to hear what external solutions are available with embedded opsgenie support.


Answers:
author: Nick H
body: Hi [@rogierl](/t5/user/viewprofilepage/user-id/4939341) ,

Closest thing Opsgenie has to that use case is [Heartbeats](https://support.atlassian.com/opsgenie/docs/add-heartbeats-to-monitor-external-systems/). These essentially act like a dead man's switch, and can monitor that periodic tasks are running as expected.

Say for example you schedule a heartbeat to receive a ping from your external system every 12 hours. If Opsgenie does not receive that ping after the expected time, an alert can be created to notify your users to investigate the issue.

comments: author: Rogier
body: Hey [@Nick H](/t5/user/viewprofilepage/user-id/2540930) , that still would mean that we need something, a service, which does the actual request to our website. I was hoping such a thing was built inside the opsgenie stack. But seems like it isn't.

And I understand that, because opsgenie is an alert system, not a monitoring system. So basically I'm looking for a (simple) monitoring system which can do the actual requests, but which HAS integration with Opsgenie for the alerting part.


author: Nick H
body: Yeah seems like you'd want a website monitoring tool such as Pingdom, Uptime Robot, etc.

But just to be clear, the heartbeart would be a ping sent from your external system to Opsgenie, not Opsgenie reaching out to the external system. So if your website can send some sort of job to Opsgenie, and it's not received over the specified times, Opsgenie would then create an alert.


author: Rogier
body: Yeah I understand. Thanks [@Nick H](/t5/user/viewprofilepage/user-id/2540930) , for your help. The heartbeat feature indeed looks promising. Next step is to look for a way to actually do the request.


author: Joseph Matan
body: If **Opsgenie** doesn't received the heartbeat over a specified time from my service/website, does the alert from **Opsgenie** can be easily integrate with **Statuspage** and update one if it's components ?


author: Nick H
body: Hi [@Joseph Matan](/t5/user/viewprofilepage/user-id/5075177) ,

That should be possible. There's a few things you'd need to configure within the heartbeat, as well with the Statuspage integration.

The heartbeat would need to add the affected component tag when the heartbeat-alert is created:

![hbsp1.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/225013i14910E1206FD9858/image-size/large?v=v2&px=999 "hbsp1.jpg")

And the Statuspage integration would need to create an incident AND update the components'/incidents' statuses according to tags when an alert is created:

![hbsp2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/225014iD0EFFCF6FFEC0FD3/image-size/large?v=v2&px=999 "hbsp2.jpg")

Our Statuspage document should help determine the format of the tag under the [Changing Component/Incident Statuses via Alert Tags section](https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-statuspage/#Changing-Component-Incident-Statuses-via-Alert-Tags--Optional-). Here's a few examples shown in there as well:

* cmp_API:degraded_performance

* cmp_Database Server:partial_outage

* cmp_Management Portal:operational

And a test to prove this use case is possible through an expired heartbeat:

![hbsp3.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/225017i57050115F345EE70/image-size/large?v=v2&px=999 "hbsp3.jpg")![hbsp4.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/225018iB3E290EAD9946D09/image-size/large?v=v2&px=999 "hbsp4.jpg")


author: Joseph Matan
body: [@Nick H](https://community.atlassian.com/t5/user/viewprofilepage/user-id/2540930) thanks for your fast response and detailed answer !!!!

Do you know if there is a future plan add the heartbeat feature directly to **Statuspage** ?

Because that what we've suggested here with **Opsgenie**is more like a workaround.

(I know that **UptimeRobot** offers the heartbeat solution directly on their statuspage)

Thanks,

Joseph


author: Joseph Matan
body: .


Tags: cloud