I. Use of cacti
1. Interface Introduction
After logging on to cacti, you can see two tabs in the upper left corner, "console" and "graphs ". Console indicates the console, where all configurations and other operations are performed, while graphs is used to view the performance images of all servers.
2. Console menu
Create:
New Graphs-Shortcut for creating new images;
Management:
Graph management-image management. You can delete and copy images here. cacti will automatically create images. However, if we have special requirements, such as merging data on several images into one image, we can also manually create an image here;
Graph trees-image tree. In the graphs interface, images or devices are displayed in a tree structure. You can set the tree structure here;
Data sources -- manage RRD files. Generally, no modification is required. cacti creates an RRD file by itself;
Devices-device management. This is what we need to modify most often. You can create a device or modify its name and other information here.
Collection methods
Data Queries and data input methods are data collection methods. Generally, we do not need to modify these two items;
Templates
Graph templates, host templates, and data templates are image templates, host type templates, and data templates respectively. These templates can be exported, imported, or compiled by yourself, and generally do not need to be modified.
Import/Export
Import templates and export templates to import and export the preceding templates. We can find these templates on the cacti official website, but pay attention to the cacti version of the template.
Configuration
Settings -- main configuration menu of cacti;
You can reset the path, version, and other information of the corresponding program here. You can also set the image output mode (FTP allowed), display effect, and login mode (LDAP allowed.
Utilities
System utilities -- displays cache and log information of the cacti system. If the log file is too large, you are advised to view it directly in the background;
User Management-user management. Users can be added and deleted here, and detailed permissions can be set for each user;
Logout user -- log out of the user.
3. Create a monitoring site
Assume that the monitored server is named "test host", the IP address is 192.168.100.110, And the SNMP community is public.
Go to the console panel of cacti->
Click "devices" to enter the device panel->
Click "add" to add a new device.->
Fill in the information of the server to be monitored. Select "local Linux machine" or "UCD/net snmp host" for the host template (select a proper host template)->
Click "CREATE" to save the information. If there is no problem with the SNMP connection, the server information will appear in the upper-left corner. Otherwise, the message "SNMP error" will appear in red->
Click "create graphs for this host" in the upper part to create the content to be monitored for this device. There are two types of monitoring content: "graph templates" and "Data Query". The difference is that "Data Query" can list the Monitoring Project Information Based on SNMP information. For example, "interface Statistics" in data query can view information about all network adapters of the host, so that we can select the network adapter to be monitored. Click the square option on the right to select the project to be monitored->
Click "CREATE" to create the selected monitoring content. The selected content is automatically dimmed and cannot be clicked. Cacti automatically creates the RRD files (in the RRA folder), "Data Source", and "Graph" entries for the monitoring site.
The monitoring site has been created.
4. View monitoring sites
Click "Graph management" to view the image of the monitoring point you just created. Note that because cacti retrieves data from the monitoring server every 5 minutes by default, therefore, Images cannot be displayed at the newly created monitoring point. It takes several minutes to view the images before they can be displayed normally.
To facilitate viewing, you can add the newly created device or image to the image tree:
Click "Graph Tree" to go to the "image Tree" Panel->
Click the branch name or "add" the new branch->
Click "add" to add a new "tree items"->
Select "host" in "tree item type", and select the newly added host "test host" in "host" of "tree item value"->
Click "CREATE ".
Adding a host node to the viewtree for monitoring is undoubtedly a simple method. However, as the number of monitoring charts increases, all images are placed on one host node, when you view an image, the display speed of the image slows down, and the monitoring chart structure is not cleared. Therefore, you can generally classify the Image Based on the monitoring function and the monitoring service type, organize a structured image tree. To add a node, follow these steps.
Add a root node, select "Header" in "tree item type", and enter a descriptive information in "title". In this example, enter "host monitor ", host MONITOR node images are mainly images related to host performance, such as CPU, memory, and disk space;
Click the Add link next to the newly created root node (host Monitor) to add a graph;
Select "Graph" in "tree item type" and add the desired Monitoring Chart to "Graph". repeat this process to add all the monitoring charts you want to add.
You can also add tree items, such as MySQL monitor. This node is used to monitor information related to the MySQL service. Repeat the preceding process until a tree with regulations is created.
In this way, we can view all the monitoring images of "test host" on the "graphs" interface.
5. Add a new monitoring chart for an existing host
Click "New graphs" in the console and select the host for which the monitoring chart is to be added. Select a graph template from graph templates. In this example, select SNMP-ceneric OID template and click Create.
Fill in the following information, fill in the graph name in the "title" text box, fill in the description information in the "vertical lable" text box or the unit used for the painted image, etc., displayed on the left side of the painted image, enter the name of the data source in the "name" text box, select the color used for drawing in "legendcolor", and enter the name of the legend in "legend text, fill in the oId information of the host to be monitored in the "oid" text box, and click "CREATE" to complete graph creation.
The monitoring chart is as follows:
6. Merge multiple data sources into one graph
Click "Graph Management" in the console, and then click the Add link.
Select none in the select graph template drop-down box, select none in the host drop-down box, and then click the create button.
Enter the graph name in the "title" text box.
Click the Add link to add graph items.
Add multiple data sources and draw the selected data sources to a monitoring chart.
After that, place the monitoring chart to graph trees.
Reprinted: http://blog.sina.com.cn/s/blog_4e424e2101000b6o.html