0

i want to monitor hard-drive's health of my windows server, for this i have installed Smarttools(smartmontools-6.1-2.win32-setup.exe).

My question is, how can i display commands output on Nagios-Server via nrpe or somewhat else.

Some info: Nagios-Core-3.5, smartmontools-6.1-2,

Commands output on windows machine:

c:> smartctl.exe /dev/sda -l selftest

smartctl 6.1 2013-03-16 r3800 [i686-w64-mingw32-xp-sp2] (sf-6.1-2)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%     17592         -
# 2  Extended offline    Completed without error       00%     17393         -
# 3  Short offline       Completed without error       00%     17392         -

c:> smartctl.exe /dev/sda -H

smartctl 6.1 2013-03-16 r3800 [i686-w64-mingw32-xp-sp2] (sf-6.1-2)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

C:>smartctl -d ata /dev/sda -i

smartctl 6.1 2013-03-16 r3800 [i686-w64-mingw32-xp-sp2] (sf-6.1-2)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda 7200.9
Device Model:     ST3802110A
Serial Number:    5LR7M728
Firmware Version: 3.AAJ
User Capacity:    80,026,361,856 bytes [80.0 GB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA/ATAPI-7 (minor revision not indicated)
Local Time is:    Fri Jun 07 19:02:13 2013 IST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

Any help would greatly appreciated.

Pankaj
  • 1
  • 1
  • 3

1 Answers1

0

You have two issues.

  1. You need to be able to get Nagios to run a check remotely on your Windows server, and
  2. You need to be able to get the data into a Nagios-compatible format.

For the first, you can probably install an agent such as NC_Net or NSClient++. This can be queried using either check_nt or check_nrpe. I would recommend using NC_Net.

For the second, you will likely have to write your own script to run the command and output in Nagios plugin format (one line of text, and an exit status of 0/1/2/3 for OK/Warn/Crit/Unknown). This script can be remotely called via check_nrpe.

However, if your goal is simply to monitor disk space, you can do that using the standard check functions builtin to NC_Net or NSClient++

You may find pre-written scripts at monitoringexchange.org , such as this

Steve Shipway
  • 3,754
  • 3
  • 22
  • 39