Solved

Redhat 7.2 and ucd-snmp configuration problem

Posted on 2006-06-19
5
601 Views
Last Modified: 2013-12-16
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 192.168.0.0/24 replace with your network IPs) following lines: com2sec local localhost public
com2sec mynetwork 192.168.0.0/24 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

ucd-snmp-4.2.1-7
ucd-snmp-utils-4.2.1-7

Thanks for your help
0
Comment
Question by:gg234
  • 2
5 Comments
 
LVL 22

Expert Comment

by:pjedmond
ID: 16936159
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.

HTH:)
0
 
LVL 10

Author Comment

by:gg234
ID: 16942246
Hi,

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
0
 
LVL 22

Accepted Solution

by:
pjedmond earned 500 total points
ID: 16943610
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 192.168.1.100 .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:

-----------8X------------------------
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.1 = INTEGER: 1
HOST-RESOURCES-MIB::hrStorageIndex.2 = INTEGER: 2
HOST-RESOURCES-MIB::hrStorageIndex.3 = INTEGER: 3
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.
2
HOST-RESOURCES-MIB::hrStorageType.102 = OID: HOST-RESOURCES-MIB::hrStorageTypes.
3
HOST-RESOURCES-MIB::hrStorageType.103 = OID: HOST-RESOURCES-MIB::hrStorageTypes.
1
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.3 = INTEGER: 0
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
HOST-RESOURCES-MIB::hrStorageUsed.3 = INTEGER: 0
-----------8X------------------------

> snmpget -v 1 -c public 192.168.1.100 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 192.168.1.100 .1.3.6.1.4.1.2021.9 | 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 192.168.1.100 UCD-SNMP-MIB::dskErrorFlag.1

will give appropriate output, changing from:

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

to

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.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now