LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-15-2012, 09:52 AM   #1
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 165

Rep: Reputation: 3
Monitoring Disks with SNMP


Hello All,

I am trying to monitor disk usage on a Linux server with 3 partitions (sda1, sda2, sda3) but the OIDs I found only gives information for /home, which I believe is sda1...
So after Googling a bit I came across this site here (look for the heading labeled "Disk Statistics") --> http://www.debianadmin.com/linux-snm...tatistics.html

It seems like what I found should be the correct thing to do... It says to edit "/etc/snmp/snmpd.conf" and add the line "includeAllDisks 10%".
So I added that line to the conf file and ran the command "/etc/init.d/snmpd restart". After I ran that I tried running the OIDs they give that should now contain all the partitions on the disk. But they still return the same data as before I entered that line into the file.


Here is a portion of that conf file. It is the last line shown here. And the line just before it was what was there, but I commented it out and added the next:
Code:
###########################################################################
# SECTION: Monitor Various Aspects of the Running Host
#
#   The following check up on various aspects of a host.

# proc: Check for processes that should be running.
#     proc NAME [MAX=0] [MIN=0]
#
#     NAME:  the name of the process to check for.  It must match
#            exactly (ie, http will not find httpd processes).
#     MAX:   the maximum number allowed to be running.  Defaults to 0.
#     MIN:   the minimum number to be running.  Defaults to 0.
#
#   The results are reported in the prTable section of the UCD-SNMP-MIB tree
#   Special Case:  When the min and max numbers are both 0, it assumes
#   you want a max of infinity and a min of 1.


# disk: Check for disk space usage of a partition.
#   The agent can check the amount of available disk space, and make
#   sure it is above a set limit.
#
#    disk PATH [MIN=100000]
#
#    PATH:  mount path to the disk in question.
#    MIN:   Disks with space below this value will have the Mib's errorFlag set.
#           Can be a raw byte value or a percentage followed by the %
#           symbol.  Default value = 100000.
#
#   The results are reported in the dskTable section of the UCD-SNMP-MIB tree

#disk  /home

includeAllDisks 10%

I was wondering if anyone has tried to do this or if I am NOT doing it correctly?
Any suggestions would be much appreciated.


Thanks in Advance,
Matt
 
Old 02-15-2012, 10:26 AM   #2
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 165

Original Poster
Rep: Reputation: 3
Hello All,

It seems that the rest of the "mount" points ARE showing...
I just ran a MIB Walk application that gets every OID on the machine and puts it in an excel file...

Previously I could only see these OIDs for disk usage:
Code:
1.3.6.1.4.1.2021.9.1.2.1	dskPath.1	/home
1.3.6.1.4.1.2021.9.1.3.1	dskDevice.1	/dev/mapper/SysVG-homeLV
1.3.6.1.4.1.2021.9.1.4.1	dskMinimum.1	100000
1.3.6.1.4.1.2021.9.1.5.1	dskMinPercent.1	-1
1.3.6.1.4.1.2021.9.1.6.1	dskTotal.1	3096336
1.3.6.1.4.1.2021.9.1.7.1	dskAvail.1	2021004
1.3.6.1.4.1.2021.9.1.8.1	dskUsed.1	918048
1.3.6.1.4.1.2021.9.1.9.1	dskPercent.1	31
But now for each one of those OIDs up there, there are 14 total for each... (i.e. dskTotal.1, dskTotal.2, dskTotal.3... all the way to to dskTotal.14).
So I guess it is working correctly. But not quite what I wanted to see.

I would rather deal in terms of say monitoring "sda1", "sda2", and "sda3" (total, used, free, etc...) instead of using the mount points.
If there is a better command I could use or something other then SNMP to get partition usage information, I have no problem writing a script to get/process that data.

I tried using the "df" command but that too uses mount points. For example the output of fdisk is pretty close to what I want to see except that it only shows the total size of each partition and not the usage of that partition.

If anyone has any ideas at all, please feel free to throw it out there...

Thanks in Advance,
Matt
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SNMP monitoring hermy7 Linux - Networking 5 12-28-2011 04:40 AM
SNMP monitoring n0000b Linux - Server 1 03-08-2010 07:41 PM
SNMP master & SNMP client Script for system monitoring ratul_11 Programming 1 12-24-2007 05:32 AM
snmp monitoring scot.russell Linux - Networking 1 03-17-2006 07:20 AM
SNMP Monitoring markma Linux - General 1 01-02-2001 11:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration