mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-23 13:45:18 +02:00
remove useless code
This commit is contained in:
parent
7cc56d54e3
commit
b182c38aed
@ -55,7 +55,7 @@ sub set_counters {
|
|||||||
closure_custom_calc => $self->can('custom_status_calc'),
|
closure_custom_calc => $self->can('custom_status_calc'),
|
||||||
closure_custom_output => $self->can('custom_status_output'),
|
closure_custom_output => $self->can('custom_status_output'),
|
||||||
closure_custom_perfdata => sub { return 0; },
|
closure_custom_perfdata => sub { return 0; },
|
||||||
closure_custom_threshold_check => \&catalog_status_threshold,
|
closure_custom_threshold_check => \&catalog_status_threshold
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'in-traffic', set => {
|
{ label => 'in-traffic', set => {
|
||||||
@ -64,8 +64,8 @@ sub set_counters {
|
|||||||
output_template => 'traffic in : %s %s/s',
|
output_template => 'traffic in : %s %s/s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'traffic_in', template => '%.2f',
|
{ label => 'traffic_in', template => '%.2f',
|
||||||
min => 0, unit => 'b/s', label_extra_instance => 1, instance_use => 'display' },
|
min => 0, unit => 'b/s', label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'out-traffic', set => {
|
{ label => 'out-traffic', set => {
|
||||||
@ -74,8 +74,8 @@ sub set_counters {
|
|||||||
output_template => 'traffic out : %s %s/s',
|
output_template => 'traffic out : %s %s/s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'traffic_out', template => '%.2f',
|
{ label => 'traffic_out', template => '%.2f',
|
||||||
min => 0, unit => 'b/s', label_extra_instance => 1, instance_use => 'display' },
|
min => 0, unit => 'b/s', label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'clients', set => {
|
{ label => 'clients', set => {
|
||||||
@ -83,8 +83,8 @@ sub set_counters {
|
|||||||
output_template => 'current client connections : %s',
|
output_template => 'current client connections : %s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'clients', template => '%s',
|
{ label => 'clients', template => '%s',
|
||||||
min => 0, label_extra_instance => 1, instance_use => 'display' },
|
min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'cpu', set => {
|
{ label => 'cpu', set => {
|
||||||
@ -92,8 +92,8 @@ sub set_counters {
|
|||||||
output_template => 'cpu usage : %.2f %%',
|
output_template => 'cpu usage : %.2f %%',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'cpu', template => '%.2f',
|
{ label => 'cpu', template => '%.2f',
|
||||||
unit => '%', min => 0, max => 100, label_extra_instance => 1, instance_use => 'display' },
|
unit => '%', min => 0, max => 100, label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'memory', set => {
|
{ label => 'memory', set => {
|
||||||
@ -101,10 +101,10 @@ sub set_counters {
|
|||||||
output_template => 'memory usage : %.2f %%',
|
output_template => 'memory usage : %.2f %%',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'memory', template => '%.2f',
|
{ label => 'memory', template => '%.2f',
|
||||||
unit => '%', min => 0, max => 100, label_extra_instance => 1, instance_use => 'display' },
|
unit => '%', min => 0, max => 100, label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ sub new {
|
|||||||
'filter-name:s' => { name => 'filter_name' },
|
'filter-name:s' => { name => 'filter_name' },
|
||||||
'unknown-status:s' => { name => 'unknown_status', default => '' },
|
'unknown-status:s' => { name => 'unknown_status', default => '' },
|
||||||
'warning-status:s' => { name => 'warning_status', default => '' },
|
'warning-status:s' => { name => 'warning_status', default => '' },
|
||||||
'critical-status:s' => { name => 'critical_status', default => '%{admin} eq "enable" and %{status} !~ /online/i' },
|
'critical-status:s' => { name => 'critical_status', default => '%{admin} eq "enable" and %{status} !~ /online/i' }
|
||||||
});
|
});
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
@ -146,7 +146,7 @@ my %map_ap_connect_status = (
|
|||||||
|
|
||||||
my $mapping = {
|
my $mapping = {
|
||||||
fgWcWtpConfigWtpAdmin => { oid => '.1.3.6.1.4.1.12356.101.14.4.3.1.2', map => \%map_ap_admin },
|
fgWcWtpConfigWtpAdmin => { oid => '.1.3.6.1.4.1.12356.101.14.4.3.1.2', map => \%map_ap_admin },
|
||||||
fgWcWtpConfigWtpName => { oid => '.1.3.6.1.4.1.12356.101.14.4.3.1.3' },
|
fgWcWtpConfigWtpName => { oid => '.1.3.6.1.4.1.12356.101.14.4.3.1.3' }
|
||||||
};
|
};
|
||||||
|
|
||||||
my $mapping2 = {
|
my $mapping2 = {
|
||||||
@ -155,7 +155,7 @@ my $mapping2 = {
|
|||||||
fgWcWtpSessionWtpByteRxCount => { oid => '.1.3.6.1.4.1.12356.101.14.4.4.1.18' },
|
fgWcWtpSessionWtpByteRxCount => { oid => '.1.3.6.1.4.1.12356.101.14.4.4.1.18' },
|
||||||
fgWcWtpSessionWtpByteTxCount => { oid => '.1.3.6.1.4.1.12356.101.14.4.4.1.19' },
|
fgWcWtpSessionWtpByteTxCount => { oid => '.1.3.6.1.4.1.12356.101.14.4.4.1.19' },
|
||||||
fgWcWtpSessionWtpCpuUsage => { oid => '.1.3.6.1.4.1.12356.101.14.4.4.1.20' },
|
fgWcWtpSessionWtpCpuUsage => { oid => '.1.3.6.1.4.1.12356.101.14.4.4.1.20' },
|
||||||
fgWcWtpSessionWtpMemoryUsage => { oid => '.1.3.6.1.4.1.12356.101.14.4.4.1.21' },
|
fgWcWtpSessionWtpMemoryUsage => { oid => '.1.3.6.1.4.1.12356.101.14.4.4.1.21' }
|
||||||
};
|
};
|
||||||
my $oid_fgWcWtpConfigEntry = '.1.3.6.1.4.1.12356.101.14.4.3.1';
|
my $oid_fgWcWtpConfigEntry = '.1.3.6.1.4.1.12356.101.14.4.3.1';
|
||||||
|
|
||||||
|
@ -38,83 +38,83 @@ sub set_counters {
|
|||||||
key_values => [ { name => 'fgIpsIntrusionsDetected', diff => 1 }, { name => 'display' } ],
|
key_values => [ { name => 'fgIpsIntrusionsDetected', diff => 1 }, { name => 'display' } ],
|
||||||
output_template => 'Intrusions detected : %s',
|
output_template => 'Intrusions detected : %s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'intrusions_detected', value => 'fgIpsIntrusionsDetected', template => '%s',
|
{ label => 'intrusions_detected', template => '%s',
|
||||||
min => 0, label_extra_instance => 1, instance_use => 'display' },
|
min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'intrusions-blocked', nlabel => 'domain.intrusions.blocked.count', set => {
|
{ label => 'intrusions-blocked', nlabel => 'domain.intrusions.blocked.count', set => {
|
||||||
key_values => [ { name => 'fgIpsIntrusionsBlocked', diff => 1 }, { name => 'display' } ],
|
key_values => [ { name => 'fgIpsIntrusionsBlocked', diff => 1 }, { name => 'display' } ],
|
||||||
output_template => 'Intrusions blocked : %s',
|
output_template => 'Intrusions blocked : %s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'intrusions_blocked', value => 'fgIpsIntrusionsBlocked', template => '%s',
|
{ label => 'intrusions_blocked', template => '%s',
|
||||||
min => 0, label_extra_instance => 1, instance_use => 'display' },
|
min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'crit-sev-detections', nlabel => 'domain.intrusions.detected.critical.severity.count', set => {
|
{ label => 'crit-sev-detections', nlabel => 'domain.intrusions.detected.critical.severity.count', set => {
|
||||||
key_values => [ { name => 'fgIpsCritSevDetections', diff => 1 }, { name => 'display' } ],
|
key_values => [ { name => 'fgIpsCritSevDetections', diff => 1 }, { name => 'display' } ],
|
||||||
output_template => 'Critical severity intrusions detected : %s',
|
output_template => 'Critical severity intrusions detected : %s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'crit_sev_detections', value => 'fgIpsCritSevDetections', template => '%s',
|
{ label => 'crit_sev_detections', template => '%s',
|
||||||
min => 0, label_extra_instance => 1, instance_use => 'display' },
|
min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'high-sev-detections', nlabel => 'domain.intrusions.detected.high.severity.count', set => {
|
{ label => 'high-sev-detections', nlabel => 'domain.intrusions.detected.high.severity.count', set => {
|
||||||
key_values => [ { name => 'fgIpsHighSevDetections', diff => 1 }, { name => 'display' } ],
|
key_values => [ { name => 'fgIpsHighSevDetections', diff => 1 }, { name => 'display' } ],
|
||||||
output_template => 'High severity intrusions detected : %s',
|
output_template => 'High severity intrusions detected : %s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'high_sev_detections', value => 'fgIpsHighSevDetections', template => '%s',
|
{ label => 'high_sev_detections', template => '%s',
|
||||||
min => 0, label_extra_instance => 1, instance_use => 'display' },
|
min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'med-sev-detections', nlabel => 'domain.intrusions.detected.medium.severity.count', set => {
|
{ label => 'med-sev-detections', nlabel => 'domain.intrusions.detected.medium.severity.count', set => {
|
||||||
key_values => [ { name => 'fgIpsMedSevDetections', diff => 1 }, { name => 'display' } ],
|
key_values => [ { name => 'fgIpsMedSevDetections', diff => 1 }, { name => 'display' } ],
|
||||||
output_template => 'Medium severity intrusions detected : %s',
|
output_template => 'Medium severity intrusions detected : %s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'med_sev_detections', value => 'fgIpsMedSevDetections', template => '%s',
|
{ label => 'med_sev_detections', template => '%s',
|
||||||
min => 0, label_extra_instance => 1, instance_use => 'display' },
|
min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'low-sev-detections', nlabel => 'domain.intrusions.detected.low.severity.count', set => {
|
{ label => 'low-sev-detections', nlabel => 'domain.intrusions.detected.low.severity.count', set => {
|
||||||
key_values => [ { name => 'fgIpsLowSevDetections', diff => 1 }, { name => 'display' } ],
|
key_values => [ { name => 'fgIpsLowSevDetections', diff => 1 }, { name => 'display' } ],
|
||||||
output_template => 'Low severity intrusions detected : %s',
|
output_template => 'Low severity intrusions detected : %s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'low_sev_detections', value => 'fgIpsLowSevDetections', template => '%s',
|
{ label => 'low_sev_detections', template => '%s',
|
||||||
min => 0, label_extra_instance => 1, instance_use => 'display' },
|
min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'info-sev-detections', nlabel => 'domain.intrusions.detected.info.severity.count', set => {
|
{ label => 'info-sev-detections', nlabel => 'domain.intrusions.detected.info.severity.count', set => {
|
||||||
key_values => [ { name => 'fgIpsInfoSevDetections', diff => 1 }, { name => 'display' } ],
|
key_values => [ { name => 'fgIpsInfoSevDetections', diff => 1 }, { name => 'display' } ],
|
||||||
output_template => 'Informational severity intrusions detected : %s',
|
output_template => 'Informational severity intrusions detected : %s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'info_sev_detections', value => 'fgIpsInfoSevDetections', template => '%s',
|
{ label => 'info_sev_detections', template => '%s',
|
||||||
min => 0, label_extra_instance => 1, instance_use => 'display' },
|
min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'signature-detections', nlabel => 'domain.intrusions.detected.signature.count', set => {
|
{ label => 'signature-detections', nlabel => 'domain.intrusions.detected.signature.count', set => {
|
||||||
key_values => [ { name => 'fgIpsSignatureDetections', diff => 1 }, { name => 'display' } ],
|
key_values => [ { name => 'fgIpsSignatureDetections', diff => 1 }, { name => 'display' } ],
|
||||||
output_template => 'Signature intrusions detected : %s',
|
output_template => 'Signature intrusions detected : %s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'signature_detection', value => 'fgIpsSignatureDetections', template => '%s',
|
{ label => 'signature_detection', template => '%s',
|
||||||
min => 0, label_extra_instance => 1, instance_use => 'display' },
|
min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'anomaly-detections', nlabel => 'domain.intrusions.detected.anomaly.count', set => {
|
{ label => 'anomaly-detections', nlabel => 'domain.intrusions.detected.anomaly.count', set => {
|
||||||
key_values => [ { name => 'fgIpsAnomalyDetections', diff => 1 }, { name => 'display' } ],
|
key_values => [ { name => 'fgIpsAnomalyDetections', diff => 1 }, { name => 'display' } ],
|
||||||
output_template => 'Anomaly intrusions detected : %s',
|
output_template => 'Anomaly intrusions detected : %s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'anomaly_detections', value => 'fgIpsAnomalyDetections', template => '%s',
|
{ label => 'anomaly_detections', template => '%s',
|
||||||
min => 0, label_extra_instance => 1, instance_use => 'display' },
|
min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ sub new {
|
|||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$options{options}->add_options(arguments => {
|
$options{options}->add_options(arguments => {
|
||||||
'filter-name:s' => { name => 'filter_name' },
|
'filter-name:s' => { name => 'filter_name' }
|
||||||
});
|
});
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
@ -145,7 +145,7 @@ my $mapping = {
|
|||||||
fgIpsLowSevDetections => { oid => '.1.3.6.1.4.1.12356.101.9.2.1.1.6' },
|
fgIpsLowSevDetections => { oid => '.1.3.6.1.4.1.12356.101.9.2.1.1.6' },
|
||||||
fgIpsInfoSevDetections => { oid => '.1.3.6.1.4.1.12356.101.9.2.1.1.7' },
|
fgIpsInfoSevDetections => { oid => '.1.3.6.1.4.1.12356.101.9.2.1.1.7' },
|
||||||
fgIpsSignatureDetections => { oid => '.1.3.6.1.4.1.12356.101.9.2.1.1.8' },
|
fgIpsSignatureDetections => { oid => '.1.3.6.1.4.1.12356.101.9.2.1.1.8' },
|
||||||
fgIpsAnomalyDetections => { oid => '.1.3.6.1.4.1.12356.101.9.2.1.1.9' },
|
fgIpsAnomalyDetections => { oid => '.1.3.6.1.4.1.12356.101.9.2.1.1.9' }
|
||||||
};
|
};
|
||||||
my $oid_fgIpsStatsEntry = '.1.3.6.1.4.1.12356.101.9.2.1.1';
|
my $oid_fgIpsStatsEntry = '.1.3.6.1.4.1.12356.101.9.2.1.1';
|
||||||
my $oid_fgVdEntName = '.1.3.6.1.4.1.12356.101.3.2.1.1.2';
|
my $oid_fgVdEntName = '.1.3.6.1.4.1.12356.101.3.2.1.1.2';
|
||||||
@ -155,8 +155,8 @@ sub manage_selection {
|
|||||||
|
|
||||||
my $snmp_result = $options{snmp}->get_multiple_table(
|
my $snmp_result = $options{snmp}->get_multiple_table(
|
||||||
oids => [
|
oids => [
|
||||||
{ oid => $oid_fgVdEntName},
|
{ oid => $oid_fgVdEntName },
|
||||||
{ oid => $oid_fgIpsStatsEntry},
|
{ oid => $oid_fgIpsStatsEntry }
|
||||||
],
|
],
|
||||||
nothing_quit => 1
|
nothing_quit => 1
|
||||||
);
|
);
|
||||||
@ -176,7 +176,7 @@ sub manage_selection {
|
|||||||
$self->{domain}->{$instance} = $result;
|
$self->{domain}->{$instance} = $result;
|
||||||
$self->{domain}->{$instance}->{display} = $snmp_result->{$oid_fgVdEntName}->{$oid};
|
$self->{domain}->{$instance}->{display} = $snmp_result->{$oid_fgVdEntName}->{$oid};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scalar(keys %{$self->{domain}}) <= 0) {
|
if (scalar(keys %{$self->{domain}}) <= 0) {
|
||||||
$self->{output}->add_option_msg(short_msg => "No domain found.");
|
$self->{output}->add_option_msg(short_msg => "No domain found.");
|
||||||
$self->{output}->option_exit();
|
$self->{output}->option_exit();
|
||||||
|
@ -33,7 +33,7 @@ sub set_counters {
|
|||||||
{ name => 'av', type => 0, cb_prefix_output => 'prefix_av_output' },
|
{ name => 'av', type => 0, cb_prefix_output => 'prefix_av_output' },
|
||||||
{ name => 'avet', type => 0, cb_prefix_output => 'prefix_avet_output' },
|
{ name => 'avet', type => 0, cb_prefix_output => 'prefix_avet_output' },
|
||||||
{ name => 'ips', type => 0, cb_prefix_output => 'prefix_ips_output' },
|
{ name => 'ips', type => 0, cb_prefix_output => 'prefix_ips_output' },
|
||||||
{ name => 'ipset', type => 0, cb_prefix_output => 'prefix_ipset_output' },
|
{ name => 'ipset', type => 0, cb_prefix_output => 'prefix_ipset_output' }
|
||||||
];
|
];
|
||||||
|
|
||||||
$self->{maps_counters}->{av} = [
|
$self->{maps_counters}->{av} = [
|
||||||
@ -43,11 +43,12 @@ sub set_counters {
|
|||||||
output_template => "last refresh is: '%s'",
|
output_template => "last refresh is: '%s'",
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'av_update', value => 'value',
|
{ label => 'av_update', value => 'value',
|
||||||
template => '%d', min => 0, unit => 's' },
|
template => '%d', min => 0, unit => 's' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
$self->{maps_counters}->{avet} = [
|
$self->{maps_counters}->{avet} = [
|
||||||
{ label => 'avet', set => {
|
{ label => 'avet', set => {
|
||||||
key_values => [ { name => 'human' }, { name => 'value' } ],
|
key_values => [ { name => 'human' }, { name => 'value' } ],
|
||||||
@ -55,11 +56,12 @@ sub set_counters {
|
|||||||
output_template => "last refresh is: '%s'",
|
output_template => "last refresh is: '%s'",
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'avet_update', value => 'value',
|
{ label => 'avet_update', value => 'value',
|
||||||
template => '%d', min => 0, unit => 's' },
|
template => '%d', min => 0, unit => 's' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
$self->{maps_counters}->{ips} = [
|
$self->{maps_counters}->{ips} = [
|
||||||
{ label => 'ips', set => {
|
{ label => 'ips', set => {
|
||||||
key_values => [ { name => 'human' }, { name => 'value' } ],
|
key_values => [ { name => 'human' }, { name => 'value' } ],
|
||||||
@ -67,11 +69,12 @@ sub set_counters {
|
|||||||
output_template => "last refresh is: '%s'",
|
output_template => "last refresh is: '%s'",
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'ips_update', value => 'value',
|
{ label => 'ips_update', value => 'value',
|
||||||
template => '%d', min => 0, unit => 's' },
|
template => '%d', min => 0, unit => 's' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
$self->{maps_counters}->{ipset} = [
|
$self->{maps_counters}->{ipset} = [
|
||||||
{ label => 'ipset', set => {
|
{ label => 'ipset', set => {
|
||||||
key_values => [ { name => 'human' }, { name => 'value' } ],
|
key_values => [ { name => 'human' }, { name => 'value' } ],
|
||||||
@ -79,10 +82,10 @@ sub set_counters {
|
|||||||
output_template => "last refresh is: '%s'",
|
output_template => "last refresh is: '%s'",
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'ipset_update', value => 'value',
|
{ label => 'ipset_update', value => 'value',
|
||||||
template => '%d', min => 0, unit => 's' },
|
template => '%d', min => 0, unit => 's' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,8 +39,8 @@ sub set_counters {
|
|||||||
output_template => 'virus detected: %s',
|
output_template => 'virus detected: %s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'virus_detected', template => '%s',
|
{ label => 'virus_detected', template => '%s',
|
||||||
min => 0, label_extra_instance => 1, instance_use => 'display' },
|
min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'virus-detected-psec', nlabel => 'domain.virus.detected.persecond', display_ok => 0, set => {
|
{ label => 'virus-detected-psec', nlabel => 'domain.virus.detected.persecond', display_ok => 0, set => {
|
||||||
@ -48,8 +48,8 @@ sub set_counters {
|
|||||||
output_template => 'virus detected: %.2f/s',
|
output_template => 'virus detected: %.2f/s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'domain.virus.detected.persecond', template => '%.2f',
|
{ label => 'domain.virus.detected.persecond', template => '%.2f',
|
||||||
unit => '/s', min => 0, label_extra_instance => 1, instance_use => 'display' },
|
unit => '/s', min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'virus-blocked', nlabel => 'domain.virus.blocked.count', set => {
|
{ label => 'virus-blocked', nlabel => 'domain.virus.blocked.count', set => {
|
||||||
@ -57,8 +57,8 @@ sub set_counters {
|
|||||||
output_template => 'virus blocked: %s',
|
output_template => 'virus blocked: %s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'virus_blocked', template => '%s',
|
{ label => 'virus_blocked', template => '%s',
|
||||||
min => 0, label_extra_instance => 1, instance_use => 'display' },
|
min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'virus-blocked-psec', nlabel => 'domain.virus.blocked.persecond', display_ok => 0, set => {
|
{ label => 'virus-blocked-psec', nlabel => 'domain.virus.blocked.persecond', display_ok => 0, set => {
|
||||||
@ -66,8 +66,8 @@ sub set_counters {
|
|||||||
output_template => 'virus blocked: %.2f/s',
|
output_template => 'virus blocked: %.2f/s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'domain.virus.blocked.persecond', template => '%.2f',
|
{ label => 'domain.virus.blocked.persecond', template => '%.2f',
|
||||||
unit => '/s', min => 0, label_extra_instance => 1, instance_use => 'display' },
|
unit => '/s', min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@ -85,7 +85,7 @@ sub new {
|
|||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$options{options}->add_options(arguments => {
|
$options{options}->add_options(arguments => {
|
||||||
'filter-name:s' => { name => 'filter_name' },
|
'filter-name:s' => { name => 'filter_name' }
|
||||||
});
|
});
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
@ -104,7 +104,7 @@ sub manage_selection {
|
|||||||
my $snmp_result = $options{snmp}->get_multiple_table(
|
my $snmp_result = $options{snmp}->get_multiple_table(
|
||||||
oids => [
|
oids => [
|
||||||
{ oid => $oid_fgVdEntName },
|
{ oid => $oid_fgVdEntName },
|
||||||
{ oid => $oid_fgAvStatsEntry, end => $mapping->{fgAvVirusBlocked}->{oid} },
|
{ oid => $oid_fgAvStatsEntry, end => $mapping->{fgAvVirusBlocked}->{oid} }
|
||||||
],
|
],
|
||||||
nothing_quit => 1
|
nothing_quit => 1
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user