mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
Nutups2 multiplier (#1313)
* add multiplier_fetch that's much like common_fetch * moved multiplier_fetch functionality to common_fetch * power_emulated_multiplier env var added and Documented --------- Co-authored-by: Tim Connors <tconnors@rather.puzzling.org>
This commit is contained in:
parent
89bd7114e1
commit
c66f50b2e0
1 changed files with 30 additions and 5 deletions
|
@ -36,10 +36,11 @@ You can also control individual fields like:
|
||||||
=head1 FEATURES
|
=head1 FEATURES
|
||||||
|
|
||||||
The plugin supports reporting battery charge, UPS load, input/output
|
The plugin supports reporting battery charge, UPS load, input/output
|
||||||
frequencies/currents/voltages, apparent and real power output, humidity and
|
frequencies/currents/voltages, apparent and real power output, as well
|
||||||
temperature readings. Note however that different UPS models report different
|
as emulated power output if only % load is available, humidity and
|
||||||
levels of detail; the plugin reports whatever information the NUT UPS driver
|
temperature readings. Note however that different UPS models report
|
||||||
(and in turn the UPS itself) provides.
|
different levels of detail; the plugin reports whatever information
|
||||||
|
the NUT UPS driver (and in turn the UPS itself) provides.
|
||||||
|
|
||||||
Although the 'suggest' command will only offer UPSes for which the local host
|
Although the 'suggest' command will only offer UPSes for which the local host
|
||||||
is the master, you can also monitor remote UPSes if you include the host name
|
is the master, you can also monitor remote UPSes if you include the host name
|
||||||
|
@ -49,6 +50,19 @@ in the symlink, like:
|
||||||
|
|
||||||
etc.
|
etc.
|
||||||
|
|
||||||
|
If your UPS only outputs % load instead of an actual power value, you
|
||||||
|
can emulate it based on readings you can manually make such as by
|
||||||
|
comparing against a power meter. Configure the plugin via with
|
||||||
|
settings like these:
|
||||||
|
|
||||||
|
[nutups2_powershield-commander*]
|
||||||
|
# powershield commander 1000: 400 watts at 63% load on powershield commander 1000: 400/63
|
||||||
|
env.power_emulated_multiplier 6.349
|
||||||
|
|
||||||
|
[nutups2_powershield-centurion*]
|
||||||
|
# powershield centurion 1000: 445 watts at 48% load on powershield centurion 1000: 445/49
|
||||||
|
env.power_emulated_multiplier 9.294
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHOR
|
||||||
|
|
||||||
Gábor Gombás <gombasg@sztaki.hu>
|
Gábor Gombás <gombasg@sztaki.hu>
|
||||||
|
@ -141,6 +155,15 @@ my %config = (
|
||||||
config => \&common_config,
|
config => \&common_config,
|
||||||
fetch => \&common_fetch,
|
fetch => \&common_fetch,
|
||||||
},
|
},
|
||||||
|
power_emulated => {
|
||||||
|
filter => qr/^(.*)\.load$/,
|
||||||
|
title => 'UPS emulated power',
|
||||||
|
args => '--base 1000 -l 0',
|
||||||
|
vlabel => 'Watt',
|
||||||
|
config => \&common_config,
|
||||||
|
multiplier => $ENV{'power_emulated_multiplier'} || 1,
|
||||||
|
fetch => \&common_fetch,
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
sub read_ups_values {
|
sub read_ups_values {
|
||||||
|
@ -265,7 +288,9 @@ sub common_fetch {
|
||||||
$field .= $nominal if $nominal;
|
$field .= $nominal if $nominal;
|
||||||
my $id = clean_fieldname($field);
|
my $id = clean_fieldname($field);
|
||||||
|
|
||||||
print $id . ".value " . $values->{$key} . "\n";
|
print $id . ".value " . $values->{$key}*
|
||||||
|
(defined $config{$func}->{'multiplier'} ? $config{$func}->{'multiplier'} : 1)
|
||||||
|
. "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue