plugin categories: other -> sensors

This commit is contained in:
Lars Kruse 2018-03-28 04:29:25 +02:00
parent 1ad3baeb09
commit 4e47cb5d85
4 changed files with 8 additions and 7 deletions

View File

@ -268,7 +268,7 @@ if ($ARGV[0] and $ARGV[0] eq "config")
$config{$graph}{'graph'}{'title'} = sprintf($graphs->{$graph}{'title'}, 'Mean batteryes');
$config{$graph}{'graph'}{'args'} = $graphs->{$graph}{'args'};
$config{$graph}{'graph'}{'vlabel'} = $graphs->{$graph}{'vlabel'};
$config{$graph}{'graph'}{'category'} = 'power';
$config{$graph}{'graph'}{'category'} = 'sensors';
foreach my $field (@{$graphs->{$graph}{'fields'}})
{
if(($proc_data_exists and $fields->{$field}{'source'} eq 'proc') or $fields->{$field}{'source'} eq 'both')
@ -290,7 +290,7 @@ if ($ARGV[0] and $ARGV[0] eq "config")
$config{$graph_name}{'graph'}{'info'} = sprintf("%s battery %s %s (sn: %s)", $info->{$i}{'battery_type'}, $info->{$i}{'manufacturer'}, $info->{$i}{'model_name'}, $info->{$i}{'serial_number'});
$config{$graph_name}{'graph'}{'args'} = '--base 1000';
$config{$graph_name}{'graph'}{'vlabel'} = $graphs->{$graph}{'vlabel'};
$config{$graph_name}{'graph'}{'category'} = 'power';
$config{$graph_name}{'graph'}{'category'} = 'sensors';
foreach my $field (@{$graphs->{$graph}{'fields'}})
{
if(($proc_data_exists and $fields->{$field}{'source'} eq 'proc') or $fields->{$field}{'source'} eq 'both')

View File

@ -12,6 +12,7 @@ case $1 in
cat <<EOM
graph_title Power State (/dev/$device)
graph_vlabel Power State
graph_category sensors
power.label power
graph_info The power state of drives on the system.
power.info The power state of the drive (1 is on, 0 is off)

View File

@ -58,7 +58,7 @@ if (defined $ARGV[0] and $ARGV[0] eq "config") {
print "multigraph cyberpower_load
graph_title CyberPower UPS Status
graph_info This graph shows battery status information.
graph_category ups
graph_category sensors
graph_vlabel %
graph_args --upper-limit 100 -l 0
graph_scale no
@ -79,7 +79,7 @@ charge.max 100
print "multigraph cyberpower_runtime
graph_title CyberPower UPS Runtime
graph_info This graph shows expected runtime informatiom.
graph_category ups
graph_category sensors
graph_vlabel minutes
";
print "runtime.label Expected runtime
@ -90,7 +90,7 @@ runtime.type GAUGE
print "multigraph cyberpower_voltage
graph_title CyberPower UPS Voltages
graph_info This graph shows voltage information.
graph_category ups
graph_category sensors
graph_vlabel V
";
print "input.label Input voltage
@ -106,7 +106,7 @@ output.type GAUGE
print "multigraph cyberpower_environment
graph_title CyberPower UPS Environment
graph_info This graph shows environmental status information.
graph_category ups
graph_category sensors
graph_vlabel F/%
";
print "temp.label Temperature

View File

@ -59,7 +59,7 @@ if [ "$1" = "config" ]; then
# some fix values
echo "host_name $SNMPCLIENT"
echo 'graph_category Other'
echo 'graph_category sensors'
echo 'graph_args --base 1000 -l 0'
# some variables, fetched from the device