SMARTMON2 README $ check_smartmon2 is a Nagios-Plugin that uses smartmontools (http://smartmontools.sourceforge.net/) to check disk health status and temperature. It is based on the check_smartmon plugin (http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_smartmon/details) by fuller = Installation = Adjust the first line to your Python binary (e.g. /usr/local/bin/python or /usr/bin/python) in case you want to make this script executable. Otherwise you should run it prepending python to the script name on the command line = Usage = Use `check_smartmon2 -h` to get a list of options, along with an explanation for each one of them. You will see the following output: Usage: check_smartmon2.py [options] Options: --version show program's version number and exit -h, --help show this help message and exit -d DEVICE, --device=DEVICE device to check -v LEVEL, --verbosity=LEVEL set verbosity level to LEVEL; defaults to 0 (quiet), possible values go up to 3 -w TEMP, --warning-threshold=TEMP set temperature warning threshold to given temperature (defaults to 50) -c TEMP, --critical-threshold=TEMP set temperature critical threshold to given temperature (defaults to 55) -T ID, --temperature-attrid=ID set the temperature smart attribute id (defaults to 190) -r ID WARN CRIT, --raw-attribute=ID WARN CRIT define raw attributes to monitor (excluding temperature). Each attribute is defined by three space separated numbers: id, warn, crit. This option is accepted multiple times, one for each attribute. -n, --no-check-standby do not check when disk status is standby (most disks do not spin in this state) (defaults to false) -s CMD, --smartctl-command=CMD set the smartctl full system path or sudo prefixed command (defaults to /usr/sbin/smartctl) -x ARGS, --smartctl-xtra-args=ARGS set extra smartctl args (excluding AHn). == Configuration == Read the Nagios documentation and create a command definition and service.like Example: # 'check_smartmon' command definition define command{ command_name check_smartmon2 command_line $USER1$/check_smartmon2.py -d $ARG1$ -n -s "sudo smartctl" -w 46 -c 50 } ... # check local disk S.M.A.R.T. status define service{ use generic-service host_name localhost service_description Check local disk S.M.A.R.T. status is_volatile 0 check_period 24x7 max_check_attempts 4 normal_check_interval 5 retry_check_interval 1 contact_groups admins notification_options w,u,c,r notification_interval 960 notification_period 24x7 check_command check_smartmon!/dev/ad0 } The device `/dev/ad0` is used on FreeBSD systems, so if you run another system you must set the appropriate name. = Contact = Author: basos = License = Copyright (C) 2012 basos, 2006 daemogorgon.net This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.