+ enhance netapp filesys mode (add inodes usage)

This commit is contained in:
garnier-quentin 2015-12-03 10:55:09 +01:00
parent 191ec32bb1
commit 9b746c06b4
1 changed files with 27 additions and 15 deletions

View File

@ -36,6 +36,15 @@ my $maps_counters = {
closure_custom_threshold_check => \&custom_usage_threshold, closure_custom_threshold_check => \&custom_usage_threshold,
} }
}, },
'001_inodes' => { set => {
key_values => [ { name => 'dfPerCentInodeCapacity' }, { name => 'name' } ],
output_template => 'Inodes Used: %s %%', output_error_template => "%s",
perfdatas => [
{ label => 'inodes', value => 'dfPerCentInodeCapacity_absolute', template => '%d',
unit => '%', min => 0, max => 100, label_extra_instance => 1, instance_use => 'name_absolute' },
],
}
},
}; };
my $instance_mode; my $instance_mode;
@ -178,7 +187,6 @@ sub check_options {
sub run { sub run {
my ($self, %options) = @_; my ($self, %options) = @_;
# $options{snmp} = snmp object
$self->{snmp} = $options{snmp}; $self->{snmp} = $options{snmp};
$self->manage_selection(); $self->manage_selection();
@ -251,6 +259,7 @@ my $mapping = {
my $mapping2 = { my $mapping2 = {
dfKBytesTotal => { oid => '.1.3.6.1.4.1.789.1.5.4.1.3' }, dfKBytesTotal => { oid => '.1.3.6.1.4.1.789.1.5.4.1.3' },
dfKBytesUsed => { oid => '.1.3.6.1.4.1.789.1.5.4.1.4' }, dfKBytesUsed => { oid => '.1.3.6.1.4.1.789.1.5.4.1.4' },
dfPerCentInodeCapacity => { oid => '.1.3.6.1.4.1.789.1.5.4.1.9' },
df64TotalKBytes => { oid => '.1.3.6.1.4.1.789.1.5.4.1.29' }, df64TotalKBytes => { oid => '.1.3.6.1.4.1.789.1.5.4.1.29' },
df64UsedKBytes => { oid => '.1.3.6.1.4.1.789.1.5.4.1.30' }, df64UsedKBytes => { oid => '.1.3.6.1.4.1.789.1.5.4.1.30' },
dfCompressSavedPercent => { oid => '.1.3.6.1.4.1.789.1.5.4.1.38' }, dfCompressSavedPercent => { oid => '.1.3.6.1.4.1.789.1.5.4.1.38' },
@ -308,6 +317,7 @@ sub manage_selection {
} }
$self->{filesys_selected}->{$_}->{dfCompressSavedPercent} = $result->{dfCompressSavedPercent}; $self->{filesys_selected}->{$_}->{dfCompressSavedPercent} = $result->{dfCompressSavedPercent};
$self->{filesys_selected}->{$_}->{dfDedupeSavedPercent} = $result->{dfDedupeSavedPercent}; $self->{filesys_selected}->{$_}->{dfDedupeSavedPercent} = $result->{dfDedupeSavedPercent};
$self->{filesys_selected}->{$_}->{dfPerCentInodeCapacity} = $result->{dfPerCentInodeCapacity};
} }
} }
@ -321,13 +331,15 @@ Check filesystem usage (volumes, snapshots and aggregates also).
=over 8 =over 8
=item B<--warning-usage> =item B<--warning-*>
Threshold warning. Threshold warning.
Can be: usage, inodes (%).
=item B<--critical-usage> =item B<--critical-*>
Threshold critical. Threshold critical.
Can be: usage, inodes (%).
=item B<--units> =item B<--units>