• Bug#265302: nagios-statd-client: please also show disk usage of OK disk

    From Peter Palfrader@1:229/2 to All on Thu Aug 12 17:30:10 2004
    From: [email protected]

    Package: nagios-statd-client
    Version: 3.09-3
    Severity: wishlist

    I like nagios-stat to also show me the disk usage of filesystems that
    are still ok, like in:

    Free Space: /home - /dev/vgprimary/home OK 08-12-2004 17:04:50 0d 0h 1m 39s 1/3 Disk utilization: /home(46%)
    Free Space: /usr - /dev/vgprimary/usr OK 08-12-2004 17:04:50 0d 0h 1m 39s 1/3 Disk utilization: /usr(77%)

    Please apply this patch and send it upstream.

    --- /usr/share/nagios/plugins/nagios-stat.orig 2004-08-12 17:02:54.000000000 +0200
    +++ /usr/share/nagios/plugins/nagios-stat 2004-08-12 17:04:37.000000000 +0200
    @@ -63,6 +63,7 @@

    critical_disks = []
    warning_disks = []
    + ok_disks = []
    for i in disks:
    if (int(i[1]) >= self.options['critical']):
    j = i[2] + "(" + str(i[1]) + "%)"
    @@ -70,11 +71,14 @@
    elif (int(i[1]) >= self.options['warning']):
    j = i[2] + "(" + str(i[1]) + "%)"
    warning_disks.append(j)
    + else:
    + j = i[2] + "(" + str(i[1]) + "%)"
    + ok_disks.append(j)

    - if (len(critical_disks) + len(warning_disks) == 0):
    - print "Disk utilization: All disks below thresholds."
    - else:
    - print "Disk utilization: " + ",".join((critical_disks + warning_disks))
    + #if (len(critical_disks) + len(warning_disks) == 0):
    + #print "Disk utilization: All disks below thresholds." + #else:
    + print "Disk utilization: " + ",".join((critical_disks + warning_disks + ok_disks))

    if (len(critical_disks) >