Can I use Opsgenie to send me an alert notification when a button is pressed for help
Asked by jahrenkiel:

I would like to know if I installed an alert button at a location that when pressed would automatically send an alert through Opsgenie to a team of technicians?


Answers:
author: connor mcguane
body: I would say if that button is an IoT and connect via an API, it could simply send its payload to Opsgenie.

comments: author: Nick H
body: Yes, that could work as well using our Alert API: <https://docs.opsgenie.com/docs/alert-api>

But again, unfortunately we do not have a script or anything custom to share for this use-case.

If you do build this out [@jahrenkiel](/t5/user/viewprofilepage/user-id/4419149) feel free to share what approach you take / script. I'm sure other customers might find it useful.


author: Daniel Ebers
body: Hi [@jahrenkiel](/t5/user/viewprofilepage/user-id/4419149)

yes, this should work.

The OpsGenie part should not be so hard. Like Nick already explained you could just kick off an email which is directed to OpsGenie, that would get 99% of the software side of logic.

Obviously such a button just can't exist independently (unless you have one with some super logic - but also such a hardware would need being able to kick off an email or do an REST API call).

So - what is somewhat common (if done on a DIY solution basis) is to grab a mini-computer (a "Raspberry Pi" will suffice or is even too large sized for the approach) and using the GPIO connectors you could build a cheap solution.  
On the Raspberry Pi (this is the remaining percent of needed software if you want so) you need a small script which literally kicks of the mail towards OpsGenie as soon as the **button** **connected to it is finally pressed**.

This here could give an idea but there are plenty of other ideas around to be found with Google <https://github.com/K7TRY/Panic-Button>

In case you don't fell confident with soldering/sticking some wires, GPIO connectors and such we have seen there are some USB panic buttons out there. But to be honest, we have not tested them and compared to a DIY solution we found them to be enormously extensive.  

Probably there are also other suitable mini-computers/boards out there which would meet the need, you could have a look around. Hardware requirements are really low, those mini-computers/boards needs almost no computer power and almost no memory - however, you would need to put a small(er) operating system, mostly onto a SD card and put it into it, so it can boot and execute the needed script to kick off when the button is pressed.

++A closing word of warning - as a personal side note:++   
I would not recommend the proposed hardware setup for highly critical environments. We indeed played a bit with implementations like this (in the times before OpsGenie to be honest) in the past but have not used it in a critical environment (for them a professional implementation might be suited better).  
This of course does not apply in any way to OpsGenie (like I said OpsGenie will not the part causing a lot of challenges) but the warning aims more towards the hardware side. If you want to go with a DIY solution, I think, it must be tested very, very well.

[@Nick H](/t5/user/viewprofilepage/user-id/2540930)  
Pheew, I feel this got 99% non-OpsGenie here now, but much of a gobbledygook about hardware and a general idea to the requirement. If you feel it is inappropriate here I am fine with the comment being deleted :)

Regards,  
Daniel

comments: author: Nick H
body: Hi [@Daniel Ebers](/t5/user/viewprofilepage/user-id/800113) ,

I'm fine with leaving your comment! It's an interesting take to this use-case, and I think it can provide value or ideas on how this could be created.

One caveat - at least to my knowledge - is the Raspberry Pi itself will actually need to be physically clicked since it's a piece of hardware. So if [@jahrenkiel](/t5/user/viewprofilepage/user-id/4419149) was looking for a button clicked through a web browser, would this method still work?


author: Daniel Ebers
body: I think this should work as well. For a button "in software" you would just be needing the same logic.

Something that is capable sending mail or to contact the API.


author: Nick H
body: Hi [@jahrenkiel](/t5/user/viewprofilepage/user-id/4419149) ,

I don't think we've come across something like this in the past, but that's not to say it couldn't be done! We just don't have any examples to share.

Alternatively, you could use something like an Email Integration. When the address of the integration receives an email, an alert would be created / could be sent to your team of technicians:

<https://support.atlassian.com/opsgenie/docs/integrate-your-email-with-opsgenie/>

Our Incoming Call integration would also be something to consider. The line of the integration could be dialed to connect with a live user, or texted to generate an alert and notify your team of technicians:

<https://support.atlassian.com/opsgenie/docs/incoming-call-routing/>

Hope this helps! Let us know if you have any questions around these, or in general.


Tags: cloud