Centos7 MIB file /agent implementation to monitor cpu,memory

General support questions
Post Reply
vallikkv
Posts: 4
Joined: 2014/04/02 12:48:26

Centos7 MIB file /agent implementation to monitor cpu,memory

Post by vallikkv » 2014/10/17 13:34:30

Hi,

I tried to monitor the Centos 7 CPU,Memory and Disk statics using Opmanager(via SNMP) tool.

OID: .1.3.6.1.4.1.2021.10.1.3.2

I tried to retrieve data from Opmanager MIB Browser and SNMP walk command and got the following errors
Opmanager:
Request failed or timed out. Response PDU received from 10.20.20.173 Error Indication in response: There is no such variable name in this mib. Errindex: 1

Snmpwalk: "End of MIB"

How to monitor the centos server metrics using SNMP? :? :? :?

User avatar
TrevorH
Forum Moderator
Posts: 26582
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos7 MIB file /agent implementation to monitor cpu,me

Post by TrevorH » 2014/10/17 16:34:43

Did you open udp port 161 in the iptables rules?
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

aks
Posts: 2829
Joined: 2014/09/20 11:22:14

Re: Centos7 MIB file /agent implementation to monitor cpu,me

Post by aks » 2014/10/17 16:41:01

So the MIB you're interested in is HOST-MIB. In CentOS that MIB is installed along with the net-snmp packages.

Do you install and configure SNMP? Is the daemon running? WHat version of SNMP are you running? Are SNMP packet allowed across the whole network path?

vallikkv
Posts: 4
Joined: 2014/04/02 12:48:26

Re: Centos7 MIB file /agent implementation to monitor cpu,me

Post by vallikkv » 2014/10/21 09:12:31

Hi All,

Thanks for your reply :) :)

The problem is with the invalid snmpd.conf configuration. After the proper configuration, i can able to retrive data using SNMP OID's to monitor the Server.

Below are some of the OID's to monitor Server metrics

Here are some useful OID's on Linux:

Network Interface Statistics
List NIC names: .1.3.6.1.2.1.2.2.1.2
Get Bytes IN: .1.3.6.1.2.1.2.2.1.10
Get Bytes IN for NIC 4: .1.3.6.1.2.1.2.2.1.10.4
Get Bytes OUT: .1.3.6.1.2.1.2.2.1.16
Get Bytes OUT for NIC 4: .1.3.6.1.2.1.2.2.1.16.4

CPU Statistics

Load
1 minute Load: .1.3.6.1.4.1.2021.10.1.3.1
5 minute Load: .1.3.6.1.4.1.2021.10.1.3.2
15 minute Load: .1.3.6.1.4.1.2021.10.1.3.3

CPU times
percentage of user CPU time: .1.3.6.1.4.1.2021.11.9.0
raw user cpu time: .1.3.6.1.4.1.2021.11.50.0
percentages of system CPU time: .1.3.6.1.4.1.2021.11.10.0
raw system cpu time: .1.3.6.1.4.1.2021.11.52.0
percentages of idle CPU time: .1.3.6.1.4.1.2021.11.11.0
raw idle cpu time: .1.3.6.1.4.1.2021.11.53.0
raw nice cpu time: .1.3.6.1.4.1.2021.11.51.0

Memory Statistics

Total Swap Size: .1.3.6.1.4.1.2021.4.3.0
Available Swap Space: .1.3.6.1.4.1.2021.4.4.0
Total RAM in machine: .1.3.6.1.4.1.2021.4.5.0
Total RAM used: .1.3.6.1.4.1.2021.4.6.0
Total RAM Free: .1.3.6.1.4.1.2021.4.11.0
Total RAM Shared: .1.3.6.1.4.1.2021.4.13.0
Total RAM Buffered: .1.3.6.1.4.1.2021.4.14.0
Total Cached Memory: .1.3.6.1.4.1.2021.4.15.0

Disk Statistics

Add the following line to snmpd.conf and restart:

includeAllDisks 10% for all partitions and disks

Disk OID's

Path where the disk is mounted: .1.3.6.1.4.1.2021.9.1.2.1
Path of the device for the partition: .1.3.6.1.4.1.2021.9.1.3.1
Total size of the disk/partion (kBytes): .1.3.6.1.4.1.2021.9.1.6.1
Available space on the disk: .1.3.6.1.4.1.2021.9.1.7.1
Used space on the disk: .1.3.6.1.4.1.2021.9.1.8.1
Percentage of space used on disk: .1.3.6.1.4.1.2021.9.1.9.1
Percentage of inodes used on disk: .1.3.6.1.4.1.2021.9.1.10.1

System Uptime: .1.3.6.1.2.1.1.3.0

Post Reply

Return to “CentOS 7 - General Support”