NAME

hddtemp_smartctl - Plugin to monitor harddrive temperatures through SMART

CONFIGURATION

This plugin needs to run as root or some other user that has access to the harddrive devices.

The following environment variables are used

 smartctl  - path to smartctl executable
 drives    - List drives to monitor. E.g. "env.drives hda hdc".
 type_$dev - device type for one drive, e.g. "env.type_sda 3ware,0"
             or more typically "env.type_sda ata" if sda is a SATA disk.
 args_$dev - additional arguments to smartctl for one drive,
             e.g. "env.args_hda -v 194,10xCelsius".  Use this to make
             the plugin use the --all or -a option if your disk will
             not return its temperature when only the -A option is
             used.
 dev_$dev  - monitoring device for one drive, e.g. twe0

If the "smartctl" environment variable is not set the plugin will search your $PATH, /usr/bin, /usr/sbin, /usr/local/bin and /usr/local/sbin for a file called "smartctl", and use that.

If the "drives" environment variable is not set, the plugin will attempt to search for drives to probe.

MAGIC MARKERS

 #%# family=auto
 #%# capabilities=autoconf

AUTHOR

Copyright (c) 2005, Lutz Peter Christoph All rights reserved.

2016-08-27, Gabriele Pohl (contact@dipohl.de) Fix for github issue #690

LICENSE

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  * Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.

  * Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in
    the documentation and/or other materials provided with the
    distribution.

  * The name and aliases of Lutz Peter Christoph ("Lupe Christoph",
    "Lutz Christoph") may not be used to endorse or promote products
    derived from this software without specific prior written
    permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

NOTES

Note for users of RAID controllers (smartmontools currently only supports 3ware): you can specify the drives attached to your RAID controller(s) as raiddev_num (e.g. sda_0). Then you must specify the type like this: type_sda_0 3ware,0.

Recent versions of the kernel driver use a separate major device number for monitoring purposes, like /dev/twe<n> or /dev/twa<n>. This can be put in the e.g. dev_sda environment variable, to allow the user to keep sda as the name of the disk.

To avoid spinning up sleeping disks smartctl will use the --nocheck parameter. If this parameter isn't supported by your version of smartctl then hdparm will be used. Note that hdparm isn't available on all platforms.