What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Can't use SNMP Linux disk free

Votes:

0

We have SNMP installed and configured on Ubuntu systems, we can use the Paessler SNMP lib to monitor via SNMP. However, this lib only monitors the total and used disk space, and we want to know the total free space straight away. So we choose the SNMP Linux disk free sensor, but it always shows "not such a name" or "not such a instance".

disk linux snmp

Created on Oct 9, 2011 2:05:30 AM



Best Answer

Accepted Answer

Votes:

0

Please see the Ubuntu-Documentation on this: http://manpages.ubuntu.com/manpages/hardy/man5/snmp.conf.5.html

Created on Oct 12, 2011 12:57:44 PM by  Torsten Lindner [Paessler Support]



17 Replies

Votes:

0

Hello,

this might be due to a "missing line" in the snmp.conf in the target host. On our testboxes it includes:

….
###############################################################################
# disk checks
#

# The agent can check the amount of available disk space, and make
# sure it is above a set limit.

# disk PATH [MIN=DEFDISKMINIMUMSPACE]
#
# PATH:  mount path to the disk in question.
# MIN:   Disks with space below this value will have the Mib's errorFlag set.
#        Default value = DEFDISKMINIMUMSPACE.

# Check the / partition and make sure it contains at least 10 megs.

#disk / 10000
#disk / 100000
includeAllDisks 10%
….

best regards.

Created on Oct 10, 2011 1:07:27 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Hi there, could you tell what is the directory of this snmp.conf? I have only snmpd.conf in the target host.

Created on Oct 11, 2011 10:55:19 PM



Accepted Answer

Votes:

0

Please see the Ubuntu-Documentation on this: http://manpages.ubuntu.com/manpages/hardy/man5/snmp.conf.5.html

Created on Oct 12, 2011 12:57:44 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Hi, I have put that that missing line the snmpd.conf, and it's working now. Thanks!

Created on Oct 13, 2011 3:57:40 AM



Votes:

0

Hi there, here is a new question.

Once the SNMP Disk Free sensor is deployed, to set up a threshold trigger, in the Channel option, what's the unit of the option "Total"? let's say, I choose Above condition and put 10 in the Value box, does it mean above 10Byte or 10%?

The gold I want to make is to monitor the percentage of total free disk space.

Thanks!

Created on Oct 13, 2011 9:08:32 PM



Votes:

0

In the SSH Disk Free sensors you can either set limits in the Settings tab (valid for all channels) or in the Channels tab (valid for a single channel only). Limits from both tabs will be applied at the same time—that's a specialty of all disk free sensors.

  • In the Settings tab, you can activate the Percentage Limit Check or the Byte Limit Check.
  • In the Channels tab, the channels named Free Space return percentage values, the ones named Free Bytes return byte values.

Created on Oct 14, 2011 8:42:06 AM by  Daniel Zobel [Product Manager]

Last change on Oct 14, 2011 8:43:07 AM by  Daniel Zobel [Product Manager]



Votes:

0

Thanks Daniel. But I think I didn't clearly describe the question.

I was asking about using SNMP Linux Disk Free sensor, but I suppose the setting is same as SSH Disk Free. Anyway, in the sensor, besides Settings and Channels tabs, there is a Notifications tab. In the Notifications tab, we are able to setup a Threshold Trigger for this sensor. Inside the Threshold Trigger section, there are options in the dropbox for Channel, and always one option called Total, my question is that what values this channel returns.

As you said, Free Space return percentage values and Free Bytes return byte values. What about Total? Does it return percentage values or byte values? Thanks.

Created on Oct 17, 2011 10:31:58 PM



Votes:

0

The Total channel returns byte values. You can review these data in the sensor's Live Data tab, for example. When setting Threshold Triggers, please use *bytes* as value.

Created on Oct 18, 2011 11:30:30 AM by  Daniel Zobel [Product Manager]



Votes:

0

Thanks for the previous replies.

Now I have assigned SNMP Disk Free sensors to all our target machines. Here is a problem at the same place as previous. Inside the Notification tag, when setting up Threshold Trigger for a sensor, there are options in the dropbox for Channel. For some target machines, we can see different Channels, but a few of target machines, only got two options, "No Channels Received (Byte)" and "Total". In the Channels tag, we can see different channels there. Why is this? We want to monitor each portion of the disk, but it gets no channel here. Thanks.

Created on Oct 25, 2011 1:59:29 AM



Votes:

0

Adding the "includeAllDisks" entry in the snmp.conf file seems to pick up all mounted disks, which includes any network resources you may have mounted - this obviously skews the data somewhat, I have a 80GB server reporting it has 280GB as it has a 200GB network share mounted.

Anyone have any suggestions to get around this?

Created on Jun 28, 2012 4:17:48 PM



Votes:

0

I'm using a CentOS system. I've had no problems with locally mounted disks (the system was configured to use LVM). This server, however, has two iSCSI mounts that I can't get PRTG to pick up. I have the includeAllDisks directive in snmpd.conf:

includeAllDisks 5%

and I have both mount points specifically called out with "disk" lines:

disk /mnt/ahsay 10000000 disk /mnt/ahsayrps 10000000

Obviously I'm missing something... All the includeAllDisks line did was make my /boot partition show up, which is not something that I wanted.

Created on Oct 10, 2012 6:20:01 PM



Votes:

0

Hi,
@slnokak: Do you have checked whether SNMP picks up the disks at all? Can you perform a snmpwalk against your machine using the OID .1.3.6.1.4.1.2021.9 (where the dskTable is stored). The command will look something like the follwing:

sudo snmpwalk -v 2c -c public YOUR IP .1.3.6.1.4.1.2021.9 | grep /mnt/ahsay

or

sudo snmpwalk -v 2c -c public YOUR IP .1.3.6.1.4.1.2021.9 | grep /mnt//mnt/ahsayrps

Do you get an proper results?
Best regards

Created on Oct 10, 2012 6:47:11 PM by  Konstantin Wolff [Paessler Support]



Votes:

0

I removed the includeAllDisks directive since that didn't help and when manually walking the disk tree for paths, specifically, I see all 3 mount points (1 local and 2 iscsi):

# snmpwalk -v 1 -c public 127.0.0.1 .1.3.6.1.4.1.2021.9.1.2 UCD-SNMP-MIB::dskPath.1 = STRING: / UCD-SNMP-MIB::dskPath.2 = STRING: /mnt/ahsay UCD-SNMP-MIB::dskPath.3 = STRING: /mnt/ahsayrps

In the meantime I used the custom SNMP sensor to grab each mount point's free space:

# snmpwalk -v 1 -c public 127.0.0.1 .1.3.6.1.4.1.2021.9.1.7.2 UCD-SNMP-MIB::dskAvail.2 = INTEGER: 2147483647

So that technically gets me what I want (assuming I can set a threshold trigger to alert me when the number gets too low), but it's not the best. I'd prefer to just use the SNMP Disk Free sensor and have it find all 3 mount points instead of just the local one.

Created on Oct 10, 2012 6:52:08 PM



Votes:

0

Hi,
we will have a further look at this, I already forwarded this to our test team. In the meantime you might, as mentioned, use a Custom SNMP Sensor.
Threshold Triggers can be set on tab "Notifications" of the sensor but you also might use limits, which can be defined on tab "Channels" of the sensor.
Best regards

Created on Oct 10, 2012 7:04:57 PM by  Konstantin Wolff [Paessler Support]



Votes:

0

Thanks, limits was what I needed earlier. I didn't see it on that tab. Let me know if you guys get the regular Disk Free sensor to work with network mounts! Thanks again!

Created on Oct 10, 2012 7:06:39 PM



Votes:

0

More information:

I just checked out the server in more detail (I wasn't the one who set it up) and realized that the mount points that the Disk Free sensor isn't picking up are NFS mounts, not iSCSI mounts. We have another server with an iSCSI mount and Disk Free is picking it up fine. But NFS mounts aren't showing. Some might argue that they shouldn't... that the device serving the NFS mount is what should be monitored, but as it's not an enterprise class storage device monitoring isn't possible. The only way to monitor the space left is via the NFS mount on the linux server.

Created on Oct 11, 2012 12:30:46 PM



Votes:

0

Hi,

currently nonlocal filesystems (not beginning with '/') are ignored by PRTGs diskfree-sensors. iSCSI-LUNs and -partitions are seen as local devices because they are block-oriented.

You can use the ssh-script sensor to build an own dedicated sensor for this mount. Therefore you have to create a script on the target machine in the path /var/prtg/scripts that contains

#! /bin/bash df -P $1 | awk '{if (NR == 2) {printf("0:%s:OK", $3 * 100 / $2 ) }}' and make it executable with chmod +x <your scriptname>

After that you can add a ssh-script-sensor to that device in PRTG and select the formerly created script. Apply the mountpoint (e.g. '/NFS-Mountpoint') as parameter for this sensor and select 'Float' as value type. After creation you can toggle the channel-setting on the 'Value'-Channel for the DecimalPlaces to 'Custom' to display floatingpoint values in the result.

Please keep in mind that this is only a simple example that has no errohandling implemented! Thresholds for reaching limits can be configured channelbased on the sensor.

Kind regards

Created on Oct 19, 2012 3:35:37 PM by  Dieter Loskarn [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.