Cacti provides compatibility to send notification when any
events occurred. Notification is every important option for every monitoring
system because we cannot look at the computer screen all the times.
Notification on Cacti is the way that, Cacti will send message to notify the
administrator when any devices down or any abnormal events. So, let’s start how
to configure it. First of all, we need to install mail service mostly postfix,
and mailx which is the command line utility that allow us to send mail from
command line. Cacti can send notification to local mail and external mail like Gmail.
Install Postfix
Postfix is the mail service on Linux.
yum install postfix -y
Restart postfix service
system restart postfix
systemctl enable postifx
systemctl enable postifx
In order to send email from command line on Linux, we need to install mail command utility.
yum install mailx -y
Cacti send notification to local mail
Cacti can send email notification within three of mail services PHP Mail() Function, Sendmail, SMTP. Go to the web interface of Cacti -> Configuration -> Settings -> Mail/Reporting/DNS.
Fill in the following field.
Test Email: the destination email that we want to
Cacti to notify for any events.
Mail Services: chose the sending method to send
notification
Ping Mail Server: this option is to ping before send
From Email Address:
the source email address of the notification
From Name: it is an alias name.
Next, click on Save and Send a Test Email. We
will see the pop-up screen indicate that Test Email Results is Success.
To verify that user jipo surely get the notification message. Go to command line cat /var/mail/jipo. We will see the message in jipo’s mail box.
The other method for sending notification is that using Sendmail
option. This option is not much different from PHP Mailer. Go to the web
interface of Cacti -> Configuration -> Settings ->
Mail/Reporting/DNS. And select Mail services as Sendmail and
fill the Sendmail path as /usr/bin/mailx. When we complete the
required file Save, and Send a Test Email.
The message indicates the sending status pop-up here.
To verify that user jipo surely get the notification message. Go to command line cat
/var/mail/jipo. We will see the message in jipo’s mail box. So, the result is the same right.
Cacti send notification to Gmail
Cacti can be configured to send
notification to Gmail. That’s Awesome!!
First, we need to allow Less
secure app access on Gmail by follow the link below and then turn it ON. https://myaccount.google.com/lesssecureapps?pli=1
Go to the web interface of Cacti -> Configuration
-> Settings -> Mail/Reporting/DNS.
For example I want to send notification from Cacti by using
email source@gmail.com and
destination email as dest@gmail.com
.
Test Email: the destination email that will get the
notification for any events notified by Cacti (dest@gmail.com
)
Mail Services: chose SMTP because we need to
authenticate by SMTP. The idea about SMTP is that we need to
login into Gmail before we can send email.
From Email Address: the email address that use to
send notification (source@gmail.com )
SMTP Hostname: smtp.gmail.com
SMTP Port: 587
SMTP Username: source@gmail.com
SMTP Password: xxxxx
SMTP Security: TLS
Then click on Save, then Send a Testing Email.
The pop-up message will
appear. This message will show whether Test Send is success or failed.
Here below is the message that we send test from Cacti notification.
Conclusion
I hope you all be able to understand this post well. If you don't understand any point or have any problem, recommendation, suggestion don't hesitate to tell us, we will try our best to help.
I hope you all be able to understand this post well. If you don't understand any point or have any problem, recommendation, suggestion don't hesitate to tell us, we will try our best to help.
No comments:
Post a Comment