
The system administrator should always know what works for him, what does not work for him. For example, I often find myself not at the computer, so sometimes it’s problematic to come in and see what “lies” for me. In this regard, I want to tell you how to teach cacti to send you alerts.
For this we need two plugins
thold and
settings . Installing them (I wrote about this in the previous
article )
gives the user rights to use them.
In the Configuration ->
Settings section, two new
Alerting / Thold and
Mail / DNS tabs should appear
:
In the
mail / dns tab, configure:
Test Email - any email to test sending
Mail Services - I set the PHP mail () function
From name - the name from whom the letter will come, I wrote cacti
Word Wrap - how many characters in the letter string, I have 120
Sendmail - if you use sendmail to send mail,SMTP Options - if you use a third-party smtp server.')
Now click on the Send a Test Email settings in the upper right corner and wait for the test letter to arrive:
This is a test message generated from Cacti. The configuration of your Mail Settings.
Your email settings are currently set as follows
Method: PHP's Mailer Class
Go to the
Alerting / Thold tab :
Base URL - url where cacti is located for example
http://192.168.10.1/cacti/Dead Hosts Notifications - put a tick, then we will receive letters if the host is in “Down” (what you need)
Send alerts as text - put a tick, why do we need SMS in html?
Dead Host Notifications Email - write your email, and now in more detail.
I have a Megafon Far East sim card. We will use their
email2sms service. Other operators have this too.
We send a letter to the email:
+79241231234@sms.megafondv.ru , we can play with the test email in the mail / dns tab and send us a message like this.
Now, if anything happens, a text message of the following form comes:
TEMA: Host Error: switch (192.168.0.3) is DOWN
TEKCT: Host Error: switch (192.168.0.3) is DOWN
Message: ICMP: Ping timed out
In addition to simply detecting the operation of the host, thold can send messages when a threshold is exceeded on the graphs or vice versa - decreasing. But more about that next time.
We also have a new tab next to Console and Graph - thold:

All the
most difficult interesting I told, then play on yourself;)
Good site about cacti:
cactiusers.orgOriginal article in my blog