Changeset 1307e3f5 in nscp


Ignore:
Timestamp:
08/31/11 10:55:38 (21 months ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2
Children:
81e420c
Parents:
4b1e6fe
Message:

Fixed check_battery.vbs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/check_battery.vbs

    rf0607c4 r1307e3f5  
    99 
    1010' Default settings for your script. 
    11 threshold_warning = 50 
    12 threshold_critical = 20 
     11threshold_warning = "50:" 
     12threshold_critical = "20:" 
    1313strComputer = "." 
    1414 
     
    3636 
    3737For Each objInstance In colInstances 
    38   WScript.Echo "Battery " & objInstance.Status & " - Charge Remaining = " & objInstance.EstimatedChargeRemaining & "% | charge=" & objInstance.EstimatedChargeRemaining 
     38  if message <> "" then : message = message & ", " 
     39  if perf <> "" then : perf = perf & ", " 
     40  message = message & "Battery " & objInstance.Status & " - Charge Remaining = " & objInstance.EstimatedChargeRemaining & "%" 
     41  perf = perf & "charge=" & objInstance.EstimatedChargeRemaining 
    3942  return_code = np.escalate_check_threshold(return_code, objInstance.EstimatedChargeRemaining) 
    4043Next 
    41  
    4244' Nice Exit with msg and exitcode 
    43 np.nagios_exit "", return_code 
     45np.nagios_exit message & "|" & perf, return_code 
Note: See TracChangeset for help on using the changeset viewer.