In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Cacti is a graphical analysis tool for network traffic monitoring based on PHP, MySQL, SNMP and RRD Tool. Cacti provides a quick poller, advanced chart templates, multiple data collection methods, and user management features. All of this is packaged in an intuitive, easy-to-use interface that makes sense for local area network and complex networks of thousands of devices.
However, in order not to miss important threshold alerts, email notifications are often insufficient, and telephone notifications are often the most direct way. When an important alarm is generated, the alarm call can be received at the first time, so that the user can handle it at the first time. Cloud Alert, the intelligent alert platform of Ruixiang Cloud, can realize telephone alert simply and quickly. Next, let's talk about how to realize it!
There are three main steps:
1. Integrated application-that is, integrating Cacti into Ruixiang Cloud intelligent alarm platform
2. Set Dispatch Policy-Sets who notifies when an alarm occurs
3. Set Notification Policy-Set how your phone is notified
I. integrated application
1. Go to www.aiops.com and log in
2 . Create a Cacti app in Cloud Alert, click Integration-Monitoring Tools- Cacti
3. Fill in "App name" and click "Save and get app key"
4. Install and configure thold plug-ins, configure email alerts
5. Modify thold plugin to support CloudAlert access
(1)Open {cacti_home}/plugins/thold/thold_functions.php For example:
vim /var/www/html/cacti/plugins/thold/thold_functions.php
Go to function thold_mail:
/* Sends a group of graphs to a user */
function thold_mail($to, $from, $subject, $message, $filename, $headers = '') {
global $config;
thold_debug('Preparing to send email');
include_once($config['base_path'] . '/plugins/settings/include/mailer.php');
include_once($config['base_path'] . '/plugins/thold/setup.php');
$subject = trim($subject);
$message = str_replace('', $subject, $message);
...... //omitted here
}
After $message = str_replace ('', $subject, $message) ; add the following code and replace the appkey parameter:
function onealert_for_cacti($msg, $subject) {
$fields = array(
"app" => "--", fill in the appkey generated when you create an app
"subject" => $subject,
"msg" => $msg
);
$fieldsdate = json_encode($fields);
$ch = curl_init("http://api.aiops.com/alert/api/event/cacti/new");
curl_setopt($ch, CURLOPT_HEADER, "Content-type: application/json");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fieldsdate);
$output = curl_exec($ch);
if(curl_errno($ch)){
print curl_error($ch);
}
curl_close($ch);
echo $output;
}
onealert_for_cacti($message,$subject);
(2)Restart SNMP
service snmpd restart
(3)Restart httpd
service httpd restart
(4)Configure Cacti to trigger alerts and check Cloud Alert and Mail Alerts
II. Set dispatch policy
1. Click Configure-Assignment Policy-New Assignment
2. Enter the name of the dispatch policy-select Apply-set the dispatcher (the person to notify when an alarm occurs), and click Save
The user can assign specified conditions according to conditions such as Alarm Level and Alarm Content.
III. Set notification policy
1. Click Configure-Notification Policy-New Notification
2. The notification policy is also highly selective. The user can select alarm status, alarm level, notification mode, time setting, delay policy, notifier, etc. The meanings are as follows:
Alarm Status: Select the status of the alarm notification. There are four choices: when it occurs, when it is claimed, when it is closed, and when it is all selected.
Alarm Level: Select the level of alarm notification. There are four options: alert, warning, serious and all.
Notification mode: Select the alarm notification mode. There are 5 choices: phone, SMS, email, WeChat and APP.
Time setting: Select the time for alarm notification. There are three options: any time, working hours and non-working hours.
Delay Policy: Select whether alarm notification is delayed.
Notifier: Select the person to alert.
For example: Any time an alarm occurs, a severe alarm is immediately notified by telephone to everyone.
Alarm Status-When Occurred; Alarm Level-Severe; Notification Method-Phone; Time Setting-Any Time; Delay Policy-Immediately; Notifier-Select All
Cacti and CA alarm level mapping
Cacti Default Severity Level for All Alerts| subject contains NORMAL or contains Normal or contains Restored for recovery alarm.
The above settings complete Cacti's phone notification settings, and there are a variety of notification methods, users can also see according to their own needs to set.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.