alertmanager - send digest mail every 12 hours - prometheus-alertmanager

We are using Prometheus alertmanager for sending emails. We have a requirement to send alert emails as only digest every 12 hours.
So, we configured our receiver like this:
- receiver: digest-receiver
group_by: [...]
continue: true
group_wait: 12h
group_interval: 12h
repreat_interval: 3d
Is there any bad implications of using 12h for group_wait?
Also, how can we avoid including all active alerts in next mail and include an alert only once in an email? For example:
Email sent at 12 AM - contains 12 active alerts
New alerts showed up since then, say extra 10. Original 12 alerts are still active.
Email sent at 12 PM - contains 22 active alerts (12 original, 10 that showed up in last 12 hours).
Is there a way for mail sent at 12 PM to include only 10 new alert?
Note: We are not generating alerts using prometheus, but instead we use alertmanager API to post alerts from our services.

Related

Is there a way to schedule a mail?

I need to send emails every day and deliver them at a specific time.
Eg. I m calling the function at 1 am every day because no one uses the app at that time and I want emails to be delivered at 8 am the same day.
How can I achieve this by using nodemailer SMTP ?

AWS Pinpoint - Both 'Campaign' and 'Test messaging' fail to send email

I followed the following guide to setup an AWS Pinpoint project:
https://docs.aws.amazon.com/pinpoint/latest/userguide/gettingstarted-create-campaign.html
After I launch the campaign, the email is not sent (I chose 'immediately'). So, I checked 'Test messaging'. It also failed to send mail. I had already activated my sender email address.
The campaign analytics says:
Messages sent - 1
Messages delivered - 1
Delivery rate - 100%
Email open rate - 0%
Bounce rate - 0%
May I know why the mails are not delivered by AWS Pinpoint please?
This is my be due to Sandbox mode having following restrictions:
Limitations Of Sandbox Mode :-
You can send an email only from verified addresses and domains
addresses that are associated with the mailbox simulator. maximum of
200 messages per 24-hour and maximum of one message per second.

program to check unread mails every 30 minutes and trigger code for each unread mail in python

I have to trigger Jira ticket creation code when new mail comes.
My Jira ticket creation code is ready. Now i have to check mail box every 30 minutes and trigger the unread mails as input for jira ticket creation code.

Azure Web Application Monitoring Alert doesn't fire

I have configured an Azure Web Application Monitoring rule such that if there are more than 30 requests over a five minute period, then an alert should fire which should both send me an email and trigger a webhook.
Problem is, the alert doesn't fire even when the parameters for the alert are clearly satisfied. I took a screenshot of the traffic graph after I made over 30 requests to the server within a five-minute window. I've also included the specific configuration menus for this alert.
How can I make this alert fire?
I checked one of my alerts a similar one that was set to a threshold of 5 mins for response time, I find that these alerts were fired , if my response time for a give requests exceed a certain time (12MS) and that if it had happened for a period of 5 minutes, email needs to be sent. I have attached a snapshot as to when this happened to help understand what this might be - so in your case , to measure if the requests were greater than 30 at say 12:00PM - until 12:05 PM - (ie) for a period of 5 mins, your alert would fire - if it did not, then you may need to check something else.
So my guess here is that if there was a flat line # more than 30 for a period of 5 mins - meaning if you had requests greater than 30 for a continuous period of of 5 mins, your alert would and should work.

Cannot fetch email with large attachment

I use fetchmail to fetch emails from my Gmail account. But when the mail attachment is very large(like more than 20M), the mail will not be fetched to my local mail inbox.
How to force the fetchmail to download such a large email(Maybe it's the problem of Gmail?)?
Alternatively, I am willing to just download the mail without the attached in such a large attached case(But do not delete it in the Gmail Server).
How to solve this problem? Any suggestion?
Call fetchmail with:
fetchmail --limit 25165824 --timeout 1200
to increase the message size limit to 24 MB
and the server non-response time to 20 minutes.
(vary the size and timeout as you prefer).
Be aware that some local MDAs may also need limits raised
- I needed to add to /etc/postfix/main.cf:
message_size_limit = 25165824

Resources