-
Notifications
You must be signed in to change notification settings - Fork 4
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Part 2] How to setup alertmanager and send alerts ? · ashish.one #3
Comments
Hi Ashish! Thanks for share your knowledge! This 2nd part is very complete and the links to examples pages are so usefull! Thanks again! |
Thanks for a precise post, it helped me configure alerts properly. However I cannot find the Part-3 of this. Would you be able to point me towards that? |
HI @akanshadureja Thanks for your words. I am on Part - 3. Till that i can try to solve your doubts :) |
Thanks a lot for the response Ashish :) I am able to connect Prometheus Data source with Grafana. I am trying to figure out if there is a way to connect Grafana Alerts with Alert Manager to configure Threshold based alerts. |
Hey akansha, As far i research on this, I haven't found this integration. Even in past i was looking for the same where i can simply set my alert rules on UI on grafana. So there is 2 alertmanagers we have
I'll recommend go with Prometheus alertmanager It provides much flexible feature like grouping, batching etc. Keep grafana only for data visualization. And I just noticed i already released my part - 3 where I have shown how you can create your own custom exporters but not about grafana <---> Prometheus |
@akankshadureja I am live with Part 4 (Setup grafana with Prometheus). You can check here https://ashish.one/blogs/setup-grafana-with-prometheus/ |
hi ashish, really simplified the process for me, i am just starting my cloud admin switch , so just to be clear, we have to install all the exporters like jmx, node exporter and alert manager on the machine our application is running / on the machine we want to monitor and i have my prometheus and grafana running on a seperate machine where in i can define the alerting rules and within just point the private ip of my application machine. is that correct ? thank you |
Hey @Cryptopanda07 Sorry for delay in reply.
Let me know if i clearly understand your doubts. Thanks |
i might have confused you, my question was, i have 3 kafka brokers and 1 zookeeper broker and 1 admin instance ( total 5 instances ) on my zookeeper and kafka instances i have node exporter and jmx running which will expose metrics for my prometheus to catch my prometheus and grafana is running on my admin instance ( different AZ ) should my alertmanager be running on all ( kafka & zookeeper ) OR since alertmanager is only used to fire alerts, it should be run on admin machine ONLY so prometheus will be catching for e.g " instance down " from node exporter and alert the alert manager and then alertmanager fires the alert. |
You no need to setup alertmanager on all instances ( Kafka & Zookeeper). Like Prometheus, Alertmanager also standalone service. In your case, you should run on admin instance only (Though you can run on any instances but not on all.). Just specify your alertmanager's url and port in The flow is: Prometheus runs in specific interval -> It pull the metrics -> Evaluates the alert rules -> if alert is true, It will forward to alertmanager -> Alertmanager will push the alert on various channels. So if prometheus will be catching "instance down" from node exporter, Prometheus will forward to alertmanager ( youralertmanagerurl:9300 ) and then alertmanager will broadcast the alert on various channel. |
thank you so much, this is what i wanted to clear. |
hey ashish a quick one, although all services are up and running the alert manager is not firing any alerts to my slack, following is my rules.yml "/prometheus/rules.yml": and following is my prometheus.yml "/prometheus/prometheus.yml":
following is my alertmanager.yml "/prometheus/alertmanager/alertmanager.yml":
|
@Cryptopanda07 Here are some resources which will help you to do unit testing for your alert rule. Also to test your alertmanager configuration. https://gist.github.com/cherti/61ec48deaaab7d288c9fcf17e700853a https://prometheus.io/docs/prometheus/latest/configuration/unit_testing_rules/ If you still not found anything, Please go through the alertmanager and prometheus logs, You will get some lead over there. |
thank you so much for your help ! ill go through everything |
Hi Ashish, I am using prometheus alertmanager to send email notifications. Now I am able to get email notifications to admin, but I need to send email notifications to the customers when their pod memory limit reached or cpu usage reached. Can you please help me. |
Hello Sridhar, I believe you need to specify the gmail / email config in the alertmanager.yml file seperately and changes rules.yml which will specify what you want the alert for. |
@sridhar551 If you want to send alert to your customers then you want to rewrite Alertmanager will send the alert event to only the admin (Or a single user). You need to accept that event and then you can route that alert to your users. In your use case, I would suggest configuring the webhook with alertmanager. Whenever an alert will generate, The alertmanager will send the payload to your For the |
I agree ! It's easy to setup webhook You can route the alerts to slack and add your customers on the slack channel and give them access to a seperate alert channel on slack. However sending alerts to customers make no sense. Why would you want your customers to know your setup is on fire ? :P |
@Cryptopanda07 Yes slack is also good option. And there can be use cases where you need to send alert to your customer. Lets say you are hosting provider, Where you providing droplets/Servers like Digitalocean and you want to offer the alert services on the hardware usage. In that case you need to send an alert to you client. |
Hi Ashish, I have setup alertmanager with the below configuration. But Alertmanager is matching only the first match_re entry and send alerts to the TX team but not the second match_re entry and routes it to the default route i.e. UX team. I thought "continue: true" would do it but it is not working. Is there any issue with the configuration? The alertmanager version I am using is 0.21 global: route:
receivers:
|
Hi Team
|
Hey Ashish, I have a small doubt. I am working on alertmanager to send alerts via email. But apparently I had to include extra pair of "{{" to finally be able to replace values. For example: I want to now , include the printf "%.2f" to {{ "{{ $value }}" }} to allow only 2 values after decimal point. Any idea on how to change the syntax? I appreciate anyone's help |
Hi @AbhinJames You can try |
Hi while configuring getting mails, but last few days not getting alertmanager email alertmanager status showing like"evel=error ts=2021-11-25T07:43:00.086Z caller=dispatch.go:310 component=dispatcher msg="Notify for alerts failed" num_alerts=2 err="email/email[0]: notify retry canceled after 7" |
@maheshkapil Can you confirm you SMTP is working from the same server ? |
Hi yes
SMTP is working from server.
But not going from alertmanager.
Thanks for responding my query.
Thanks & Regards
Mahes
…On Thu, Nov 25, 2021 at 10:55 PM Ashish Tiwari ***@***.***> wrote:
@maheshkapil <https://github.com/maheshkapil> Can you confirm you SMTP is
working from the same server ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALLTKSFOKKUXYQHRCIWGP2DUNZWRFANCNFSM4JHPHKPA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@maheshkapil Also you can refer this similar issue: |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[Part 2] How to setup alertmanager and send alerts ? · ashish.one
undefined
https://ashish.one/blogs/setup-alertmanager/
The text was updated successfully, but these errors were encountered: