(plugin) network:🇦🇼:cppm::snmp - add mode swap (#4528)

This commit is contained in:
qgarnier 2023-07-05 10:25:04 +02:00 committed by GitHub
parent 49db61dde7
commit 1a7d215e46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 58 additions and 1 deletions

View File

@ -0,0 +1,57 @@
#
# Copyright 2023 Centreon (http://www.centreon.com/)
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and application monitoring for
# service performance.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package network::aruba::cppm::snmp::mode::swap;
use base qw(snmp_standard::mode::swap);
use strict;
use warnings;
sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
bless $self, $class;
return $self;
}
1;
__END__
=head1 MODE
Check swap memory (UCD-SNMP-MIB).
=over 8
=item B<--no-swap>
Threshold if no active swap (default: 'critical').
=item B<--warning-*> B<--critical-*>
Thresholds.
Can be: 'usage' (B), 'usage-free' (B), 'usage-prct' (%).
=back
=cut

View File

@ -17,7 +17,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Authors : Alexandre Moreau <alexandre.moreau@cheops.fr> (@SpyL1nk)
package network::aruba::cppm::snmp::plugin;
@ -38,6 +37,7 @@ sub new {
'memory' => 'network::aruba::cppm::snmp::mode::memory',
'radius' => 'network::aruba::cppm::snmp::mode::radius',
'repositories' => 'network::aruba::cppm::snmp::mode::repositories',
'swap' => 'network::aruba::cppm::snmp::mode::swap',
'tacacs' => 'network::aruba::cppm::snmp::mode::tacacs'
};