[Nagiosplug-help] (no subject)

Bill Lopez bill_k_lopez at yahoo.com
Fri May 14 23:51:23 CEST 2010


Charles -

The reason I am checking using nrpe and a vb script is because the methods you recommended are for checking locally attached drives, I am checking MOUNTED disks - and to explain in greater detail - they are mounted CIFS Filesystems from an EMC Celerra.

I have been using Nagios since it was NetSaint, just never bothered to monitor using anything outside the realm of "out of the box" checks.  As with other custom plugins, I want to know how Nagios Process interprets or identifies what is a warning or a critical value?  

I've tried passing logic into the vb script to produce an OK WARNING and CRITICAL field in front of the output, 
  

>I'm curious why you want to use a vbscript instead of following the
>standard way of doing it as outlined here:
>
>http://nagios.sourceforge.net/docs/3_0/monitoring-windows.html
>
>-- 
>Charles H. Baker, Unix System Administration
>Windstream Communications
>Charles.Baker at windstream.com | 864.331.7896 | 864.990.1297
>Be the change you wish to see in the world. Gandhi



>On Fri, 2010-05-14 at 07:43 -0700, Bill Lopez wrote:
> I have a vb script that checks mounted disk size and pukes out the numbers (all included below)
> 
> 
> how does nagios know to show warning and critical?
> 
> how do I get nagios to understand what values should be used for WARNING and CRITICAL ?
> 
> here is the vb script
> 
> ---------------
> 
> On Error Resume Next
> strComputer = "."
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery _
>         ("Select * from Win32_MappedLogicalDisk Where Name = 'F:' ")
> 
> For Each objItem in colItems
> 
>     disk_total=objItem.Size/(1024*1024*1024)
>    
>     disk_used=(objItem.Size-objItem.FreeSpace)/(1024*1024*1024)
>     disk_used_perc=disk_used/disk_total
>     disk_free=objItem.FreeSpace/(1024*1024*1024)
>     disk_free_perc=disk_free/disk_total
> 
>    
>      
> 
> Wscript.Echo objItem.ProviderName & "- total: " & Round(disk_total, 2) & " Gb" & " - used: " & Round(disk_used, 2) & " Gb" & " (" & Round(disk_used_perc*100) & "%)" &  " - free: " & Round(disk_free, 2)  & " Gb" & " (" & Round(disk_free_perc*100) & "%)"
> 
> Next
> 
> ---------------
> 
> text output from the script is
> 
> \\servername\FS300- total: 246.19 Gb - used: 110.13 Gb (45%) - free: 136.05 Gb (55%)
> 
> nagios display shows
> DISKSPACE FS301 OK 05-13-2010 20:50:05 0d 3h 30m 42s 1/4 \essnas1FS301- total: 246.19 Gb - used: 207.88 Gb (84%) - free: 38.3 Gb (16%)
> 





      




More information about the Help mailing list