Send alert emails with LibreNMS when monitoring network devices

NC

You monitor network devices with LibreNMS, and you want to get email notifications to your inbox every time a certain device loses connection. This article will solve that problem for you.

If you want to send alert Telegram messages to your phone, read this article: How to Send alert Telegram messages to your phone using LibreNMS.

First, you configure the email address to send. Click the icon of settings, select "Global Settings".

Send alert emails with LibreNMS when monitoring network devices

Go to "Alerting" > "Email Options". The email service I use in this article is Gmail, the most popular and free email client available today. You choose to send email as SMTP.

Send alert emails with LibreNMS when monitoring network devices

SMTP Server is smtp.gmail.com. SMTP Port is 587, Encryption is TLS.

Send alert emails with LibreNMS when monitoring network devices

Next you enter your email address and password. Here you create a new application password for your Gmail account. You go to myaccount.google.com then go to the security section.

Send alert emails with LibreNMS when monitoring network devices

Next you create a new app password. This new password lets you send emails from apps other than Gmail. In the drop-down list you select other.

Send alert emails with LibreNMS when monitoring network devices

Then you create a name for the application, here I name it librenms.

Send alert emails with LibreNMS when monitoring network devices

And here is the random password you will receive.

Send alert emails with LibreNMS when monitoring network devices

You use this password to configure alert emailing on LibreNMS. At this point, you have configured the email used to send the alert.

Next you configure the email address to receive alerts.

Send alert emails with LibreNMS when monitoring network devices

Hear you name it so it's easy to remember. You activate the alert. Finally, enter the email address to receive the alert. In this example I use the same email address to send and receive.

Send alert emails with LibreNMS when monitoring network devices

Next, we configure the types of alerts that are sent. By default LibreNMS won't have any alerts so we have to create them.

Send alert emails with LibreNMS when monitoring network devices

You can easily create an alert from a ready-made alert list. For each alert you choose the device and email address to receive the alerts when the problem occurs.

Send alert emails with LibreNMS when monitoring network devices

I will choose two alerts when devices lose connection. I choose that device is mikrotik router with ip address 10.11.32.113. 

Send alert emails with LibreNMS when monitoring network devices

With this alerts configuration, every time the mikrotik router loses connection, you will receive a alerts email. Then, when the mikrotik router restores the connection, you will also receive a notification to your email.

I will shutdown the mikrotik router and wait to see if the alert is sent to the specified email. You wait a moment for the alert to be sent to your email. The preparation steps are done let's check the results. As you can see mikrotik router disconnect alert has been sent to your email.

Send alert emails with LibreNMS when monitoring network devices

Facebook: https://www.facebook.com/routerbest

Twitter: https://twitter.com/routerbestcom

Tags: Gmail LibreNMS