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".
Can't use SNMP Linux disk free
Votes:
0
Best Answer
Votes:
0
Please see the Ubuntu-Documentation on this: http://manpages.ubuntu.com/manpages/hardy/man5/snmp.conf.5.html
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.
Votes:
0
Hi there, could you tell what is the directory of this snmp.conf? I have only snmpd.conf in the target host.
Votes:
0
Please see the Ubuntu-Documentation on this: http://manpages.ubuntu.com/manpages/hardy/man5/snmp.conf.5.html
Votes:
0
Hi, I have put that that missing line the snmpd.conf, and it's working now. Thanks!
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!
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.
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.
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.
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?
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.
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
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.
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
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!
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.
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
Add comment