Alerts using HTTP(S)?

aviegas

Dabbler
Joined
Aug 14, 2011
Messages
16
I would not like to reinvent the wheel here, but is there a simple way to send alerts using HTTP/HTTPS? I have a notifications service that is accessible over HTTPS that will forward alert/messages/notification over Pushover or SMS.

Any ideas here?

Thanks in advance.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
You're not alone, it'd be nice to be able to feed alerts into Icinga or something like that through a generic script "API".
 

aviegas

Dabbler
Joined
Aug 14, 2011
Messages
16
I'm thinking of something even simpler than an API, just a single configurable URL (GET) that would have a few substitutions like "data & time", "severity" and "alert text". All the rest would be fixed. It's flexible enough.

But sounds that it's not something easily accomplished. I will do some digging in the code.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
Well, that's very specific to your use case. It would be better to have it as a shell command or script, because to solve your issue, you can use the degenerate case of a shell command like "fetch https://my.alert.service/?user=foo&date=%d&severity=%s&text=%t", while your suggestion of a "configurable URL" means that someone who wants to receive these things for classic UNIX methods such as SNPP or a network monitoring system would actually need to set up a web server and CGI gateway to receive the alerts, and THEN call their script, which is unnecessarily heavyweight.
 

aviegas

Dabbler
Joined
Aug 14, 2011
Messages
16
I do agree. I'm not saying that using a script based "API" is bad or not preferred. Just stating that even a very simple alternative like just calling an URL would get it done. Nothing against calling a unix executable to get the job done. If I find a way around it, I will shoot for calling an executable.
 
Top