prometheus opsgenie heartbeat basic auth almost working

805 views
Skip to first unread message

Yosef Yudilevich

unread,
Aug 2, 2018, 3:20:48 AM8/2/18
to Prometheus Users
opsgenie may take this header:

Header Key: Authorization
Header Value: basic base64($apiKey)


the problem we when add:

        basic_auth:
          password: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee


what is being base64 encoded as ":aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
(notice the column)

so do you think it is possible to remove the column in case that one of username/password is not provided?

then we get opsgenie heartbeat for free

i can submit PR if that is possible

PS

also wanted to update that it is possible to send notifications to https://deadmanssnitch.com/ without PD on the way

just send webhook to address they provide and it works

thanks 




Simon Pasquier

unread,
Aug 2, 2018, 4:10:02 AM8/2/18
to Yosef Yudilevich, Prometheus Users
Unfortunately it can't be changed since it's against the RFC [1] and the Prometheus code relies on the Golang net/http library [2] that does just the right thing.
Not sure why OpsGenie chose this way.


--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/dea74cd0-947b-451e-9997-4fc80c221b60%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yosef Yudilevich

unread,
Aug 2, 2018, 1:09:06 PM8/2/18
to Prometheus Users
you are right

i have talked to opgenie guys, and they may be will change to support the RFC

i will update here 


On Thursday, August 2, 2018 at 11:10:02 AM UTC+3, Simon Pasquier wrote:
Unfortunately it can't be changed since it's against the RFC [1] and the Prometheus code relies on the Golang net/http library [2] that does just the right thing.
Not sure why OpsGenie chose this way.

On Thu, Aug 2, 2018 at 9:20 AM, Yosef Yudilevich <yosef.yu...@gmail.com> wrote:
opsgenie may take this header:

Header Key: Authorization
Header Value: basic base64($apiKey)


the problem we when add:

        basic_auth:
          password: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee


what is being base64 encoded as ":aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
(notice the column)

so do you think it is possible to remove the column in case that one of username/password is not provided?

then we get opsgenie heartbeat for free

i can submit PR if that is possible

PS

also wanted to update that it is possible to send notifications to https://deadmanssnitch.com/ without PD on the way

just send webhook to address they provide and it works

thanks 




--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.

Pete Leese

unread,
Oct 8, 2018, 6:17:07 AM10/8/18
to Prometheus Users
Any update on this one?

Simon Pasquier

unread,
Oct 8, 2018, 6:24:39 AM10/8/18
to Pete Leese, Prometheus Users

Pete Leese

unread,
Oct 8, 2018, 6:32:47 AM10/8/18
to Prometheus Users
Thanks - I have replied to the thread - looking on how to implement this from server side to monitor services are up and running.

Yosef Yudilevich

unread,
Oct 10, 2018, 5:03:50 AM10/10/18
to Prometheus Users
for whoever is interested, so now it is not complicated at all and may be done without
so many components involed
thanks opsgenie for working to  fix a problem with empty username

```
route:
  receiver: default
  group_by:
  - job
  routes:
  - receiver: deadmansswitch
    match:
      alertname: DeadMansSwitch
    repeat_interval: 1m 

receivers:
 - name: deadmansswitch
   webhook_configs:
     send_resolved: true
     http_config:
       basic_auth:
         password: OPS-GENIE-API-KEY
```

Pete Leese

unread,
Oct 16, 2018, 10:58:44 AM10/16/18
to Prometheus Users
Hi Yusef,

Do you still have to create an alert rule to trigger this, or does this method ping the endpoint without the need to create a deadmansswitch alert rule?

Cheers

P

David Karlsen

unread,
Oct 16, 2018, 11:12:02 AM10/16/18
to petel...@googlemail.com, Prometheus Users
you need an alert rule.
alert -> amanager -> webhook (opsgenie)

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Reply all
Reply to author
Forward
0 new messages