#!@@PERL@@ -w # -*- perl -*- =head1 NAME sensors_ - Wildcard-plugin to monitor information from temperature, voltage, and fan speed sensors. =head1 CONFIGURATION The possible wildcard values are the follwing: fan, temp, volt. So you would create symlinks to this plugin called sensors_fan, sensors_temp, and sensors_volt. The plugins needs the following components configured: =over =item i2c and lm_sensors modules installed and loaded. =item sensors program installed and in path. =back Note: Sensor names are read from the output of the sensors program. Change them in /etc/sensors.conf if you don't like them. [sensors_*] env.sensors - Override default sensors program path env.ignore_temp - Temperature will not be plotted env.ignore_fan - Fan will not be plotted env.ignore_volt - Voltage will not be plotted env.fan_warn_percent - Percentage over mininum for warning env.volt_warn_percent - Percentage over mininum/under maximum for warning =head1 AUTHOR Unknown author =head1 LICENSE GPLv2 =head1 MAGIC MARKERS #%# family=auto #%# capabilities=autoconf suggest =cut use strict; $ENV{'LANG'} = "C"; # Force parsable output from sensors. $ENV{'LC_ALL'} = "C"; # Force parsable output from sensors. my $SENSORS = $ENV{'sensors'} || 'sensors'; # Example outputs from sensors & matching regex parts: # Fan output example from sensors: # -------------------------------- # Case Fan: 1268 RPM (min = 3750 RPM, div = 8) ALARM # CPU Fan: 0 RPM (min = 1171 RPM, div = 128) ALARM # Aux Fan: 0 RPM (min = 753 RPM, div = 128) ALARM # fan4: 3375 RPM (min = 774 RPM, div = 8) # fan5: 0 RPM (min = 1054 RPM, div = 128) ALARM # # ^^^^ ^^^^ ^^^^ # $+{label} $+{value} $+{threshold1} # # -------------------------------- # # Temperature output example from sensors: # * Note that the degree character is replaced by a space, as we are running # with LC_ALL=C and LANG=C. # --------------------------------------- # Sys Temp: +41.0 C (high = -128.0 C, hyst = +24.0 C) ALARM sensor = thermistor # CPU Temp: +40.5 C (high = +80.0 C, hyst = +75.0 C) sensor = thermistor # AUX Temp: +39.0 C (high = +80.0 C, hyst = +75.0 C) sensor = thermistor # # ^^^^^^^^ ^^ ^^ ^^ # $+{label} $+{value} $+{threshold1} $+{threshold2} # # --------------------------------------- # # Voltage output example from sensors: # ------------------------------------ # # VCore: +1.09 V (min = +0.00 V, max = +1.74 V) # in1: +12.14 V (min = +10.51 V, max = +2.38 V) ALARM # # ^^^ ^^^ ^^^ ^^ # $+{label} $+{value} $+{threshold1} $+{threshold2} # # # ------------------------------------ my %config = ( fan => { regex => qr/ ^ # String must start with: (?