Add fan and voltage

This commit is contained in:
cgagnaire 2017-02-08 13:32:18 +01:00 committed by GitHub
parent e47ea140e4
commit ef9fe2608d
1 changed files with 12 additions and 19 deletions

View File

@ -28,26 +28,20 @@ use warnings;
sub set_system { sub set_system {
my ($self, %options) = @_; my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|fan|psu)$'; $self->{regexp_threshold_overload_check_section_option} = '^(temperature|fan|voltage)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan)$'; $self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan|voltage)$';
$self->{cb_hook2} = 'snmp_execute'; $self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = { $self->{thresholds} = {
fan => [ fan => [
['bad', 'CRITICAL'], ['abnormal', 'CRITICAL'],
['good', 'OK'], ['normal', 'OK'],
['notPresent', 'OK'],
],
psu => [
['bad', 'CRITICAL'],
['good', 'OK'],
['notPresent', 'OK'],
], ],
}; };
$self->{components_path} = 'network::raisecom::snmp::mode::components'; $self->{components_path} = 'network::raisecom::snmp::mode::components';
$self->{components_module} = ['temperature']; #['fan', 'psu', 'temperature']; $self->{components_module} = ['fan', 'temperature', 'voltage'];
} }
sub snmp_execute { sub snmp_execute {
@ -76,7 +70,7 @@ __END__
=head1 MODE =head1 MODE
Check hardware (temperatures). Check hardware (temperatures, fans, voltages).
=over 8 =over 8
@ -114,4 +108,3 @@ Example: --critical='temperature,.*,40'
=back =back
=cut =cut