Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

check_ohm_temperatures

Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Rating
0 votes
Favoured:
0
Current Version
1.1
Last Release Date
2016-03-24
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI
Owner
E-mail
License
Apache
Hits
1433
Files:
FileDescription
check_ohm_temperatures.ps1check_ohm_temperatures.ps1
A PowerShell script used by NSClient++ to check the temperatures on a host running Windows. NSClient++ can then be called by Nagios to run this script.
The script uses OpenHardwareMonitor.org to read the temperatures.
This is a PowerShell script used by NSClient++ to check the temperatures on a host running Windows. NSClient++ can then be called by Nagios to run this script.

Open Hardware Monitor (openhardwaremonitor.org) is used as a driver for the temperature sensors. Open Hardware monitor creates WMI objects of all the found sensors. This script retrieves the temperatures from those WMI objects. This means that you have to download and run OpenHardwareMonitor.exe before running this check.

All the found temperatures will be output as performance data so that they can be graphed.

Tested with different versions of Windows 7.
The script should work with all versions of Windows that can run PowerShell and on hardware where OpenHardwaremonitor can detect at least one temperature sensor.

Define the command in nsclient++: cmd /c echo scriptscustomcheck_temperatures.ps1 -warning $ARG1$ -critical $ARG2$; exit($lastexitcode) | powershell.exe -command - or you can omit or hard code the warning and critical arguments in case you do not permit sending arguments to nsclient.

EXAMPLE: .check_ohm_temperatures.ps1 -warning 80 -critical 90