Successfully reported this slideshow.
Your SlideShare is downloading. ×

Nagios Conference 2012 - Yancy Ribbens - Windows Advanced Monitoring with WMI and Scripting

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad

Check these out next

1 of 12 Ad

Nagios Conference 2012 - Yancy Ribbens - Windows Advanced Monitoring with WMI and Scripting

Download to read offline

Yancy Ribbens' presentation on using Nagios with WMI
The presentation was given during the Nagios World Conference North America held Sept 25-28th, 2012 in Saint Paul, MN. For more information on the conference (including photos and videos), visit: http://go.nagios.com/nwcna

Yancy Ribbens' presentation on using Nagios with WMI
The presentation was given during the Nagios World Conference North America held Sept 25-28th, 2012 in Saint Paul, MN. For more information on the conference (including photos and videos), visit: http://go.nagios.com/nwcna

Advertisement
Advertisement

More Related Content

Slideshows for you (20)

Similar to Nagios Conference 2012 - Yancy Ribbens - Windows Advanced Monitoring with WMI and Scripting (20)

Advertisement

More from Nagios (20)

Recently uploaded (20)

Advertisement

Nagios Conference 2012 - Yancy Ribbens - Windows Advanced Monitoring with WMI and Scripting

  1. 1. Advanced Windows Monitoring WMI, Powershell and VBscript Yancy Ribbens yribbens@nagios.org
  2. 2. Overview Tips and techniques for writing plugins Return Codes VBScript Powershell Deploying and running custom scripts NSClient++ NRDS_Win WMI system Configuring WMI Example queries 2012 2
  3. 3. Return Codes http://nagiosplug.sourceforge.net/developer-guidelines.html 2012 3
  4. 4. System Exit Codes Powershell $lastexitcode Command Shell (DOS) %errorlevel% 2012 4
  5. 5. Dissection of VB Script CheckDC VBScript for monitoring Domain Controller Controlling Exit Code wscript.quit( ExitCode ) if instr(msg,"CRITICAL") then msg1 = "CRITICAL - " wscript.echo msg1 & msg wscript.quit(intCritical) else msg1 = "OK - " wscript.echo msg1 & msg wscript.quit(intOK) end if 2012 5
  6. 6. Running checkDC Success example :) Fail example :( 2012 6
  7. 7. Dissection of Powershell check_windows_app_installs.ps1 Write-Host "Program Files Counted: " -nonewline $Total = $BaseLine.Length - 5 Write-Host $Total Write-Host "n" WriteList $Current ($Current.length - 2) exit 0 2012 7
  8. 8. Details table Write-Host "Program Files Counted: " -nonewline $Total = $BaseLine.Length - 5 Write-Host $Total Long output split on “newline” character Write-Host "n" Appears in details WriteList $Current ($Current.length - 2) exit 0 2012 8
  9. 9. Running plugins NSClient++ Install clip NRDS_Win Install Clip 2012 9
  10. 10. 2012 10
  11. 11. [Section Break Title]
  12. 12. 2012 12

×