Cacti Monitoring Linux Hosts

Source: Internet
Author: User
Tags snmp

1 to monitor a Linux host, you need to install the NET-SNMP related package on the monitored host, and the CentOS installation can use the "yum-y install NET-SNMP" command:
# yum-y Install Net-snmp
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing Package Install arguments
Resolving Dependencies
--Populating transaction set with selected packages. Please wait.
---> Package net-snmp.x86_64 0:5.1.2-18.el4 Set updated
--Running Transaction check

Dependencies resolved

=============================================================================
Package Arch Version Repository Size 
=============================================================================
Installing:
NET-SNMP x86_64 5.1.2-18.el4 Base 509 K

Transaction Summary
=============================================================================
Install 1 package (s) 
Update 0 Package (s) 
Remove 0 Package (s) 
Total Download size:509 k
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
INSTALLING:NET-SNMP ######################### [1/1]

Installed:net-snmp.x86_64 0:5.1.2-18.el4
complete!

2 Modify the configuration file command:
# vi/etc/snmp/snmpd.conf
Make sure that the following green content is included in the snmpd.conf file:
Com2sec notconfiguser Default Public
Group Notconfiggroup v1 Notconfiguser
Group Notconfiggroup v2c Notconfiguser
View SystemView included. 1
Access Notconfiggroup "" Any noauth exact systemview none None
Syslocation Www.cactiez.com
Syscontact Root [email protected]
Pass. 1.3.6.1.4.1.4413.4.1/usr/bin/ucd5820stat
Press ESC when the input is complete, and then press "ZZ" (uppercase)

3 Restart SNMPD Service:
# Service SNMPD Restart
stopping snmpd: [FAILED]
Starting snmpd: [OK]

4 set SNMPD to start automatically at each boot:
# chkconfig SNMPD on
No results are returned when the command finishes executing

5 Check if the SNMPD service is already running:
# Netstat-nlup | grep ": 161"
UDP 0 0 0.0.0.0:161 0.0.0.0:* 16986/snmpd
This command checks if the local is already listening on UDP port 161, and if a similar result is returned, it indicates that the SNMPD service started successfully

6 Ubuntu You can install the SNMPD package using the "Apt-get install snmpd" command:
$ sudo apt-get install SNMPD
Reading Package List ... Complete
Analyzing Dependency tree for Package
Reading status information ... Complete
The following "new" packages will be installed:
Snmpd
0 packages were upgraded, 1 new packages were installed, 0 packages were uninstalled, 67 packages were not upgraded.
You need to download the 0B/92.1KB package.
After decompression, it consumes 377kB of extra space.
"Warning": The following packages cannot be verified!
Snmpd
Do you want to install these packages without verification? [y/n] Y
Pre-Set Package ...
A package snmpd that was previously deselected was selected.
(Reading Database ... The system currently has a total of 195,416 files and directories installed. )
Extracting snmpd (from .../snmpd_5.4.3~dfsg-1ubuntu3_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting SNMPD (5.4.3~DFSG-1UBUNTU3) ...
UPDATE-RC.D:WARNING:SNMPD Stop RunLevel Arguments (1) do not match LSB default-stop values (0 1 6)
* Starting Network Management Services: 
Processing triggers for python-central ...

7 Ubuntu configuration files and check methods with CentOS

8 Login Cactiez-web Interface, click on: "Console", "Host", "Add". Similar to the following settings:


8 If everything is OK, you will see a message similar to the following:
Linux hosts (10.1.254.121) 
SNMP Information
Operating system: Linux test-bbs.idc1.cn0571 2.6.9-89.elxenu #1 SMP Mon June
x86_64
Operating time: 169738 (0 days, 0 hours, 28 minutes)
Host Name: test-bbs.idc1.cn0571
Position: Www.cactiez.com
Contact Person: Root [email protected]

If not, please check the community name, IP address, firewall, etc.

9 After the host is added, you need to add graphics, click "Add graphics to this host" in the top right

9.1 Select all objects in the graphics template area:
Added: UCD/NET-CPU utilization 
Added: ucd/net-load average 
Add: Ucd/net-tcp Register 
Added: ucd/net-tcp Number of connections 
Added: ucd/net-Memory utilization 
Add: Host MIB-Number of processes 
Add: Host MIB-Logged in user 

9.2 in the "Data query [SNMP-get disk IO]" area check the name of the disk you need to monitor:
such as SDA,SDB,HDA, etc.
Note that disk IO has two indicators to monitor, one is "disk Io Bytes/sec" and the other is "disk IO Transmit/sec", but only one can be added at a time, if you want to monitor two metrics, you need to add two times

9.3 In the "Data query [SNMP-get processor information]" area check your logical processor, if you have only one logical processor, then this will not be selectable

9.4 In the "Data query [SNMP-Get mounted partition]" area check the name of the disk you need to monitor:
such as "Real Memory", "Swap Space", "/" and so on, depending on your needs hook-and-choose

9.5 Check your network device, such as "eth0", in the "Data query [SNMP-Interface statistics]" area
If the host is a 64-bit host, select incoming/outgoing bit (64 bit)
If the host is a 32-bit host, select incoming/outgoing bits to

10 Click "Add" to complete the setup again.

11 View host status, click on the "Monitor" button above

Cacti Monitoring Linux Hosts

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.