Home » Categories » General Topics » Check Library

Health Checks

Health Checks

Health checks allow you to query different aspects of your system to be alerted of potential issues. A good example is checking the SMART attributes of a hard drive.

 

Disk Health

Disk health checks can be queried by checking the SMART status.

 

Nagios Plugins

The check_ide_smart plugin is part of Nagios Plugins.

Command:

/usr/local/nagios/libexec/check_ide_smart -d /dev/sda

Output:

OK - Operational (15/15 tests passed)

NCPA

NPCA does not includes a SMART disk module.

NSClient++ via check_nt

NSClient++ does not includes a SMART disk module.

NSClient++ via check_nrpe

NSClient++ does not includes a SMART disk module.

WMI

Check WMI Plus includes a checksmart module.

Command:

./check_wmi_plus.pl -H 10.25.11.2 -u wmiagent -p Str0ngP@ssw0rd -m checksmart

Output:

Overall Status - OK -  Found 1 Disks(s), 1 OK and 0 failing |'WD-WXXXXXXXXXXX_Reallocated_Sector_Count'=0; 'WD-WXXXXXXXXXXX_Power_On_Hours'=12401;
'WD-WXXXXXXXXXXX_Power_Cycle_Count'=441; 'WD-WXXXXXXXXXXX_Temperature'=36; 'WD-WXXXXXXXXXXX_Current_Pending_Sector'=0; 'WD-WXXXXXXXXXXX_Offline_Uncorrectable'=0;
OK - Dev#0, WDC WD50000000-0000001, Serial#WD-WXXXXXXXXXXX, PredictFailure=False, Temperature=36

SNMP

Using SNMP to check disk health is possible but requires some additional work that is not possible to cover in this KB article.

 

 

Sensors

Sensor data is usually attributed to temperature and fan data.

 

Nagios Plugins

The check_sensors plugin is part of Nagios Plugins. It uses the program sensors/lm_sensors to interrogate the system hardware like CPU and Motherboard, this can report temperature and fan alerts.

Command:
./check_sensors

Output:

SENSOR CRITICAL - Sensor alarm detected!

NCPA

NPCA does not include any sensor capabilities.

NSClient++ via check_nt

NSClient++ does not include any sensor capabilities.

NSClient++ via check_nrpe

NSClient++ does not include any sensor capabilities.

WMI

Check WMI Plus does not include any sensor capabilities.

SNMP

The check_snmp plugin allows you to target any type of sensor using SNMP. Here is an example of checking the internal temperature sensor on an APC UPS:

Command:

./check_snmp -H 10.25.19.2 -C box293 -P 2c -o PowerNet-MIB::upsHighPrecBatteryTemperature.0 -c 450

Output:

SNMP OK - 391 | PowerNet-MIB::upsHighPrecBatteryTemperature.0=391;;450;

 

The value the UPS returns is in tenths of degrees Celsius. If you wanted to make this easier to read you would need to create a wrapper script to manipulate the results.

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/

0 (0)
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Memory Checks
Viewed 265 times since Mon, Nov 13, 2017
Log Checks
Viewed 103 times since Tue, Nov 28, 2017
File And Folder Checks
Viewed 198 times since Sun, Nov 26, 2017
Disk Performance Checks
Viewed 139 times since Sun, Nov 26, 2017
Performance Counter Checks
Viewed 261 times since Wed, Nov 15, 2017
Service Checks
Viewed 171 times since Tue, Nov 14, 2017
Disk Space Checks
Viewed 387 times since Thu, Nov 9, 2017
Process Checks
Viewed 201 times since Thu, Nov 23, 2017
Operating System Checks
Viewed 262 times since Tue, Nov 14, 2017
CPU Usage Checks
Viewed 295 times since Sun, Nov 12, 2017