NSClient++ Help (#1) - vbs Script Values [SOLVED] (#508) - Message List
vbs Script Values [SOLVED]
when i use my vbs Script on the machine by invoking with cscript myscript.vbs
the result comes correct.
If i uses with the nsclient (0.3.7) all Values are 0
OS W2K3 Client Server Nagios 3.0 on ubuntu Here comes the script:
Option Explicit
Dim iw,ip,id
Dim Meldung
Dim strComputerName, strE2K3WMIQuery, mboxList ,mailbox
strComputerName = "SRV"
strE2K3WMIQuery = "winmgmts://" & strComputerName & "/root/MicrosoftExchangeV2"
Set mboxList = GetObject(strE2K3WMIQuery).InstancesOf("Exchange_Mailbox")
iw=0
ip=0
id=0
For each mailbox in mboxList
if (mailbox.StorageLimitInfo = 8) then
iw = iw + 1
end if
if (mailbox.StorageLimitInfo = 4) then
ip = ip + 1
end if
if (mailbox.StorageLimitInfo = 16) then
id = id + 1
end if
Next
Meldung="IssueWarning:" & iw & " XProhibitSend:" & ip & " DisabledBoxes:" & id
Wscript.StdOut.WriteLine (Meldung)
if (iw=0 and ip=0 and id=0) then
'Normal
WScript.Quit(0)
end if
if (iw > 1) then
'Warning
WScript.Quit(1)
end if
if (ip > 0 or id > 0) then
'Critical
WScript.Quit(2)
end if
Any Ideas? Bastel
bastel
02/16/10 10:24:48 (2 years ago)







