Reputation: 8680
I am using ubuntu 15.x where I have configured MRTG. I have configured it to monitor traffic of a remote system that I have done successfully. Now I have to monitor CPU and memory statistics of that remote server. Should I configure remote snmp or My ubuntu system MRTG config for this purpose.?
How can I do it?
Upvotes: 0
Views: 2869
Reputation: 1500
I assume your remote server is Linux too. Both tasks have to be done:
1) configure and run snmpd daemon on remote machine. Basically this means creating/editing /etc/snmpd.conf file manually or with snmpconf utility and starting snmpd service. To test your setup it's handy to have net-snmp utils installed on a local machine (snmpget, snmpwalk, etc).
Check that remote host is responding to snmp requests issue with command:
$ snmpget -v2c -c public remoteHostNameOrIP sysUpTime.0
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (2039801384) 236 days, 2:06:53.84
get processors load values (example):
$ snmpwalk -v2c -c public remoteHostNameOrIP .1.3.6.1.2.1.25.3.3.1.2
HOST-RESOURCES-MIB::hrProcessorLoad.768 = INTEGER: 73
HOST-RESOURCES-MIB::hrProcessorLoad.769 = INTEGER: 18
HOST-RESOURCES-MIB::hrProcessorLoad.770 = INTEGER: 11
HOST-RESOURCES-MIB::hrProcessorLoad.771 = INTEGER: 14
HOST-RESOURCES-MIB::hrProcessorLoad.772 = INTEGER: 24
HOST-RESOURCES-MIB::hrProcessorLoad.773 = INTEGER: 22
HOST-RESOURCES-MIB::hrProcessorLoad.774 = INTEGER: 32
HOST-RESOURCES-MIB::hrProcessorLoad.775 = INTEGER: 23
2) add cpu/memory snmp OID targets of your choice to your local MRTG config. OIDs you are interested in are defined in UCD-SNMP-MIB.txt and HOST-RESOURCES-MIB..txt files (likely located in /usr/share/snmp/mibs).
Upvotes: 1