Cacti monitoring host

Source: Internet
Author: User
Tags snmp error

1. Configure cacti to monitor the local host localhost

Each time a monitored device is added, there are three basic steps: 1. Create devices to add a device; 2. Create graph to create a new device; 3. view the generated image

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/45/36/wKiom1PkWheiEPY1AABkV2xJNjQ592.jpg "Title =" 9.png" alt = "wkiom1pkwheiepy1aabkv2xjnjq592.jpg"/>

We need to monitor the status of the device, so the first thing we do is to add devices. First, click the "devices" tab and we can see that a localhost already exists.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/45/36/wKiom1PkWyzhRPpXAAEw_jAlujE654.jpg "Title =" 1.png" alt = "wkiom1pkwyzhrppxaaew_jaluje654.jpg"/>

Then, click localhost to configure the local host. We edit SNMP options, as shown in, as long as we select the SNMP version as "version2" and specify the community, click "save" in the lower right corner.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/45/36/wKiom1PkXRyS61cWAAHd9xUdLxU709.jpg "Title =" 1.png" alt = "wkiom1pkxrys61cwaahd9xudlxu709.jpg"/>

Then, select "create graphs for this host" in the upper-right corner of the page to add monitoring images for this host.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/45/37/wKioL1PkXvDABt5QAAEEisQ8_xI160.jpg "Title =" 1.png" alt = "wkiol1pkxvdabt5qaaeeisq8_xi160.jpg"/>

Select the disk space for monitoring the local host, and then click "CREATE"

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/45/36/wKiom1PkXv_yY35NAACXQ7_av3o234.jpg "Title =" 1.png" alt = "wkiom1pkxv_yy35naacxq7_av3o234.jpg"/>

Now, we have added the cacti host. To facilitate graph viewing, we add the cacti host to "Graph trees.


Create graph trees:

Click "Graph trees"-> "add"


650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/45/3B/wKioL1PkjsDRWCKoAAH4OfhVUZg488.jpg "Title =" 1.png" alt = "wkiol1pkjsdrwckoaah4ofhvuzg488.jpg"/>

Now that graph trees has been created, add the host to graph trees. On the previous page, click "add". In "tree item type", select "host". By default, click "CREATE ".

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/45/3B/wKioL1PkkK_iGFl0AAI2DvTOfR0280.jpg "Title =" 1.png" alt = "wkiol1pkkk_igfl0aai2dvtofr0280.jpg"/>

In the future, we will check the information of a host and go directly to a category. In this way, we can clearly classify the categories, making it easier for us to manage them.


2. configure a remote host for cacti monitoring

The above explains how to monitor local hosts and how to monitor remote hosts? In fact, the process is the same as the method for monitoring local hosts. However, note that you must install SNMP on a remote host and perform simple configuration.

For centos/RHEL Series:

# Yum-y install net-snmp-utils # optional ## edit the configuration file # vi/etc/snmp/snmpd. conf

For Windows 7/8 series:

Control Panel-> Programs and functions-> enable or disable Windows functions-> select Simple Network Management Protocol (SNMP)

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/45/3C/wKiom1Pkon2TkLvuAAGiMLHysvY951.jpg "Title =" 1.png" alt = "wkiom1pkon2tklvuaagimlhysvy951.jpg"/>

In the services service, edit its attributes and SET community.

For Windows XP/2003:

Here we use Windows Server 2003 as an example. For other Windows products, the method is similar. First, check whether the current Windows component has installed the SNMP protocol. By default, it is not installed. If not, follow these steps:

Control Panel-> add or delete programs-> Add/delete Windows Components-> management and monitoring tools-> details-> select Simple Network Management Protocol (SNMP ).

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/45/3C/wKiom1PkpJ-jXut4AAIRDtrlpCg232.jpg "Title =" 1.png" alt = "wKiom1PkpJ-jXut4AAIRDtrlpCg232.jpg"/>

During installation, you will be prompted to insert the disc and specify the i386 folder location. What should I do? Here I have uploaded an attachment for you to download. Provides an independent SNMP installation component for Windows 2003, which only has more than 200 kb. Download and decompress the package, and then point to this directory. After the SNMP component is successfully installed, click "services" in the "management" menu ".

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/45/3E/wKiom1Pkz1HgoGf6AAENkxYloIw882.jpg "Title =" 1.jpg" alt = "wkiom1pkz1hgogf6aaenkxyloiw882.jpg"/>

Find the SNMP service and double-click it for configuration. Note that the SNMP server is started by default after the SNMP protocol component is installed. The SNMP Trap Service below the SNMP server is disabled.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/45/3F/wKioL1Pk0TDjnJxJAAEY5xjBe4U984.jpg "Title =" 1.jpg" alt = "wkiol1pk0tdjnjxjaaey5xjbe4u984.jpg"/>

In the Configuration window of the SNMP service, you only need to switch to the "Security" tab and enter it as shown in the following figure. The group name here is the password string in the SNMP v2c version introduced earlier, the "public" is just an example. You can enter other strings. When configuring the SNMP option of cacti, select v2c protocol and enter the group name in the community input box.

Another thing that requires special settings is the following authorized HOST: select "Accept SNMP Packets from these hosts", and then add the IP address of the cacti/Nagios monitoring center to the specified host below, this makes it impossible for other servers to obtain your server monitoring information.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/45/3F/wKioL1Pk0evQKc0KAAEMoPADkSU835.jpg "Title =" 1.jpg" alt = "wkiol1pk0evqkc0kaaemopadksu835.jpg"/>

After all the configurations, make sure that the SNMP service is enabled. If the server is restarted later, check whether the SNMP service is enabled. In addition, make sure that your server has opened the port of the SNMP service. The default value is UDP 161. If you have enabled the system firewall, add this exception port, open the local connection, choose Properties> advanced> Settings, click Add in the "service" tab, and add the following Port:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/45/3E/wKiom1Pk0SeglbXXAAESUkkLZGU270.jpg "Title =" 1.jpg" alt = "wkiom1pk0seglbxxaaesukklzgu270.jpg"/>

It is best to test it on the monitoring end using commands such as snmpwalk.


Now, let's get back to the topic and monitor the remote host. Similarly, we can follow the three steps below.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/45/3C/wKiom1PknVnTx1G1AABkV2xJNjQ433.jpg "Title =" 9.png" alt = "wkiom1pknvntx1g1aabkv2xjnjq433.jpg"/>

Go to the cacti console panel and click "devices" to enter the device panel. Then click "add" to add a new device.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/45/3C/wKiom1PknpCChYiAAALxQl4k_8Q869.jpg "Title =" 1.png" alt = "wkiom1pknpcchyiaaalxql4k_8q869.jpg"/>

In fact, the most important thing here is the hostname, host template, and SNMP options. Select "local Linux machine" for the host template (select a suitable host template, how to add a template is not covered yet, as explained in the learning records below)-> click "CREATE" to save the information. If the SNMP connection is normal, the server information will appear in the upper left corner, otherwise, the message "SNMP error" appears in red.

Then, the subsequent process is exactly the same as monitoring the local host. However, note that because cacti collects data once every 5 minutes by default, the newly created host will not be shown immediately.



This article is from the share your knowledge blog, please be sure to keep this source http://skypegnu1.blog.51cto.com/8991766/1537615

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.