Does AlertManager repeatedly try POST request on web-hook url if web-hook returns 500?
1,568 views
Skip to first unread message
anu....@gmail.com
unread,
May 2, 2019, 9:25:55 AM5/2/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prometheus Users
Prometheus alert rule file has one of the rules to check whether service is down or not. And my customized receiver does not handle it, so it is generating some nullPointerException. and alert manager shows 500 Internal Server error for POST request.  Though repeat_interval for this group is 1 hour, but still it continuously calls customized receiver request.How does alertManager work ? What kind of response does it expect from POST request ?
Does alert manager process old alerts if alertmanage is reloaded / restarted ?
Lars Schotte
unread,
May 2, 2019, 9:30:12 AM5/2/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to anu....@gmail.com, promethe...@googlegroups.com
Prometheus alert rule file has one of the rules to check whether service is down or not. And my customized receiver does not handle it, so it is generating some nullPointerException. and alert manager shows 500 Internal Server error for POST request.  Though repeat_interval for this group is 1 hour, but still it continuously calls customized receiver request.How does alertManager work ? What kind of response does it expect from POST request ?
Does alert manager process old alerts if alertmanage is reloaded / restarted ?
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to anu....@gmail.com, Prometheus Users
On Thu, May 2, 2019 at 3:26 PM <anu....@gmail.com> wrote:
>
> Prometheus alert rule file has one of the rules to check whether service is down or not. And my customized receiver does not handle it, so it is generating some nullPointerException. and alert manager shows 500 Internal Server error for POST request. Though repeat_interval for this group is 1 hour, but still it continuously calls customized receiver request.How does alertManager work ? What kind of response does it expect from POST request ?
AlertManager will retry sending the notification in case of a 5xx
error as it expects the error to be transient.
On the opposite, a notification getting a 4xx error won't be retried.
>
> Does alert manager process old alerts if alertmanage is reloaded / restarted ?
Yes in case of reloads. No for restarts.
Simon Pasquier
unread,
May 2, 2019, 9:41:58 AM5/2/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Lars Schotte, anu....@gmail.com, promethe...@googlegroups.com
On Thu, May 2, 2019 at 3:30 PM 'Lars Schotte' via Prometheus Users
<promethe...@googlegroups.com> wrote:
>
> Yes, I am also onto this.
>
> 1.) What do you mean by prometheus alert rule file? Isn't that
> configured in prometheus.yml where he should fire the alert?
> And do you have some working example with a working alert?
> Because I seem to run into unmarshalling errors on prometheus.yml.
>
> 2.) For for that we would need to understand how alertmanager
> communicates with prometheus. Anyone here has a clue? I havent looked
> into it yet.
>
> --
> 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.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to spas...@redhat.com, anu....@gmail.com, promethe...@googlegroups.com
OK, so basically he is going over the front gate using port 9090 (or
whichever is configured), sends up a POST JSON request and that's how
he finds out if there are alerts in the pipe.
Right?
Then the question original question is obviously no, like you already
have stated for restarts, because he has no way to know if there were
alerts fired up in the past which were not consumed, as prometheus does
not keep track of transmitting those alerts.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Lars Schotte, anu....@gmail.com, promethe...@googlegroups.com
On Thu, May 2, 2019 at 3:47 PM 'Lars Schotte' via Prometheus Users
<promethe...@googlegroups.com> wrote:
>
> OK, so basically he is going over the front gate using port 9090 (or
> whichever is configured), sends up a POST JSON request and that's how
> he finds out if there are alerts in the pipe.
>
> Right?
Yes. Prometheus evaluates alerts periodically and will post them to
<alertmanager address>:9093/api/v1/alerts at regular intervals
(new/resolved alerts will be sent immediately while already firing
alerts will be sent at lower frequency).
>
> Then the question original question is obviously no, like you already
> have stated for restarts, because he has no way to know if there were
> alerts fired up in the past which were not consumed, as prometheus does
> not keep track of transmitting those alerts.
Correct
>
> --
> 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.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to spas...@redhat.com, anu....@gmail.com, promethe...@googlegroups.com
LOL, this is nice.
You seem to have just solved one of my misunderstandings.
I was always under the impression that alertmanager gets those alerts
from prometheus, but now you are saying that it is the other way round.
So prometheus is giving away those alerts to alertmanager and has to be
configured at prometheus side.
My problem now is that I could not find any place where to configure
the port of prometheus but instead I have to configure the port of
alertmanager in order to connect them.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prometheus Users
Why do AlertManager retry sending the notification in case of a 5xx
error ? It would make continuous POST call on web-hook url though web-hooked service is not responding. If required , then also there should be some delay (like repeat_interval) for retry.
Lars Schotte
unread,
May 3, 2019, 4:38:07 AM5/3/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to spas...@redhat.com, anu....@gmail.com, promethe...@googlegroups.com
Well, first thing that a beginner has to understand is that those
sections are themselves only references on something else.
For example this <alertmanager_config> is good for nothing.
What I need is inside this <alertmanager_config> a section of
<static_config> where I can set the target.
So all this configuration is all but easy and what I am missing there
is an explanation of those. Maybe even a link to YAML as such.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to anu....@gmail.com, Prometheus Users
On Fri, May 3, 2019 at 9:22 AM <anu....@gmail.com> wrote:
>
> Why do AlertManager retry sending the notification in case of a 5xx error ? It would make continuous POST call on web-hook url though web-hooked service is not responding. If required , then also there should be some delay (like repeat_interval) for retry.
Because 5xx errors are supposed to be transient. If the webhook
receiver can't process the request because it considers it as invalid,
it should respond with a 4xx status code (400 bad request for
instance).
AlertManager retries with exponential back-off to avoid over-loading
the receiver.
>
> --
> 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.
> --
> 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.