[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 664
  • Last Modified:

Redhat 7.2 and ucd-snmp configuration problem

Hi Guys,

I have a redhat 7.2 old server i am trying to implement the snmp server configuration.In my snmpd.conf file i have changed

# vi /etc/snmp/snmpd.conf
Change/Modify line(s) as follows:

Find following Line:

com2sec notConfigUser default public
Replace with (make sure you replace replace with your network IPs) following lines: com2sec local localhost public
com2sec mynetwork public
Scroll down bit and change:

Find Lines:

group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
Replace with:

group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
Again scroll down bit and locate following line:

Find line:

view systemview included system
Replace with:

view all included .1 80
Again scroll down bit and change:

Find line:

access notConfigGroup "" any noauth exact systemview none none
Replace with:

access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none

With this configuration snmp is working fine.Now i need to add the disk partitions to monitor remotely as some one suggested i need to add the whatever mount points i need to monitor

disk /
disk /home

When i add this to my snmpd.conf file and save this at the time of restarting snmpd daemon it is saying it is starting but when i look at the process it is not showing.

Can some one help me i am declaring wrong or how to get disks to be monitored

I am using the follwing packages


Thanks for your help
  • 2
1 Solution
Thats an old system! - The nearest that I can find on my exchangeable drives is a RH7.3, with a  newer version of snmp.

In it I have the command:

includeAllDisks 10%

You could replace your 'disk' directive with this

However, I believe that you can use the disk command as well, and the directives will overide the includeAllDisks statement. Key point for you Disk statement is that the path *MUST* be the mount point of the drive as far as I can remember in the earlier versions of snmp? (I wait for correction!) The correct mount points should be viewable in you /etc/fstab file.

Hopefully, you've got man installed, in which case:

man snmp.conf

should give you the correct details for your version of snmp.

gg234Author Commented:

I have tried all those options but still my snmpd is not showing any process when i add

disk /  10000
disk /home 10000

includeAllDisks 10%

i am really looking for help now
My understanding is as follows:

It shouldn't show any additional processed for these as they are checks that will notify if disk space on partition / is less than 10000. If it drops below that then here will be  the appropriate error flag set, and an smtdtrapd  notification.

Output from my system:
> snmpwalk -v 1 -c public .1

Forces the snmp client to repeatedly get all the available snmp information on that node branch (in this case the 'root' branch or 'trunk'. This includes:

HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (49536457) 5 days, 17:36:04.57
HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2006-6-20,16:6:22.0,+1:0
HOST-RESOURCES-MIB::hrSystemInitialLoadDevice.0 = INTEGER: 1536
HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0 = STRING: "ro root=LABEL=/
HOST-RESOURCES-MIB::hrSystemNumUsers.0 = Gauge32: 5
HOST-RESOURCES-MIB::hrSystemProcesses.0 = Gauge32: 101
HOST-RESOURCES-MIB::hrSystemMaxProcesses.0 = INTEGER: 0
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 513504 KBytes
HOST-RESOURCES-MIB::hrStorageIndex.101 = INTEGER: 101
HOST-RESOURCES-MIB::hrStorageIndex.102 = INTEGER: 102
HOST-RESOURCES-MIB::hrStorageIndex.103 = INTEGER: 103
HOST-RESOURCES-MIB::hrStorageType.1 = OID: HOST-RESOURCES-MIB::hrStorageTypes.4
HOST-RESOURCES-MIB::hrStorageType.2 = OID: HOST-RESOURCES-MIB::hrStorageTypes.4
HOST-RESOURCES-MIB::hrStorageType.3 = OID: HOST-RESOURCES-MIB::hrStorageTypes.4
HOST-RESOURCES-MIB::hrStorageType.101 = OID: HOST-RESOURCES-MIB::hrStorageTypes.
HOST-RESOURCES-MIB::hrStorageType.102 = OID: HOST-RESOURCES-MIB::hrStorageTypes.
HOST-RESOURCES-MIB::hrStorageType.103 = OID: HOST-RESOURCES-MIB::hrStorageTypes.
HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: /
HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: /boot
HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: /proc/sys/fs/binfmt_misc
HOST-RESOURCES-MIB::hrStorageDescr.101 = STRING: Real Memory
HOST-RESOURCES-MIB::hrStorageDescr.102 = STRING: Swap Space
HOST-RESOURCES-MIB::hrStorageDescr.103 = STRING: Memory Buffers
HOST-RESOURCES-MIB::hrStorageAllocationUnits.1 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.2 = INTEGER: 1024 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.3 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.101 = INTEGER: 1024 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.102 = INTEGER: 1024 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.103 = INTEGER: 256 Bytes
HOST-RESOURCES-MIB::hrStorageSize.1 = INTEGER: 48721424
HOST-RESOURCES-MIB::hrStorageSize.2 = INTEGER: 101089
HOST-RESOURCES-MIB::hrStorageSize.101 = INTEGER: 513504
HOST-RESOURCES-MIB::hrStorageSize.102 = INTEGER: 1044216
HOST-RESOURCES-MIB::hrStorageUsed.1 = INTEGER: 41189015
HOST-RESOURCES-MIB::hrStorageUsed.2 = INTEGER: 9217

> snmpget -v 1 -c public HOST-RESOURCES-MIB::hrStorageDescr.1
HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: /

Unfortunately, this is on an snmp 5.1, so it might not be *exactly* the same for you.

Therefore can you try snmpwalk from .1 and see if you get any visibility of drives at all.

Also another useful snmp walk is:

> snmpwalk -v 1 -c public . | more

UCD-SNMP-MIB::dskIndex.1 = INTEGER: 1
UCD-SNMP-MIB::dskPath.1 = STRING: /
UCD-SNMP-MIB::dskDevice.1 = STRING: /dev/hda2
UCD-SNMP-MIB::dskMinimum.1 = INTEGER: 10000
UCD-SNMP-MIB::dskMinPercent.1 = INTEGER: -1
UCD-SNMP-MIB::dskTotal.1 = INTEGER: 194885696
UCD-SNMP-MIB::dskAvail.1 = INTEGER: 20229900
UCD-SNMP-MIB::dskUsed.1 = INTEGER: 164756144
UCD-SNMP-MIB::dskPercent.1 = INTEGER: 89
UCD-SNMP-MIB::dskPercentNode.1 = INTEGER: 2
UCD-SNMP-MIB::dskErrorFlag.1 = INTEGER: 0
UCD-SNMP-MIB::dskErrorMsg.1 = STRING:

which is probably more likely to be 100% compatable with your setup, and should indicate that:

snmpget -v 1 -c public UCD-SNMP-MIB::dskErrorFlag.1

will give appropriate output, changing from:

UCD-SNMP-MIB::dskErrorFlag.1 = INTEGER: 0


UCD-SNMP-MIB::dskErrorFlag.1 = INTEGER: 1

When I take the disk usage ofver the specified limit. (Incidentally, I changed the % to 90% remaining, rather than fill up the hard drive in this example.

So...after all those nice examples that you can test with, you need to try out snmpwalk, and now that you know what you are looking for, (with a few test examples), hopefully you can access the info you require.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now