add new perfdata label (network/a*)

This commit is contained in:
Sims24 2019-04-17 22:45:31 +02:00
parent 20b1ac49f7
commit c2f9eeb5fb
23 changed files with 81 additions and 69 deletions

View File

@ -34,7 +34,7 @@ sub set_counters {
];
$self->{maps_counters}->{global} = [
{ label => 'total', set => {
{ label => 'total', nlabel => 'queries.persecond', set => {
key_values => [ { name => 'Queries', diff => 1 } ],
per_second => 1,
output_template => 'Total : %d',
@ -48,7 +48,7 @@ sub set_counters {
foreach ('update', 'delete', 'insert', 'truncate', 'select', 'commit', 'begin') {
push @{$self->{maps_counters}->{global}}, {
label => $_, display_ok => 0, set => {
label => $_, nlabel => 'queries.' . $_ . '.persecond', display_ok => 0, set => {
key_values => [ { name => 'Com_' . $_, diff => 1 } ],
per_second => 1,
output_template => $_ . ' : %d',
@ -59,7 +59,7 @@ sub set_counters {
}
};
push @{$self->{maps_counters}->{global}}, {
label => $_ . '-count', display_ok => 0, set => {
label => $_ . '-count', , nlabel => 'queries.' . $_ . '.count', display_ok => 0, set => {
key_values => [ { name => 'Com_' . $_, diff => 1 } ],
output_template => $_ . ' count : %d',
perfdatas => [

View File

@ -34,7 +34,7 @@ sub set_counters {
];
$self->{maps_counters}->{global} = [
{ label => 'total', set => {
{ label => 'total', nlabel => 'table.usage.bytes', set => {
key_values => [ { name => 'total' } ],
output_template => 'Total Size : %s%s',
output_change_bytes => 1,
@ -46,7 +46,7 @@ sub set_counters {
},
];
$self->{maps_counters}->{table} = [
{ label => 'table', set => {
{ label => 'table', nlabel => 'table.usage.bytes', set => {
key_values => [ { name => 'size' }, { name => 'display' } ],
output_template => 'size : %s%s',
output_change_bytes => 1,

View File

@ -32,7 +32,7 @@ sub set_counters {
{ name => 'cpu', type => 1, cb_prefix_output => 'prefix_cpu_output', message_multiple => 'All CPU usages are ok' }
];
$self->{maps_counters}->{cpu} = [
{ label => '5s', set => {
{ label => '5s', nlabel => 'cpu.utilization.5s.percentage', set => {
key_values => [ { name => 'usage_5s' }, { name => 'display' } ],
output_template => '%s %% (5sec)', output_error_template => "%s (5sec)",
perfdatas => [
@ -41,7 +41,7 @@ sub set_counters {
],
}
},
{ label => '1m', set => {
{ label => '1m', nlabel => 'cpu.utilization.1m.percentage', set => {
key_values => [ { name => 'usage_1m' }, { name => 'display' } ],
output_template => '%s %% (1m)', output_error_template => "%s (1min)",
perfdatas => [
@ -50,7 +50,7 @@ sub set_counters {
],
}
},
{ label => '5m', set => {
{ label => '5m', nlabel => 'cpu.utilization.5m.percentage', set => {
key_values => [ { name => 'usage_5m' }, { name => 'display' } ],
output_template => '%s %% (5min)', output_error_template => "%s (5min)",
perfdatas => [

View File

@ -30,6 +30,7 @@ sub custom_usage_perfdata {
$self->{output}->perfdata_add(
label => 'used', unit => 'B',
nlabel => $self->{label},
instances => $self->use_instances(extra_instance => $options{extra_instance}) ? $self->{result_values}->{display} : undef,
value => $self->{result_values}->{used},
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}, total => $self->{result_values}->{total}, cast_int => 1),
@ -79,7 +80,7 @@ sub set_counters {
];
$self->{maps_counters}->{memory} = [
{ label => 'usage', set => {
{ label => 'usage', nlabel => 'memory.usage.bytes', set => {
key_values => [ { name => 'display' }, { name => 'total' }, { name => 'used' } ],
closure_custom_calc => $self->can('custom_usage_calc'),
closure_custom_output => $self->can('custom_usage_output'),

View File

@ -33,7 +33,7 @@ sub set_counters {
];
$self->{maps_counters}->{cpu} = [
{ label => 'cpu-30s', set => {
{ label => 'cpu-30s', nlabel => 'cpu.utilization.30s.average', set => {
key_values => [ { name => 'cpu_30s' }, { name => 'display' } ],
output_template => '30s : %s %%',
perfdatas => [
@ -42,7 +42,7 @@ sub set_counters {
],
}
},
{ label => 'cpu-1m', set => {
{ label => 'cpu-1m', nlabel => 'cpu.utilization.1m.average', set => {
key_values => [ { name => 'cpu_1m' }, { name => 'display' } ],
output_template => '1m : %s %%',
perfdatas => [

View File

@ -29,16 +29,17 @@ sub custom_usage_perfdata {
my ($self, %options) = @_;
$self->{output}->perfdata_add(label => 'used', unit => 'B',
nlabel => $self->{nlabel},
value => $self->{result_values}->{used},
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{label}, total => $self->{result_values}->{total}, cast_int => 1),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{label}, total => $self->{result_values}->{total}, cast_int => 1),
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}, total => $self->{result_values}->{total}, cast_int => 1),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}, total => $self->{result_values}->{total}, cast_int => 1),
min => 0, max => $self->{result_values}->{total});
}
sub custom_usage_threshold {
my ($self, %options) = @_;
my $exit = $self->{perfdata}->threshold_check(value => $self->{result_values}->{prct_used}, threshold => [ { label => 'critical-' . $self->{label}, exit_litteral => 'critical' }, { label => 'warning-' . $self->{label}, exit_litteral => 'warning' } ]);
my $exit = $self->{perfdata}->threshold_check(value => $self->{result_values}->{prct_used}, threshold => [ { label => 'critical-' . $self->{thlabel}, exit_litteral => 'critical' }, { label => 'warning-' . $self->{thlabel}, exit_litteral => 'warning' } ]);
return $exit;
}
@ -76,7 +77,7 @@ sub set_counters {
];
$self->{maps_counters}->{disk} = [
{ label => 'usage', set => {
{ label => 'usage', nlabel => 'disk.usage.bytes', set => {
key_values => [ { name => 'free' }, { name => 'total' } ],
closure_custom_calc => $self->can('custom_usage_calc'),
closure_custom_output => $self->can('custom_usage_output'),

View File

@ -34,7 +34,7 @@ sub set_counters {
];
$self->{maps_counters}->{global} = [
{ label => 'current-connections', set => {
{ label => 'current-connections', nlabel => 'connections.current.count', set => {
key_values => [ { name => 'current_connections' } ],
output_template => 'Current Connections : %s',
perfdatas => [
@ -43,7 +43,7 @@ sub set_counters {
],
}
},
{ label => 'total-connections', set => {
{ label => 'total-connections', nlabel => 'connections.total.count', set => {
key_values => [ { name => 'total_connections', diff => 1 } ],
output_template => 'Total Connections : %s',
perfdatas => [
@ -52,7 +52,7 @@ sub set_counters {
],
}
},
{ label => 'total-ssl-connections', set => {
{ label => 'total-ssl-connections', nlabel => 'connections.ssl.total.count', set => {
key_values => [ { name => 'total_ssl_connections', diff => 1 } ],
output_template => 'Total SSL Connections : %s',
perfdatas => [

View File

@ -29,16 +29,17 @@ sub custom_usage_perfdata {
my ($self, %options) = @_;
$self->{output}->perfdata_add(label => 'used', unit => 'B',
nlabel => $self->{nlabel},
value => $self->{result_values}->{used},
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{label}, total => $self->{result_values}->{total}, cast_int => 1),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{label}, total => $self->{result_values}->{total}, cast_int => 1),
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}, total => $self->{result_values}->{total}, cast_int => 1),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}, total => $self->{result_values}->{total}, cast_int => 1),
min => 0, max => $self->{result_values}->{total});
}
sub custom_usage_threshold {
my ($self, %options) = @_;
my $exit = $self->{perfdata}->threshold_check(value => $self->{result_values}->{prct_used}, threshold => [ { label => 'critical-' . $self->{label}, exit_litteral => 'critical' }, { label => 'warning-' . $self->{label}, exit_litteral => 'warning' } ]);
my $exit = $self->{perfdata}->threshold_check(value => $self->{result_values}->{prct_used}, threshold => [ { label => 'critical-' . $self->{thlabel}, exit_litteral => 'critical' }, { label => 'warning-' . $self->{thlabel}, exit_litteral => 'warning' } ]);
return $exit;
}
@ -76,7 +77,7 @@ sub set_counters {
];
$self->{maps_counters}->{memory} = [
{ label => 'usage', set => {
{ label => 'usage', nlabel => 'memory.usage.bytes', set => {
key_values => [ { name => 'used' }, { name => 'total' } ],
closure_custom_calc => $self->can('custom_usage_calc'),
closure_custom_output => $self->can('custom_usage_output'),

View File

@ -58,7 +58,7 @@ sub set_counters {
closure_custom_threshold_check => \&catalog_status_threshold,
}
},
{ label => 'current-con', set => {
{ label => 'current-con', nlabel => 'virtualserver.connections.current.count', set => {
key_values => [ { name => 'axVirtualServerStatCurConns' }, { name => 'display' } ],
output_template => 'Current Connections : %s',
perfdatas => [
@ -67,7 +67,7 @@ sub set_counters {
],
}
},
{ label => 'total-con', set => {
{ label => 'total-con', nlabel => 'virtualserver.connections.total.count', set => {
key_values => [ { name => 'axVirtualServerStatTotConns', diff => 1 }, { name => 'display' } ],
output_template => 'Total Connections : %s',
perfdatas => [
@ -76,7 +76,7 @@ sub set_counters {
],
}
},
{ label => 'traffic-in', set => {
{ label => 'traffic-in', nlabel => 'virtualserver.traffic.in.bitsperseconds', set => {
key_values => [ { name => 'axVirtualServerStatBytesIn', diff => 1 }, { name => 'display' } ],
per_second => 1, output_change_bytes => 2,
output_template => 'Traffic In : %s %s/s',
@ -86,7 +86,7 @@ sub set_counters {
],
}
},
{ label => 'traffic-out', set => {
{ label => 'traffic-out', nlabel => 'virtualserver.traffic.out.bitsperseconds', set => {
key_values => [ { name => 'axVirtualServerStatBytesOut', diff => 1 }, { name => 'display' } ],
per_second => 1, output_change_bytes => 2,
output_template => 'Traffic Out : %s %s/s',

View File

@ -34,7 +34,7 @@ sub set_counters {
];
$self->{maps_counters}->{realm} = [
{ label => 'current-in-sessions', set => {
{ label => 'current-in-sessions', nlabel => 'realm.sessions.in.current.count', set => {
key_values => [ { name => 'apSigRealmStatsCurrentActiveSessionsInbound' }, { name => 'display' } ],
output_template => 'Current Inbound Sessions : %s',
perfdatas => [
@ -43,7 +43,7 @@ sub set_counters {
],
}
},
{ label => 'current-in-sessions-rate', set => {
{ label => 'current-in-sessions-rate', nlabel => 'realm.sessions.in.rate.count', set => {
key_values => [ { name => 'apSigRealmStatsCurrentSessionRateInbound' }, { name => 'display' } ],
output_template => 'Current Inbound Sessions Rate : %s/s',
perfdatas => [
@ -52,7 +52,7 @@ sub set_counters {
],
}
},
{ label => 'total-in-sessions', set => {
{ label => 'total-in-sessions', nlabel => 'realm.sessions.in.total.count', set => {
key_values => [ { name => 'apSigRealmStatsTotalSessionsInbound', diff => 1 }, { name => 'display' } ],
output_template => 'Total Inbound Sessions : %s',
perfdatas => [
@ -61,7 +61,7 @@ sub set_counters {
],
}
},
{ label => 'current-out-sessions', set => {
{ label => 'current-out-sessions', nlabel => 'realm.sessions.out.current.count', set => {
key_values => [ { name => 'apSigRealmStatsCurrentActiveSessionsOutbound' }, { name => 'display' } ],
output_template => 'Current Outbound Sessions : %s',
perfdatas => [
@ -70,7 +70,7 @@ sub set_counters {
],
}
},
{ label => 'current-out-sessions-rate', set => {
{ label => 'current-out-sessions-rate', nlabel => 'realm.sessions.out.current.count', set => {
key_values => [ { name => 'apSigRealmStatsCurrentSessionRateOutbound' }, { name => 'display' } ],
output_template => 'Current Outbound Sessions Rate : %s/s',
perfdatas => [
@ -79,7 +79,7 @@ sub set_counters {
],
}
},
{ label => 'total-out-sessions', set => {
{ label => 'total-out-sessions', nlabel => 'realm.sessions.out.total.count', set => {
key_values => [ { name => 'apSigRealmStatsTotalSessionsOutbound', diff => 1 }, { name => 'display' } ],
output_template => 'Total Outbound Sessions : %s',
perfdatas => [
@ -88,7 +88,7 @@ sub set_counters {
],
}
},
{ label => 'avg-qos-rfactor', set => {
{ label => 'avg-qos-rfactor', nlabel => 'realm.rfactor.qos.average.count', set => {
key_values => [ { name => 'apSigRealmStatsAverageQoSRFactor' }, { name => 'display' } ],
output_template => 'Average QoS RFactor : %s',
perfdatas => [
@ -97,7 +97,7 @@ sub set_counters {
],
}
},
{ label => 'total-rfactor', set => {
{ label => 'total-rfactor', nlabel => 'realm.rfactor.execeded.total.count', set => {
key_values => [ { name => 'apSigRealmStatsTotalMajorRFactorExceeded', diff => 1 }, { name => 'display' } ],
output_template => 'Total Rfactor Exceeded : %s',
perfdatas => [

View File

@ -57,7 +57,7 @@ sub set_counters {
closure_custom_threshold_check => \&catalog_status_threshold,
}
},
{ label => 'in-sessions-rate', set => {
{ label => 'in-sessions-rate', nlabel => 'sip.sessions.in.rate', set => {
key_values => [ { name => 'apSipSAStatsTotalSessionsInbound', diff => 1 }, { name => 'display' } ],
output_template => 'Inbound Sessions Rate : %.2f/s',
per_second => 1,
@ -67,7 +67,7 @@ sub set_counters {
],
}
},
{ label => 'out-sessions-rate', set => {
{ label => 'out-sessions-rate', nlabel => 'sip.sessions.out.rate', set => {
key_values => [ { name => 'apSipSAStatsTotalSessionsOutbound', diff => 1 }, { name => 'display' } ],
output_template => 'Outbound Sessions Rate : %.2f/s',
per_second => 1,
@ -77,7 +77,7 @@ sub set_counters {
],
}
},
{ label => 'latency', set => {
{ label => 'latency', nlabel => 'sip.stats.latency.ms', set => {
key_values => [ { name => 'apSipSAStatsAverageLatency' }, { name => 'display' } ],
output_template => 'Average Latency : %s ms',
perfdatas => [
@ -86,7 +86,7 @@ sub set_counters {
],
}
},
{ label => 'asr', set => {
{ label => 'asr', nlabel => 'sip.stats.asr.percentage', set => {
key_values => [ { name => 'apSipSAStatsPeriodASR' }, { name => 'display' } ],
output_template => 'Answer-to-seizure Ratio : %s %%',
perfdatas => [

View File

@ -48,7 +48,7 @@ sub set_counters {
];
$self->{maps_counters}->{global} = [
{ label => 'health-score', set => {
{ label => 'health-score', nlabel => 'health.score.percentage', set => {
key_values => [ { name => 'health_score' } ],
output_template => 'Health Score : %.2f %%',
perfdatas => [
@ -57,7 +57,7 @@ sub set_counters {
],
}
},
{ label => 'cpu-load', set => {
{ label => 'cpu-load', nlabel => 'cpu.utilization.percentage', set => {
key_values => [ { name => 'cpu_load' } ],
output_template => 'Cpu Load : %.2f %%',
perfdatas => [
@ -66,7 +66,7 @@ sub set_counters {
],
}
},
{ label => 'memory-usage', set => {
{ label => 'memory-usage', nlabel => 'memory.usage.percentage', set => {
key_values => [ { name => 'memory_used' } ],
output_template => 'Memory Used : %.2f %%',
perfdatas => [
@ -75,7 +75,7 @@ sub set_counters {
],
}
},
{ label => 'license-usage', set => {
{ label => 'license-usage', nlabel => 'licence.usage.percentage', set => {
key_values => [ { name => 'license_used' } ],
output_template => 'License Used : %.2f %%',
perfdatas => [
@ -84,7 +84,7 @@ sub set_counters {
],
}
},
{ label => 'current-sessions', set => {
{ label => 'current-sessions', nlabel => 'sessions.current.count', set => {
key_values => [ { name => 'current_sessions' } ],
output_template => 'Current Sessions : %s',
perfdatas => [
@ -93,7 +93,7 @@ sub set_counters {
],
}
},
{ label => 'current-calls', set => {
{ label => 'current-calls', nlabel => 'calls.current.count', set => {
key_values => [ { name => 'current_calls' } ],
output_template => 'Current Calls : %s/s',
perfdatas => [
@ -143,6 +143,7 @@ sub manage_selection {
4 => 'outOfService', 5 => 'unassigned', 6 => 'activePending',
7 => 'standbyPending', 8 => 'outOfServicePending', 9 => 'recovery',
);
my $oid_apSysCPUUtil = '.1.3.6.1.4.1.9148.3.2.1.1.1.0';
my $oid_apSysMemoryUtil = '.1.3.6.1.4.1.9148.3.2.1.1.2.0';
my $oid_apSysHealthScore = '.1.3.6.1.4.1.9148.3.2.1.1.3.0';
@ -155,6 +156,7 @@ sub manage_selection {
$oid_apSysLicenseCapacity, $oid_apSysGlobalConSess, $oid_apSysGlobalCPS
],
nothing_quit => 1);
$self->{global} = {
cpu_load => $result->{$oid_apSysCPUUtil},
memory_used => $result->{$oid_apSysMemoryUtil},

View File

@ -33,7 +33,7 @@ sub set_counters {
{ name => 'ssid', type => 1, cb_prefix_output => 'prefix_ssid_output', message_multiple => 'All users by SSID are ok' },
];
$self->{maps_counters}->{global} = [
{ label => 'total', set => {
{ label => 'total', nlabel => 'users.total.count', set => {
key_values => [ { name => 'total' } ],
output_template => 'Total Users : %s',
perfdatas => [
@ -44,7 +44,7 @@ sub set_counters {
},
];
$self->{maps_counters}->{ssid} = [
{ label => 'ssid', set => {
{ label => 'ssid', nlabel => 'ssid.users.total.count', set => {
key_values => [ { name => 'total' }, { name => 'display' } ],
output_template => 'users : %s',
perfdatas => [

View File

@ -33,7 +33,7 @@ sub set_counters {
];
$self->{maps_counters}->{cpu} = [
{ label => 'usage', set => {
{ label => 'usage', nlabel => 'cpu.utilization.percentage', set => {
key_values => [ { name => 'usage' }, { name => 'display' }, ],
output_template => 'Usage : %.2f %%',
perfdatas => [

View File

@ -45,7 +45,7 @@ sub set_counters {
closure_custom_threshold_check => $self->can('custom_status_threshold'),
}
},
{ label => 'in-traffic', set => {
{ label => 'in-traffic', nlabel => 'sap.traffic.in.bitsperseconds', set => {
key_values => [ { name => 'in', diff => 1 }, { name => 'display' } ],
per_second => 1,
closure_custom_calc => $self->can('custom_sap_calc'), closure_custom_calc_extra_options => { label_ref => 'in' },
@ -54,7 +54,7 @@ sub set_counters {
closure_custom_threshold_check => $self->can('custom_qsap_threshold'),
}
},
{ label => 'out-traffic', set => {
{ label => 'out-traffic', nlabel => 'sap.traffic.out.bitsperseconds', set => {
key_values => [ { name => 'out', diff => 1 }, { name => 'display' } ],
per_second => 1,
closure_custom_calc => $self->can('custom_sap_calc'), closure_custom_calc_extra_options => { label_ref => 'out' },
@ -66,7 +66,7 @@ sub set_counters {
];
$self->{maps_counters}->{global} = [
{ label => 'total-in-traffic', set => {
{ label => 'total-in-traffic', nlabel => 'traffic.in.bitsperseconds', set => {
key_values => [],
manual_keys => 1, per_second => 1, output_change_bytes => 2,
closure_custom_calc => $self->can('custom_total_traffic_calc'), closure_custom_calc_extra_options => { label_ref => 'in' },
@ -75,7 +75,7 @@ sub set_counters {
closure_custom_threshold_check => $self->can('custom_total_traffic_threshold'),
}
},
{ label => 'total-out-traffic', set => {
{ label => 'total-out-traffic', nlabel => 'traffic.out.bitsperseconds', set => {
key_values => [],
manual_keys => 1, per_second => 1, output_change_bytes => 2,
closure_custom_calc => $self->can('custom_total_traffic_calc'), closure_custom_calc_extra_options => { label_ref => 'out' },
@ -101,6 +101,7 @@ sub custom_total_traffic_perfdata {
$self->{output}->perfdata_add(
label => 'total_traffic_' . $self->{result_values}->{label}, unit => 'b/s',
nlabel => $self->{nlabel},
value => sprintf("%.2f", $self->{result_values}->{total_traffic}),
warning => $warning,
critical => $critical,
@ -225,6 +226,7 @@ sub custom_sap_perfdata {
$self->{output}->perfdata_add(
label => 'traffic_' . $self->{result_values}->{label}, unit => 'b/s',
nlabel => $self->{nlabel},
instances => $self->use_instances(extra_instance => $options{extra_instance}) ? $self->{result_values}->{display} : undef,
value => sprintf("%.2f", $self->{result_values}->{traffic}),
warning => $warning,
@ -377,6 +379,7 @@ sub manage_selection {
$self->{global} = {};
$self->{sap} = {};
foreach my $oid (keys %{$snmp_result->{$oid_sapDescription}}) {
next if ($oid !~ /^$oid_sapDescription\.(.*?)\.(.*?)\.(.*?)$/);
# $SvcId and $SapEncapValue is the same. We use service table
@ -400,6 +403,7 @@ sub manage_selection {
SvcId => $SvcId,
SapPortId => $SapPortId,
SapEncapValue => $SapEncapValue);
if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
$name !~ /$self->{option_results}->{filter_name}/) {
$self->{output}->output_add(long_msg => "skipping '" . $name . "': no matching filter.", debug => 1);
@ -413,7 +417,9 @@ sub manage_selection {
$mapping->{fadSapStatsEgressOctets}->{oid},
$mapping->{sapAdminStatus}->{oid}, $mapping->{sapOperStatus}->{oid}],
instances => [keys %{$self->{sap}}], instance_regexp => '(\d+\.\d+\.\d+)$');
$snmp_result = $options{snmp}->get_leef(nothing_quit => 1);
foreach (keys %{$self->{sap}}) {
my $result = $options{snmp}->map_instance(mapping => $mapping, results => $snmp_result, instance => $_);
$self->{sap}->{$_}->{in} = $result->{fadSapStatsIngressOctets} * 8;

View File

@ -28,10 +28,10 @@ use warnings;
sub custom_usage_perfdata {
my ($self, %options) = @_;
my $label = 'used';
my ($label, $nlabel) = ('used', $self->{nlabel});
my $value_perf = $self->{result_values}->{used};
if (defined($self->{instance_mode}->{option_results}->{free})) {
$label = 'free';
($label, $nlabel) = ('free', 'memory.usage.bytes');
$value_perf = $self->{result_values}->{free};
}
@ -43,6 +43,7 @@ sub custom_usage_perfdata {
$self->{output}->perfdata_add(
label => $label, unit => 'B',
nlabel => $self->{nlabel},
instances => $self->use_instances(extra_instance => $options{extra_instance}) ? $self->{result_values}->{display} : undef,
value => $value_perf,
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}, %total_options),
@ -99,7 +100,7 @@ sub set_counters {
];
$self->{maps_counters}->{memory} = [
{ label => 'usage', set => {
{ label => 'usage', nlabel => 'memory.usage.bytes', set => {
key_values => [ { name => 'display' }, { name => 'used' }, { name => 'total' } ],
closure_custom_calc => $self->can('custom_usage_calc'),
closure_custom_output => $self->can('custom_usage_output'),

View File

@ -59,7 +59,7 @@ sub set_counters {
];
$self->{maps_counters}->{memory} = [
{ label => 'usage', set => {
{ label => 'usage', nlabel => 'flash.usage.bytes', set => {
key_values => [ { name => 'total' }, { name => 'free' }, { name => 'display' }, ],
closure_custom_calc => $self->can('custom_usage_calc'),
closure_custom_output => $self->can('custom_usage_output'),

View File

@ -46,7 +46,7 @@ sub set_counters {
{ name => 'global', type => 0, skipped_code => { -10 => 1 } },
];
$self->{maps_counters}->{global} = [
{ label => 'rx-snr', set => {
{ label => 'rx-snr', nlabel => 'rx.snr.ratio', set => {
key_values => [ { name => 'rx_snr' } ],
output_template => 'Average signal to noise ratio: %s Dbm',
perfdatas => [
@ -54,7 +54,7 @@ sub set_counters {
],
}
},
{ label => 'rx-power', set => {
{ label => 'rx-power', nlabel => 'rx.power.dbm', set => {
key_values => [ { name => 'rx_power' } ],
output_template => 'Received signal strength: %s Dbm',
perfdatas => [
@ -62,7 +62,7 @@ sub set_counters {
],
}
},
{ label => 'bad-frames', set => {
{ label => 'bad-frames', nlabel => 'frames.bad.percentage', set => {
key_values => [ { name => 'total_frames', diff => 1 }, { name => 'bad_frames', diff => 1 } ],
closure_custom_calc => $self->can('custom_badframes_calc'),
output_template => 'Bad frames: %.2f %%', output_use => 'bad_prct', threshold_use => 'bad_prct',

View File

@ -39,7 +39,7 @@ sub set_counters {
];
$self->{maps_counters}->{storage} = [
{ label => 'usage', set => {
{ label => 'usage', nlabel => 'memory.usage.butes', set => {
key_values => [ { name => 'display' }, { name => 'used' }, { name => 'size' }, { name => 'allocation_units' } ],
closure_custom_calc => $self->can('custom_usage_calc'),
closure_custom_output => $self->can('custom_usage_output'),

View File

@ -32,7 +32,7 @@ sub set_counters {
{ name => 'global', type => 0, message_separator => ' - ' },
];
$self->{maps_counters}->{global} = [
{ label => 'voip', set => {
{ label => 'voip', nlabel => 'cpu.voip.utilization.percentage', set => {
key_values => [ { name => 'voip' } ],
output_template => 'CPU VoIp Usage : %.2f %%',
perfdatas => [
@ -40,7 +40,7 @@ sub set_counters {
],
}
},
{ label => 'data', set => {
{ label => 'data', nlabel => 'cpu.data.utilization.percentage', set => {
key_values => [ { name => 'data' } ],
output_template => 'CPU Data Usage : %.2f %%',
perfdatas => [

View File

@ -32,7 +32,7 @@ sub set_counters {
{ name => 'global', type => 0, message_separator => ' - ' },
];
$self->{maps_counters}->{global} = [
{ label => 'voip', set => {
{ label => 'voip', nlabel => 'memory.voip.utilization.percentage', set => {
key_values => [ { name => 'voip' } ],
output_template => 'Memory VoIp Usage : %.2f %%',
perfdatas => [
@ -40,7 +40,7 @@ sub set_counters {
],
}
},
{ label => 'data', set => {
{ label => 'data', nlabel => 'memory.data.utilization.percentage', set => {
key_values => [ { name => 'data' } ],
output_template => 'Memory Data Usage : %.2f %%',
perfdatas => [

View File

@ -57,7 +57,7 @@ sub set_counters {
closure_custom_threshold_check => \&catalog_status_threshold,
}
},
{ label => 'cpu', set => {
{ label => 'cpu', nlabel => 'reverseproxy.cpu.utilization.percentage', set => {
key_values => [ { name => 'cpu' }, { name => 'display' } ],
output_template => 'CPU Usage : %.2f %%',
perfdatas => [
@ -66,7 +66,7 @@ sub set_counters {
],
}
},
{ label => 'memory', set => {
{ label => 'memory', nlabel => 'reverseproxy.memory.usage.bytes', set => {
key_values => [ { name => 'memory' }, { name => 'display' } ],
output_template => 'Memory Usage : %s %s',
output_change_bytes => 1,
@ -76,7 +76,7 @@ sub set_counters {
],
}
},
{ label => 'nbchilds', set => {
{ label => 'nbchilds', nlabel => 'reverseproxy.child.count', set => {
key_values => [ { name => 'nbchilds' }, { name => 'display' } ],
output_template => 'Num childs : %s',
perfdatas => [

View File

@ -61,7 +61,7 @@ sub set_counters {
];
$self->{maps_counters}->{global} = [
{ label => 'total-usage', set => {
{ label => 'total-usage', nlabel => 'page.space.usage.bytes', set => {
key_values => [ { name => 'used' }, { name => 'total' } ],
closure_custom_calc => $self->can('custom_usage_calc'),
closure_custom_output => $self->can('custom_usage_output'),
@ -72,7 +72,7 @@ sub set_counters {
],
}
},
{ label => 'total-active', display_ok => 0, set => {
{ label => 'total-active', nlabel => 'page.space.active.count', display_ok => 0, set => {
key_values => [ { name => 'nactive' }, { name => 'ntotal' } ],
output_template => 'Total page space active : %s',
perfdatas => [
@ -84,7 +84,7 @@ sub set_counters {
];
$self->{maps_counters}->{swap} = [
{ label => 'usage', set => {
{ label => 'usage', nlabel => 'page.space.usage.bytes', set => {
key_values => [ { name => 'used' }, { name => 'total' }, { name => 'display' } ],
closure_custom_calc => $self->can('custom_usage_calc'),
closure_custom_output => $self->can('custom_usage_output'),