simplify class counters naming

This commit is contained in:
garnier-quentin 2020-05-13 14:18:28 +02:00 committed by Lotfi zaouche
parent 71e7f63f2b
commit 0dedcd2054
753 changed files with 4993 additions and 5599 deletions

View File

@ -37,7 +37,7 @@ sub set_counters {
key_values => [ { name => 'backlog' } ],
output_template => 'Backlog File Count : %s',
perfdatas => [
{ label => 'backlog', value => 'backlog_absolute', template => '%s', min => 0 },
{ label => 'backlog', value => 'backlog', template => '%s', min => 0 },
],
}
},

View File

@ -178,7 +178,7 @@ sub set_counters {
key_values => [ { name => 'hostsRemoteInstallFailed' } ],
output_template => '%d failed remote installation(s)',
perfdatas => [
{ label => 'failed', value => 'hostsRemoteInstallFailed_absolute', template => '%d', min => 0 },
{ label => 'failed', value => 'hostsRemoteInstallFailed', template => '%d', min => 0 },
],
}
},

View File

@ -60,7 +60,7 @@ sub set_counters {
key_values => [ { name => 'criticalEventsCount' } ],
output_template => '%d critical event(s)',
perfdatas => [
{ label => 'events', value => 'criticalEventsCount_absolute', template => '%d', min => 0 },
{ label => 'events', value => 'criticalEventsCount', template => '%d', min => 0 },
],
}
},

View File

@ -60,7 +60,7 @@ sub set_counters {
key_values => [ { name => 'hostsNotScannedLately' } ],
output_template => '%d hosts(s) has not been scanned lately',
perfdatas => [
{ label => 'not_scanned', value => 'hostsNotScannedLately_absolute', template => '%d', min => 0 },
{ label => 'not_scanned', value => 'hostsNotScannedLately', template => '%d', min => 0 },
],
}
},

View File

@ -60,7 +60,7 @@ sub set_counters {
key_values => [ { name => 'hostsFound' } ],
output_template => '%d new host(s) found',
perfdatas => [
{ label => 'new_hosts', value => 'hostsFound_absolute', template => '%d', min => 0 },
{ label => 'new_hosts', value => 'hostsFound', template => '%d', min => 0 },
],
}
},
@ -68,7 +68,7 @@ sub set_counters {
key_values => [ { name => 'groupsCount' } ],
output_template => '%d group(s) on the server',
perfdatas => [
{ label => 'groups', value => 'groupsCount_absolute', template => '%d', min => 0 },
{ label => 'groups', value => 'groupsCount', template => '%d', min => 0 },
],
}
},
@ -76,7 +76,7 @@ sub set_counters {
key_values => [ { name => 'hostsNotConnectedLongTime' } ],
output_template => '%d host(s) has not connected for a long time',
perfdatas => [
{ label => 'not_connected_long_time', value => 'hostsNotConnectedLongTime_absolute', template => '%d', min => 0 },
{ label => 'not_connected_long_time', value => 'hostsNotConnectedLongTime', template => '%d', min => 0 },
],
}
},
@ -84,7 +84,7 @@ sub set_counters {
key_values => [ { name => 'hostsControlLost' } ],
output_template => '%d host(s) are not controlled',
perfdatas => [
{ label => 'not_controlled', value => 'hostsControlLost_absolute', template => '%d', min => 0 },
{ label => 'not_controlled', value => 'hostsControlLost', template => '%d', min => 0 },
],
}
},

View File

@ -60,7 +60,7 @@ sub set_counters {
key_values => [ { name => 'hostsAntivirusNotRunning' } ],
output_template => '%d host(s) without running antivirus',
perfdatas => [
{ label => 'no_antivirus', value => 'hostsAntivirusNotRunning_absolute', template => '%d', min => 0 },
{ label => 'no_antivirus', value => 'hostsAntivirusNotRunning', template => '%d', min => 0 },
],
}
},
@ -68,7 +68,7 @@ sub set_counters {
key_values => [ { name => 'hostsRealtimeNotRunning' } ],
output_template => '%d hosts(s) without running real time protection',
perfdatas => [
{ label => 'no_real_time', value => 'hostsRealtimeNotRunning_absolute', template => '%d', min => 0 },
{ label => 'no_real_time', value => 'hostsRealtimeNotRunning', template => '%d', min => 0 },
],
}
},
@ -76,7 +76,7 @@ sub set_counters {
key_values => [ { name => 'hostsRealtimeLevelChanged' } ],
output_template => '%d host(s) with not acceptable level of real time protection',
perfdatas => [
{ label => 'not_acceptable_level', value => 'hostsRealtimeLevelChanged_absolute', template => '%d', min => 0 },
{ label => 'not_acceptable_level', value => 'hostsRealtimeLevelChanged', template => '%d', min => 0 },
],
}
},
@ -84,7 +84,7 @@ sub set_counters {
key_values => [ { name => 'hostsNotCuredObject' } ],
output_template => '%d host(s) with not cured objects',
perfdatas => [
{ label => 'not_cured_objects', value => 'hostsNotCuredObject_absolute', template => '%d', min => 0 },
{ label => 'not_cured_objects', value => 'hostsNotCuredObject', template => '%d', min => 0 },
],
}
},
@ -92,7 +92,7 @@ sub set_counters {
key_values => [ { name => 'hostsTooManyThreats' } ],
output_template => '%d host(s) with too many threats',
perfdatas => [
{ label => 'too_many_threats', value => 'hostsTooManyThreats_absolute', template => '%d', min => 0 },
{ label => 'too_many_threats', value => 'hostsTooManyThreats', template => '%d', min => 0 },
],
}
},

View File

@ -124,7 +124,7 @@ sub set_counters {
key_values => [ { name => 'hostsNotUpdated' } ],
output_template => '%d host(s) not up to date',
perfdatas => [
{ label => 'not_updated', value => 'hostsNotUpdated_absolute', template => '%d', min => 0 }
{ label => 'not_updated', value => 'hostsNotUpdated', template => '%d', min => 0 }
]
}
}

View File

@ -38,7 +38,7 @@ sub set_counters {
key_values => [ { name => 'stClientCount' } ],
output_template => 'Connected clients: %d',
perfdatas => [
{ label => 'connected_clients', value => 'stClientCount_absolute', template => '%d',
{ label => 'connected_clients', value => 'stClientCount', template => '%d',
min => 0, unit => 'clients' },
],
}
@ -47,7 +47,7 @@ sub set_counters {
key_values => [ { name => 'stConnectedSockets' } ],
output_template => 'Open network sockets: %d',
perfdatas => [
{ label => 'open_sockets', value => 'stConnectedSockets_absolute', template => '%d',
{ label => 'open_sockets', value => 'stConnectedSockets', template => '%d',
min => 0, unit => 'sockets' },
],
}

View File

@ -35,52 +35,42 @@ sub set_counters {
$self->{maps_counters}->{global} = [
{ label => 'legitimate', set => {
key_values => [ { name => 'stConnectionsLegitimate', diff => 1 } ],
key_values => [ { name => 'stConnectionsLegitimate', per_second => 1 } ],
output_template => 'Legitimate: %d',
per_second => 1,
perfdatas => [
{ label => 'legitimate_connections', value => 'stConnectionsLegitimate_per_second', template => '%d',
min => 0, unit => 'connections/s' },
{ label => 'legitimate_connections', template => '%d', min => 0, unit => 'connections/s' },
],
}
},
{ label => 'blocked', set => {
key_values => [ { name => 'stConnectionsBlocked', diff => 1 } ],
key_values => [ { name => 'stConnectionsBlocked', per_second => 1 } ],
output_template => 'Blocked: %d',
per_second => 1,
perfdatas => [
{ label => 'blocked_connections', value => 'stConnectionsBlocked_per_second', template => '%d',
min => 0, unit => 'connections/s' },
{ label => 'blocked_connections', template => '%d', min => 0, unit => 'connections/s' },
],
}
},
{ label => 'blocked-by-am', set => {
key_values => [ { name => 'stBlockedByAntiMalware', diff => 1 } ],
key_values => [ { name => 'stBlockedByAntiMalware', per_second => 1 } ],
output_template => 'Blocked by Anti Malware: %d',
per_second => 1,
perfdatas => [
{ label => 'blocked_by_am', value => 'stBlockedByAntiMalware_per_second', template => '%d',
min => 0, unit => 'connections/s' },
{ label => 'blocked_by_am', template => '%d', min => 0, unit => 'connections/s' },
],
}
},
{ label => 'blocked-by-mf', set => {
key_values => [ { name => 'stBlockedByMediaFilter', diff => 1 } ],
key_values => [ { name => 'stBlockedByMediaFilter', per_second => 1 } ],
output_template => 'Blocked by Media Filter: %d',
per_second => 1,
perfdatas => [
{ label => 'blocked_by_mf', value => 'stBlockedByMediaFilter_per_second', template => '%d',
min => 0, unit => 'connections/s' },
{ label => 'blocked_by_mf', template => '%d', min => 0, unit => 'connections/s' },
],
}
},
{ label => 'blocked-by-uf', set => {
key_values => [ { name => 'stBlockedByURLFilter', diff => 1 } ],
key_values => [ { name => 'stBlockedByURLFilter', per_second => 1 } ],
output_template => 'Blocked by URL Filter: %d',
per_second => 1,
perfdatas => [
{ label => 'blocked_by_uf', value => 'stBlockedByURLFilter_per_second', template => '%d',
min => 0, unit => 'connections/s' },
{ label => 'blocked_by_uf', template => '%d', min => 0, unit => 'connections/s' },
],
}
},
@ -98,16 +88,10 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, statefile => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-counters:s" => { name => 'filter_counters', default => '' },
});
return $self;
}
$options{options}->add_options(arguments => {
});
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
return $self;
}
my $oid_stConnectionsLegitimate = '.1.3.6.1.4.1.1230.2.7.2.1.3.0';

View File

@ -37,28 +37,25 @@ sub set_counters {
$self->{maps_counters}->{global} = [
{ label => 'malware-detected', set => {
key_values => [ { name => 'stMalwareDetected', diff => 1 } ],
key_values => [ { name => 'stMalwareDetected', per_second => 1 } ],
output_template => 'Malware detected (per sec): %d',
per_second => 1,
perfdatas => [
{ label => 'malware_detected', value => 'stMalwareDetected_per_second', template => '%d',
min => 0, unit => 'detections/s' },
],
{ label => 'malware_detected', template => '%d', min => 0, unit => 'detections/s' }
]
}
},
}
];
$self->{maps_counters}->{categories} = [
{ label => 'category', set => {
key_values => [ { name => 'stCategoryCount', diff => 1 }, { name => 'stCategoryName' } ],
key_values => [ { name => 'stCategoryCount', per_second => 1 }, { name => 'stCategoryName' } ],
output_template => 'detections (per sec): %d',
per_second => 1,
perfdatas => [
{ label => 'category', value => 'stCategoryCount_per_second', template => '%d',
{ label => 'category', template => '%d',
min => 0, unit => 'detections/s', label_extra_instance => 1,
instance_use => 'stCategoryName_absolute' },
],
instance_use => 'stCategoryName' }
]
}
},
}
];
}
@ -73,17 +70,11 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, statefile => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
"filter-counters:s" => { name => 'filter_counters', default => '' },
});
return $self;
}
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' }
});
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
return $self;
}
my $oid_stMalwareDetected = '.1.3.6.1.4.1.1230.2.7.2.1.2.0';

View File

@ -35,46 +35,38 @@ sub set_counters {
$self->{maps_counters}->{traffics} = [
{ label => 'client-to-proxy', set => {
key_values => [ { name => 'stFtpBytesFromClient', diff => 1 } ],
key_values => [ { name => 'stFtpBytesFromClient', per_second => 1 } ],
output_template => 'from client to proxy: %s %s/s',
output_change_bytes => 2,
per_second => 1,
perfdatas => [
{ label => 'ftp_traffic_client_to_proxy', value => 'stFtpBytesFromClient_per_second', template => '%d',
min => 0, unit => 'b/s' },
{ label => 'ftp_traffic_client_to_proxy', template => '%d', min => 0, unit => 'b/s' },
],
}
},
{ label => 'server-to-proxy', set => {
key_values => [ { name => 'stFtpBytesFromServer', diff => 1 } ],
key_values => [ { name => 'stFtpBytesFromServer', per_second => 1 } ],
output_template => 'from server to proxy: %s %s/s',
output_change_bytes => 2,
per_second => 1,
perfdatas => [
{ label => 'ftp_traffic_server_to_proxy', value => 'stFtpBytesFromServer_per_second', template => '%d',
min => 0, unit => 'b/s' },
{ label => 'ftp_traffic_server_to_proxy', template => '%d', min => 0, unit => 'b/s' },
],
}
},
{ label => 'proxy-to-client', set => {
key_values => [ { name => 'stFtpBytesToClient', diff => 1 } ],
key_values => [ { name => 'stFtpBytesToClient', per_second => 1 } ],
output_template => 'from proxy to client: %s %s/s',
output_change_bytes => 2,
per_second => 1,
perfdatas => [
{ label => 'ftp_traffic_proxy_to_client', value => 'stFtpBytesToClient_per_second', template => '%d',
min => 0, unit => 'b/s' },
{ label => 'ftp_traffic_proxy_to_client', template => '%d', min => 0, unit => 'b/s' },
],
}
},
{ label => 'proxy-to-server', set => {
key_values => [ { name => 'stFtpBytesToServer', diff => 1 } ],
key_values => [ { name => 'stFtpBytesToServer', per_second => 1 } ],
output_template => 'from proxy to server: %s %s/s',
output_change_bytes => 2,
per_second => 1,
perfdatas => [
{ label => 'ftp_traffic_proxy_to_server', value => 'stFtpBytesToServer_per_second', template => '%d',
min => 0, unit => 'b/s' },
{ label => 'ftp_traffic_proxy_to_server', template => '%d', min => 0, unit => 'b/s' },
],
}
},
@ -92,16 +84,10 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, statefile => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-counters:s" => { name => 'filter_counters', default => '' },
});
return $self;
}
$options{options}->add_options(arguments => {
});
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
return $self;
}
my $oid_stFtpBytesFromClient = '.1.3.6.1.4.1.1230.2.7.2.4.2.0';

View File

@ -36,58 +36,48 @@ sub set_counters {
$self->{maps_counters}->{global} = [
{ label => 'requests', set => {
key_values => [ { name => 'stHttpsRequests', diff => 1 } ],
key_values => [ { name => 'stHttpsRequests', per_second => 1 } ],
output_template => 'HTTPS Requests (per sec): %d',
per_second => 1,
perfdatas => [
{ label => 'https_requests', value => 'stHttpsRequests_per_second', template => '%d',
min => 0, unit => 'requests/s' },
{ label => 'https_requests', template => '%d', min => 0, unit => 'requests/s' },
],
}
},
];
$self->{maps_counters}->{traffics} = [
{ label => 'client-to-proxy', set => {
key_values => [ { name => 'stHttpsBytesFromClient', diff => 1 } ],
key_values => [ { name => 'stHttpsBytesFromClient', per_second => 1 } ],
output_template => 'from client to proxy: %s %s/s',
output_change_bytes => 2,
per_second => 1,
perfdatas => [
{ label => 'https_traffic_client_to_proxy', value => 'stHttpsBytesFromClient_per_second', template => '%d',
min => 0, unit => 'b/s' },
{ label => 'https_traffic_client_to_proxy', template => '%d', min => 0, unit => 'b/s' },
],
}
},
{ label => 'server-to-proxy', set => {
key_values => [ { name => 'stHttpsBytesFromServer', diff => 1 } ],
key_values => [ { name => 'stHttpsBytesFromServer', per_second => 1 } ],
output_template => 'from server to proxy: %s %s/s',
output_change_bytes => 2,
per_second => 1,
perfdatas => [
{ label => 'https_traffic_server_to_proxy', value => 'stHttpsBytesFromServer_per_second', template => '%d',
min => 0, unit => 'b/s' },
{ label => 'https_traffic_server_to_proxy', template => '%d', min => 0, unit => 'b/s' },
],
}
},
{ label => 'proxy-to-client', set => {
key_values => [ { name => 'stHttpsBytesToClient', diff => 1 } ],
key_values => [ { name => 'stHttpsBytesToClient', per_second => 1 } ],
output_template => 'from proxy to client: %s %s/s',
output_change_bytes => 2,
per_second => 1,
perfdatas => [
{ label => 'https_traffic_proxy_to_client', value => 'stHttpsBytesToClient_per_second', template => '%d',
min => 0, unit => 'b/s' },
{ label => 'https_traffic_proxy_to_client', template => '%d', min => 0, unit => 'b/s' },
],
}
},
{ label => 'proxy-to-server', set => {
key_values => [ { name => 'stHttpsBytesToServer', diff => 1 } ],
key_values => [ { name => 'stHttpsBytesToServer', per_second => 1 } ],
output_template => 'from proxy to server: %s %s/s',
output_change_bytes => 2,
per_second => 1,
perfdatas => [
{ label => 'https_traffic_proxy_to_server', value => 'stHttpsBytesToServer_per_second', template => '%d',
min => 0, unit => 'b/s' },
{ label => 'https_traffic_proxy_to_server', template => '%d', min => 0, unit => 'b/s' },
],
}
},
@ -105,16 +95,10 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, statefile => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-counters:s" => { name => 'filter_counters', default => '' },
});
return $self;
}
$options{options}->add_options(arguments => {
});
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
return $self;
}
my $oid_stHttpsRequests = '.1.3.6.1.4.1.1230.2.7.2.3.1.0';

View File

@ -36,61 +36,52 @@ sub set_counters {
$self->{maps_counters}->{global} = [
{ label => 'requests', set => {
key_values => [ { name => 'stHttpRequests', diff => 1 } ],
key_values => [ { name => 'stHttpRequests', per_second => 1 } ],
output_template => 'HTTP Requests (per sec): %d',
per_second => 1,
perfdatas => [
{ label => 'http_requests', value => 'stHttpRequests_per_second', template => '%d',
min => 0, unit => 'requests/s' },
],
{ label => 'http_requests', template => '%d', min => 0, unit => 'requests/s' }
]
}
},
}
];
$self->{maps_counters}->{traffics} = [
{ label => 'client-to-proxy', set => {
key_values => [ { name => 'stHttpBytesFromClient', diff => 1 } ],
key_values => [ { name => 'stHttpBytesFromClient', per_second => 1 } ],
output_template => 'from client to proxy: %s %s/s',
output_change_bytes => 2,
per_second => 1,
perfdatas => [
{ label => 'http_traffic_client_to_proxy', value => 'stHttpBytesFromClient_per_second', template => '%d',
min => 0, unit => 'b/s' },
],
{ label => 'http_traffic_client_to_proxy', template => '%d', min => 0, unit => 'b/s' }
]
}
},
{ label => 'server-to-proxy', set => {
key_values => [ { name => 'stHttpBytesFromServer', diff => 1 } ],
key_values => [ { name => 'stHttpBytesFromServer', per_second => 1 } ],
output_template => 'from server to proxy: %s %s/s',
output_change_bytes => 2,
per_second => 1,
perfdatas => [
{ label => 'http_traffic_server_to_proxy', value => 'stHttpBytesFromServer_per_second', template => '%d',
min => 0, unit => 'b/s' },
],
{ label => 'http_traffic_server_to_proxy', template => '%d', min => 0, unit => 'b/s' }
]
}
},
{ label => 'proxy-to-client', set => {
key_values => [ { name => 'stHttpBytesToClient', diff => 1 } ],
key_values => [ { name => 'stHttpBytesToClient', per_second => 1 } ],
output_template => 'from proxy to client: %s %s/s',
output_change_bytes => 2,
per_second => 1,
perfdatas => [
{ label => 'http_traffic_proxy_to_client', value => 'stHttpBytesToClient_per_second', template => '%d',
min => 0, unit => 'b/s' },
],
{ label => 'http_traffic_proxy_to_client', template => '%d', min => 0, unit => 'b/s' }
]
}
},
{ label => 'proxy-to-server', set => {
key_values => [ { name => 'stHttpBytesToServer', diff => 1 } ],
key_values => [ { name => 'stHttpBytesToServer', per_second => 1 } ],
output_template => 'from proxy to server: %s %s/s',
output_change_bytes => 2,
per_second => 1,
perfdatas => [
{ label => 'http_traffic_proxy_to_server', value => 'stHttpBytesToServer_per_second', template => '%d',
min => 0, unit => 'b/s' },
],
{ label => 'http_traffic_proxy_to_server', template => '%d', min => 0, unit => 'b/s' }
]
}
},
}
];
}
@ -105,16 +96,10 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, statefile => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-counters:s" => { name => 'filter_counters', default => '' },
});
return $self;
}
$options{options}->add_options(arguments => {
});
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
return $self;
}
my $oid_stHttpRequests = '.1.3.6.1.4.1.1230.2.7.2.2.1.0';

View File

@ -37,7 +37,7 @@ sub set_counters {
key_values => [ { name => 'hosts_total' } ],
output_template => 'Hosts Total: %d',
perfdatas => [
{ value => 'hosts_total_absolute', template => '%d', min => 0 },
{ value => 'hosts_total', template => '%d', min => 0 },
],
}
},
@ -45,8 +45,8 @@ sub set_counters {
key_values => [ { name => 'hosts_failed' },{ name => 'hosts_total' } ],
output_template => 'Hosts Failed: %d',
perfdatas => [
{ value => 'hosts_failed_absolute', template => '%d', min => 0,
max => 'hosts_total_absolute' },
{ value => 'hosts_failed', template => '%d', min => 0,
max => 'hosts_total' },
],
}
},
@ -54,7 +54,7 @@ sub set_counters {
key_values => [ { name => 'inventories_total' } ],
output_template => 'Inventories Total: %d',
perfdatas => [
{ value => 'inventories_total_absolute', template => '%d', min => 0 },
{ value => 'inventories_total', template => '%d', min => 0 },
],
}
},
@ -62,8 +62,8 @@ sub set_counters {
key_values => [ { name => 'inventories_sync_failed' }, { name => 'inventories_total' } ],
output_template => 'Inventories Sync Failed: %d',
perfdatas => [
{ value => 'inventories_sync_failed_absolute', template => '%d', min => 0,
max => 'inventories_total_absolute' },
{ value => 'inventories_sync_failed', template => '%d', min => 0,
max => 'inventories_total' },
],
}
},
@ -71,7 +71,7 @@ sub set_counters {
key_values => [ { name => 'projects_total' } ],
output_template => 'Projects Total: %d',
perfdatas => [
{ value => 'projects_total_absolute', template => '%d', min => 0 },
{ value => 'projects_total', template => '%d', min => 0 },
],
}
},
@ -79,8 +79,8 @@ sub set_counters {
key_values => [ { name => 'projects_sync_failed' }, { name => 'projects_total' } ],
output_template => 'Projects Sync Failed: %d',
perfdatas => [
{ value => 'projects_sync_failed_absolute', template => '%d', min => 0,
max => 'projects_total_absolute' },
{ value => 'projects_sync_failed', template => '%d', min => 0,
max => 'projects_total' },
],
}
},

View File

@ -39,7 +39,7 @@ sub set_counters {
key_values => [ { name => 'total' } ],
output_template => 'Total: %d',
perfdatas => [
{ value => 'total_absolute', template => '%d', min => 0 },
{ value => 'total', template => '%d', min => 0 },
],
}
},
@ -47,8 +47,8 @@ sub set_counters {
key_values => [ { name => 'failed' }, { name => 'total' } ],
output_template => 'Failed: %d',
perfdatas => [
{ value => 'failed_absolute', template => '%d', min => 0,
max => 'total_absolute' },
{ value => 'failed', template => '%d', min => 0,
max => 'total' },
],
}
},
@ -58,8 +58,8 @@ sub set_counters {
key_values => [ { name => 'total_hosts' }, { name => 'display' } ],
output_template => 'Hosts total: %d',
perfdatas => [
{ value => 'total_hosts_absolute', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ value => 'total_hosts', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -68,9 +68,9 @@ sub set_counters {
{ name => 'display' } ],
output_template => 'Hosts failed: %d',
perfdatas => [
{ value => 'hosts_with_active_failures_absolute', template => '%d',
min => 0, max => 'total_hosts_absolute', label_extra_instance => 1,
instance_use => 'display_absolute' },
{ value => 'hosts_with_active_failures', template => '%d',
min => 0, max => 'total_hosts', label_extra_instance => 1,
instance_use => 'display' },
],
}
},
@ -78,8 +78,8 @@ sub set_counters {
key_values => [ { name => 'total_inventory_sources' }, { name => 'display' } ],
output_template => 'Sources total: %d',
perfdatas => [
{ value => 'total_inventory_sources_absolute', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ value => 'total_inventory_sources', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -88,9 +88,9 @@ sub set_counters {
{ name => 'display' } ],
output_template => 'Sources failed: %d',
perfdatas => [
{ value => 'inventory_sources_with_failures_absolute', template => '%d',
min => 0, max => 'total_inventory_sources_absolute', label_extra_instance => 1,
instance_use => 'display_absolute' },
{ value => 'inventory_sources_with_failures', template => '%d',
min => 0, max => 'total_inventory_sources', label_extra_instance => 1,
instance_use => 'display' },
],
}
},
@ -98,8 +98,8 @@ sub set_counters {
key_values => [ { name => 'total_groups' }, { name => 'display' } ],
output_template => 'Groups total: %d',
perfdatas => [
{ value => 'total_groups_absolute', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ value => 'total_groups', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -108,9 +108,9 @@ sub set_counters {
{ name => 'display' } ],
output_template => 'Groups failed: %d',
perfdatas => [
{ value => 'groups_with_active_failures_absolute', template => '%d',
min => 0, max => 'total_groups_absolute', label_extra_instance => 1,
instance_use => 'display_absolute' },
{ value => 'groups_with_active_failures', template => '%d',
min => 0, max => 'total_groups', label_extra_instance => 1,
instance_use => 'display' },
],
}
},

View File

@ -82,7 +82,7 @@ sub set_counters {
key_values => [ { name => 'total' } ],
output_template => 'total jobs : %s',
perfdatas => [
{ label => 'total', value => 'total_absolute', template => '%s', min => 0 },
{ label => 'total', value => 'total', template => '%s', min => 0 },
],
}
},

View File

@ -53,7 +53,7 @@ sub set_counters {
key_values => [ { name => 'total' } ],
output_template => 'total jobs : %s',
perfdatas => [
{ label => 'total', value => 'total_absolute', template => '%s', min => 0 },
{ label => 'total', value => 'total', template => '%s', min => 0 },
],
}
},

View File

@ -46,9 +46,9 @@ sub custom_usage_threshold {
my ($self, %options) = @_;
if (!defined($self->{instance_mode}->{option_results}->{'critical-usage'}) || $self->{instance_mode}->{option_results}->{'critical-usage'} eq '') {
$self->{perfdata}->threshold_validate(label => 'critical-usage', value => $self->{result_values}->{watermark_absolute});
$self->{perfdata}->threshold_validate(label => 'critical-usage', value => $self->{result_values}->{watermark});
}
return $self->{perfdata}->threshold_check(value => $self->{result_values}->{usage_absolute}, threshold => [ { label => 'critical-' . $self->{label}, exit_litteral => 'critical' }, { label => 'warning-'. $self->{label}, exit_litteral => 'warning' } ]);
return $self->{perfdata}->threshold_check(value => $self->{result_values}->{usage}, threshold => [ { label => 'critical-' . $self->{label}, exit_litteral => 'critical' }, { label => 'warning-'. $self->{label}, exit_litteral => 'warning' } ]);
}
sub set_counters {
@ -72,8 +72,8 @@ sub set_counters {
output_template => 'Use: %s %%',
closure_custom_threshold_check => $self->can('custom_usage_threshold'),
perfdatas => [
{ label => 'used', value => 'usage_absolute', template => '%s',
unit => '%', min => 0, max => 100, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'used', value => 'usage', template => '%s',
unit => '%', min => 0, max => 100, label_extra_instance => 1, instance_use => 'display' },
],
}
},

View File

@ -38,8 +38,8 @@ sub set_counters {
key_values => [ { name => 'num_cleaning' }, { name => 'total' } ],
output_template => '%d drives needs a reset mount time',
perfdatas => [
{ label => 'cleaning', value => 'num_cleaning_absolute', template => '%s',
min => 0, max => 'total_absolute' },
{ label => 'cleaning', value => 'num_cleaning', template => '%s',
min => 0, max => 'total' },
],
}
},

View File

@ -159,7 +159,7 @@ sub set_counters {
key_values => [ { name => 'total' } ],
output_template => 'Total Jobs : %s',
perfdatas => [
{ label => 'total', value => 'total_absolute', template => '%s', min => 0 },
{ label => 'total', value => 'total', template => '%s', min => 0 },
],
}
},

View File

@ -122,7 +122,7 @@ sub set_counters {
key_values => [ { name => 'count' } ],
output_template => 'Number of tapes : %s',
perfdatas => [
{ label => 'count', value => 'count_absolute', template => '%s',
{ label => 'count', value => 'count', template => '%s',
unit => 'tapes', min => 0 },
],
}

View File

@ -46,7 +46,7 @@ sub set_counters {
key_values => [ { name => 'total' } ],
output_template => 'total agents: %d',
perfdatas => [
{ value => 'total_absolute', template => '%d', min => 0 },
{ value => 'total', template => '%d', min => 0 },
],
}
},
@ -65,8 +65,8 @@ sub set_counters {
key_values => [ { name => 'recovery_points' }, { name => 'display' } ],
output_template => 'recovery points: %s',
perfdatas => [
{ value => 'recovery_points_absolute', template => '%s', min => 0,
label_extra_instance => 1, instance_use => 'display_absolute' },
{ value => 'recovery_points', template => '%s', min => 0,
label_extra_instance => 1, instance_use => 'display' },
],
}
},

View File

@ -38,11 +38,11 @@ sub custom_space_output {
my $msg = sprintf(
"space total: %s %s used: %s %s (%.2f%%) free: %s %s (%.2f%%)",
$self->{perfdata}->change_bytes(value => $self->{result_values}->{total_absolute}),
$self->{perfdata}->change_bytes(value => $self->{result_values}->{used_absolute}),
$self->{result_values}->{prct_used_absolute},
$self->{perfdata}->change_bytes(value => $self->{result_values}->{free_absolute}),
$self->{result_values}->{prct_free_absolute}
$self->{perfdata}->change_bytes(value => $self->{result_values}->{total}),
$self->{perfdata}->change_bytes(value => $self->{result_values}->{used}),
$self->{result_values}->{prct_used},
$self->{perfdata}->change_bytes(value => $self->{result_values}->{free}),
$self->{result_values}->{prct_free}
);
return $msg;
}
@ -67,8 +67,8 @@ sub set_counters {
key_values => [ { name => 'used' }, { name => 'free' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' }, { name => 'display' } ],
closure_custom_output => $self->can('custom_space_output'),
perfdatas => [
{ value => 'used_absolute', template => '%d', min => 0, max => 'total_absolute',
unit => 'B', cast_int => 1, label_extra_instance => 1, instance_use => 'display_absolute' },
{ value => 'used', template => '%d', min => 0, max => 'total',
unit => 'B', cast_int => 1, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -76,8 +76,8 @@ sub set_counters {
key_values => [ { name => 'free' }, { name => 'used' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' }, { name => 'display' } ],
closure_custom_output => $self->can('custom_space_output'),
perfdatas => [
{ value => 'free_absolute', template => '%d', min => 0, max => 'total_absolute',
unit => 'B', cast_int => 1, label_extra_instance => 1, instance_use => 'display_absolute' },
{ value => 'free', template => '%d', min => 0, max => 'total',
unit => 'B', cast_int => 1, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -85,8 +85,8 @@ sub set_counters {
key_values => [ { name => 'prct_used' }, { name => 'display' } ],
output_template => 'space used: %.2f %%',
perfdatas => [
{ value => 'prct_used_absolute', template => '%.2f', min => 0, max => 100, unit => '%',
label_extra_instance => 1, instance_use => 'display_absolute' },
{ value => 'prct_used', template => '%.2f', min => 0, max => 100, unit => '%',
label_extra_instance => 1, instance_use => 'display' },
],
}
},

View File

@ -37,7 +37,7 @@ sub set_counters {
key_values => [ { name => 'online' } ],
output_template => 'online : %s',
perfdatas => [
{ label => 'online', value => 'online_absolute', template => '%s', min => 0 },
{ label => 'online', value => 'online', template => '%s', min => 0 },
],
}
},
@ -45,7 +45,7 @@ sub set_counters {
key_values => [ { name => 'offline' } ],
output_template => 'offline : %s',
perfdatas => [
{ label => 'offline', value => 'offline_absolute', template => '%s', min => 0 },
{ label => 'offline', value => 'offline', template => '%s', min => 0 },
],
}
},
@ -53,7 +53,7 @@ sub set_counters {
key_values => [ { name => 'unavailable' } ],
output_template => 'unavailable : %s',
perfdatas => [
{ label => 'unavailable', value => 'unavailable_absolute', template => '%s', min => 0 },
{ label => 'unavailable', value => 'unavailable', template => '%s', min => 0 },
],
}
},
@ -61,7 +61,7 @@ sub set_counters {
key_values => [ { name => 'empty' } ],
output_template => 'empty : %s',
perfdatas => [
{ label => 'empty', value => 'empty_absolute', template => '%s', min => 0 },
{ label => 'empty', value => 'empty', template => '%s', min => 0 },
],
}
},
@ -69,7 +69,7 @@ sub set_counters {
key_values => [ { name => 'loaded' } ],
output_template => 'loaded : %s',
perfdatas => [
{ label => 'loaded', value => 'loaded_absolute', template => '%s', min => 0 },
{ label => 'loaded', value => 'loaded', template => '%s', min => 0 },
],
}
},
@ -77,7 +77,7 @@ sub set_counters {
key_values => [ { name => 'unloaded' } ],
output_template => 'unloaded : %s',
perfdatas => [
{ label => 'unloaded', value => 'unloaded_absolute', template => '%s', min => 0 },
{ label => 'unloaded', value => 'unloaded', template => '%s', min => 0 },
],
}
},
@ -85,7 +85,7 @@ sub set_counters {
key_values => [ { name => 'reserved' } ],
output_template => 'reserved : %s',
perfdatas => [
{ label => 'reserved', value => 'reserved_absolute', template => '%s', min => 0 },
{ label => 'reserved', value => 'reserved', template => '%s', min => 0 },
],
}
},
@ -93,7 +93,7 @@ sub set_counters {
key_values => [ { name => 'unknown' } ],
output_template => 'unknown : %s',
perfdatas => [
{ label => 'unknown', value => 'unknown_absolute', template => '%s', min => 0 },
{ label => 'unknown', value => 'unknown', template => '%s', min => 0 },
],
}
},

View File

@ -37,7 +37,7 @@ sub set_counters {
key_values => [ { name => 'associated' } ],
output_template => 'Total Associated Nodes : %s',
perfdatas => [
{ label => 'associated', value => 'associated_absolute', template => '%s', min => 0 },
{ label => 'associated', value => 'associated', template => '%s', min => 0 },
],
}
},
@ -45,7 +45,7 @@ sub set_counters {
key_values => [ { name => 'non_associated' } ],
output_template => 'Total Non Associated Nodes : %s',
perfdatas => [
{ label => 'non_associated', value => 'non_associated_absolute', template => '%s', min => 0 },
{ label => 'non_associated', value => 'non_associated', template => '%s', min => 0 },
],
}
},
@ -53,7 +53,7 @@ sub set_counters {
key_values => [ { name => 'locked' } ],
output_template => 'Total Locked Nodes : %s',
perfdatas => [
{ label => 'locked', value => 'locked_absolute', template => '%s', min => 0 },
{ label => 'locked', value => 'locked', template => '%s', min => 0 },
],
}
},

View File

@ -61,7 +61,7 @@ sub set_counters {
key_values => [ { name => 'total' } ],
output_template => 'Total Sessions : %s',
perfdatas => [
{ label => 'total', value => 'total_absolute', template => '%s', min => 0 },
{ label => 'total', value => 'total', template => '%s', min => 0 },
],
}
},

View File

@ -38,7 +38,7 @@ sub set_counters {
key_values => [ { name => 'total' } ],
output_template => 'Volumes Total : %s',
perfdatas => [
{ label => 'total', value => 'total_absolute', template => '%s', min => 0 },
{ label => 'total', value => 'total', template => '%s', min => 0 },
],
}
},
@ -46,7 +46,7 @@ sub set_counters {
key_values => [ { name => 'online' } ],
output_template => 'Online : %s',
perfdatas => [
{ label => 'online', value => 'online_absolute', template => '%s', min => 0 },
{ label => 'online', value => 'online', template => '%s', min => 0 },
],
}
},
@ -54,7 +54,7 @@ sub set_counters {
key_values => [ { name => 'offline' } ],
output_template => 'Offline : %s',
perfdatas => [
{ label => 'offline', value => 'offline_absolute', template => '%s', min => 0 },
{ label => 'offline', value => 'offline', template => '%s', min => 0 },
],
}
},
@ -62,7 +62,7 @@ sub set_counters {
key_values => [ { name => 'empty' } ],
output_template => 'Empty : %s',
perfdatas => [
{ label => 'empty', value => 'empty_absolute', template => '%s', min => 0 },
{ label => 'empty', value => 'empty', template => '%s', min => 0 },
],
}
},
@ -70,7 +70,7 @@ sub set_counters {
key_values => [ { name => 'pending' } ],
output_template => 'Pending : %s',
perfdatas => [
{ label => 'pending', value => 'pending_absolute', template => '%s', min => 0 },
{ label => 'pending', value => 'pending', template => '%s', min => 0 },
],
}
},
@ -78,7 +78,7 @@ sub set_counters {
key_values => [ { name => 'filling' } ],
output_template => 'Filling : %s',
perfdatas => [
{ label => 'filling', value => 'filling_absolute', template => '%s', min => 0 },
{ label => 'filling', value => 'filling', template => '%s', min => 0 },
],
}
},
@ -86,7 +86,7 @@ sub set_counters {
key_values => [ { name => 'full' } ],
output_template => 'Full : %s',
perfdatas => [
{ label => 'full', value => 'full_absolute', template => '%s', min => 0 },
{ label => 'full', value => 'full', template => '%s', min => 0 },
],
}
},
@ -97,8 +97,8 @@ sub set_counters {
key_values => [ { name => 'prct_utilized' }, { name => 'display' } ],
output_template => 'Usage : %s %%',
perfdatas => [
{ label => 'used', value => 'prct_utilized_absolute', template => '%s', min => 0, max => 100,
unit => '%', label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'used', value => 'prct_utilized', template => '%s', min => 0, max => 100,
unit => '%', label_extra_instance => 1, instance_use => 'display' },
],
}
},

View File

@ -69,7 +69,7 @@ sub set_counters {
key_values => [ { name => 'total' } ],
output_template => 'Total Jobs : %s',
perfdatas => [
{ label => 'total', value => 'total_absolute', template => '%s', min => 0 }
{ label => 'total', value => 'total', template => '%s', min => 0 }
]
}
}

View File

@ -54,7 +54,7 @@ sub set_counters {
key_values => [ { name => 'total' } ],
output_template => 'total jobs: %s',
perfdatas => [
{ value => 'total_absolute', template => '%s', min => 0 },
{ value => 'total', template => '%s', min => 0 },
],
}
},

View File

@ -59,7 +59,7 @@ sub set_counters {
key_values => [ { name => $map[$i]->[0], diff => 1 } ],
output_template => $map[$i]->[1],
perfdatas => [
{ label => $perf_label, value => $map[$i]->[0] . '_absolute', template => '%s', min => 0 },
{ label => $perf_label, value => $map[$i]->[0] , template => '%s', min => 0 },
],
}
};

View File

@ -63,8 +63,8 @@ sub set_counters {
key_values => [ { name => $map[$i]->[0], diff => 1 }, { name => 'display' } ],
output_template => $map[$i]->[1],
perfdatas => [
{ label => $perf_label, value => $map[$i]->[0] . '_absolute', template => '%s', min => 0,
label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => $perf_label, value => $map[$i]->[0] , template => '%s', min => 0,
label_extra_instance => 1, instance_use => 'display' },
],
}
};

View File

@ -45,7 +45,7 @@ sub set_counters {
key_values => [ { name => 'calls_success', diff => 1 } ],
output_template => 'success calls received: %s',
perfdatas => [
{ value => 'calls_success_absolute', template => '%s', min => 0 }
{ value => 'calls_success', template => '%s', min => 0 }
]
}
},
@ -53,7 +53,7 @@ sub set_counters {
key_values => [ { name => 'calls_failure', diff => 1 } ],
output_template => 'failure calls received: %s',
perfdatas => [
{ value => 'calls_failure_absolute', template => '%s', min => 0 }
{ value => 'calls_failure', template => '%s', min => 0 }
]
}
},
@ -61,7 +61,7 @@ sub set_counters {
key_values => [ { name => 'heartbeat_broadcast', diff => 1 } ],
output_template => 'broadcast heartbeat running: %s',
perfdatas => [
{ value => 'heartbeat_broadcast_absolute', template => '%s', min => 0 }
{ value => 'heartbeat_broadcast', template => '%s', min => 0 }
]
}
},
@ -69,7 +69,7 @@ sub set_counters {
key_values => [ { name => 'cluster_events', diff => 1 } ],
output_template => 'directory cluster events: %s',
perfdatas => [
{ value => 'cluster_events_absolute', template => '%s', min => 0 }
{ value => 'cluster_events', template => '%s', min => 0 }
]
}
},
@ -77,7 +77,7 @@ sub set_counters {
key_values => [ { name => 'request_handling_time_total', diff => 1 } ],
output_template => 'total request handling: %s ms',
perfdatas => [
{ value => 'request_handling_time_total_absolute', template => '%s', min => 0, unit => 'ms' }
{ value => 'request_handling_time_total', template => '%s', min => 0, unit => 'ms' }
]
}
},
@ -85,7 +85,7 @@ sub set_counters {
key_values => [ { name => 'request_handling_time_mean' } ],
output_template => 'mean request handling: %s ms',
perfdatas => [
{ value => 'request_handling_time_mean_absolute', template => '%s', min => 0, unit => 'ms' }
{ value => 'request_handling_time_mean', template => '%s', min => 0, unit => 'ms' }
]
}
}

View File

@ -46,7 +46,7 @@ sub set_counters {
output_template => 'total responses size: %s %s',
output_change_bytes => 1,
perfdatas => [
{ value => 'response_size_absolute', template => '%s', min => 0, unit => 'B' }
{ value => 'response_size', template => '%s', min => 0, unit => 'B' }
]
}
},
@ -54,7 +54,7 @@ sub set_counters {
key_values => [ { name => 'execution_total', diff => 1 } ],
output_template => 'total execution: %s ms',
perfdatas => [
{ value => 'execution_total_absolute', template => '%s', min => 0, unit => 'ms' }
{ value => 'execution_total', template => '%s', min => 0, unit => 'ms' }
]
}
},
@ -62,7 +62,7 @@ sub set_counters {
key_values => [ { name => 'execution_mean' } ],
output_template => 'mean execution: %s ms',
perfdatas => [
{ value => 'execution_mean_absolute', template => '%s', min => 0, unit => 'ms' }
{ value => 'execution_mean', template => '%s', min => 0, unit => 'ms' }
]
}
}

View File

@ -51,7 +51,7 @@ sub set_counters {
key_values => [ { name => 'auth_success', diff => 1 } ],
output_template => 'success authentication: %s',
perfdatas => [
{ value => 'auth_success_absolute', template => '%s', min => 0 }
{ value => 'auth_success', template => '%s', min => 0 }
]
}
},
@ -59,7 +59,7 @@ sub set_counters {
key_values => [ { name => 'auth_failure', diff => 1 } ],
output_template => 'failure authentication: %s',
perfdatas => [
{ value => 'auth_failure_absolute', template => '%s', min => 0 }
{ value => 'auth_failure', template => '%s', min => 0 }
]
}
},
@ -67,7 +67,7 @@ sub set_counters {
key_values => [ { name => 'requests_protected', diff => 1 } ],
output_template => 'protected requests: %s',
perfdatas => [
{ value => 'requests_protected_absolute', template => '%s', min => 0 }
{ value => 'requests_protected', template => '%s', min => 0 }
]
}
},
@ -75,7 +75,7 @@ sub set_counters {
key_values => [ { name => 'requests_maintenance', diff => 1 } ],
output_template => 'maintenance requests: %s',
perfdatas => [
{ value => 'requests_maintenance_absolute', template => '%s', min => 0 }
{ value => 'requests_maintenance', template => '%s', min => 0 }
]
}
}
@ -86,7 +86,7 @@ sub set_counters {
key_values => [ { name => 'requests_time_total', diff => 1 }, { name => 'display' } ],
output_template => 'total requests time: %s ms',
perfdatas => [
{ value => 'requests_time_total_absolute', template => '%s', min => 0, unit => 'ms', label_extra_instance => 1 }
{ value => 'requests_time_total', template => '%s', min => 0, unit => 'ms', label_extra_instance => 1 }
]
}
},
@ -94,7 +94,7 @@ sub set_counters {
key_values => [ { name => 'requests_time_mean' }, { name => 'display' } ],
output_template => 'mean requests time: %s ms',
perfdatas => [
{ value => 'requests_time_mean_absolute', template => '%s', min => 0, unit => 'ms', label_extra_instance => 1 }
{ value => 'requests_time_mean', template => '%s', min => 0, unit => 'ms', label_extra_instance => 1 }
]
}
},
@ -103,7 +103,7 @@ sub set_counters {
output_template => 'total requests size: %s %s',
output_change_bytes => 1,
perfdatas => [
{ value => 'requests_size_absolute', template => '%s', min => 0, unit => 'B' }
{ value => 'requests_size', template => '%s', min => 0, unit => 'B' }
]
}
},
@ -111,7 +111,7 @@ sub set_counters {
key_values => [ { name => 'requests', diff => 1 } ],
output_template => 'total requests: %s',
perfdatas => [
{ value => 'requests_absolute', template => '%s', min => 0 }
{ value => 'requests', template => '%s', min => 0 }
]
}
}

View File

@ -43,7 +43,7 @@ sub set_counters {
key_values => [ { name => 'active_connections' } ],
output_template => 'active connections: %s',
perfdatas => [
{ value => 'active_connections_absolute', template => '%s', min => 0 }
{ value => 'active_connections', template => '%s', min => 0 }
]
}
}

View File

@ -45,7 +45,7 @@ sub set_counters {
key_values => [ { name => 'active_connections' } ],
output_template => 'active connections: %s',
perfdatas => [
{ value => 'active_connections_absolute', template => '%s', min => 0 }
{ value => 'active_connections', template => '%s', min => 0 }
]
}
},
@ -53,7 +53,7 @@ sub set_counters {
key_values => [ { name => 'connections', diff => 1 } ],
output_template => 'total connections: %s',
perfdatas => [
{ value => 'connections_absolute', template => '%s', min => 0 }
{ value => 'connections', template => '%s', min => 0 }
]
}
},
@ -61,7 +61,7 @@ sub set_counters {
key_values => [ { name => 'deliveries_ok', diff => 1 } ],
output_template => 'success deliveries: %s',
perfdatas => [
{ value => 'deliveries_ok_absolute', template => '%s', min => 0 }
{ value => 'deliveries_ok', template => '%s', min => 0 }
]
}
},
@ -69,7 +69,7 @@ sub set_counters {
key_values => [ { name => 'deliveries_ko', diff => 1 } ],
output_template => 'failure deliveries: %s',
perfdatas => [
{ value => 'deliveries_ko_absolute', template => '%s', min => 0 }
{ value => 'deliveries_ko', template => '%s', min => 0 }
]
}
},
@ -78,7 +78,7 @@ sub set_counters {
output_template => 'total emails size: %s %s',
output_change_bytes => 1,
perfdatas => [
{ value => 'email_size_absolute', template => '%s', min => 0, unit => 'B' }
{ value => 'email_size', template => '%s', min => 0, unit => 'B' }
]
}
},
@ -86,7 +86,7 @@ sub set_counters {
key_values => [ { name => 'session_duration_total', diff => 1 } ],
output_template => 'total sessions duration: %s ms',
perfdatas => [
{ value => 'session_duration_total_absolute', template => '%s', min => 0, unit => 'ms' }
{ value => 'session_duration_total', template => '%s', min => 0, unit => 'ms' }
]
}
},
@ -94,7 +94,7 @@ sub set_counters {
key_values => [ { name => 'session_duration_mean' } ],
output_template => 'mean sessions duration: %s ms',
perfdatas => [
{ value => 'session_duration_mean_absolute', template => '%s', min => 0, unit => 'ms' }
{ value => 'session_duration_mean', template => '%s', min => 0, unit => 'ms' }
]
}
},
@ -102,7 +102,7 @@ sub set_counters {
key_values => [ { name => 'traffic_latency_total', diff => 1 } ],
output_template => 'total traffic transport latency: %s ms',
perfdatas => [
{ value => 'traffic_latency_total_absolute', template => '%s', min => 0, unit => 'ms' }
{ value => 'traffic_latency_total', template => '%s', min => 0, unit => 'ms' }
]
}
},
@ -110,7 +110,7 @@ sub set_counters {
key_values => [ { name => 'traffic_latency_mean' } ],
output_template => 'mean traffic transport latency: %s ms',
perfdatas => [
{ value => 'traffic_latency_mean_absolute', template => '%s', min => 0, unit => 'ms' }
{ value => 'traffic_latency_mean', template => '%s', min => 0, unit => 'ms' }
]
}
}

View File

@ -45,7 +45,7 @@ sub set_counters {
key_values => [ { name => 'connections', diff => 1 } ],
output_template => 'total connections: %s',
perfdatas => [
{ value => 'connections_absolute', template => '%s', min => 0 }
{ value => 'connections', template => '%s', min => 0 }
]
}
},
@ -53,7 +53,7 @@ sub set_counters {
key_values => [ { name => 'traffic_class_inbound', diff => 1 } ],
output_template => 'traffic class inbound: %s',
perfdatas => [
{ value => 'traffic_class_inbound_absolute', template => '%s', min => 0 }
{ value => 'traffic_class_inbound', template => '%s', min => 0 }
]
}
},
@ -61,7 +61,7 @@ sub set_counters {
key_values => [ { name => 'traffic_class_outbound', diff => 1 } ],
output_template => 'traffic class outbound: %s',
perfdatas => [
{ value => 'traffic_class_outbound_absolute', template => '%s', min => 0 }
{ value => 'traffic_class_outbound', template => '%s', min => 0 }
]
}
},
@ -70,7 +70,7 @@ sub set_counters {
output_template => 'traffic size inbound: %s %s',
output_change_bytes => 1,
perfdatas => [
{ value => 'traffic_size_inbound_absolute', template => '%s', min => 0, unit => 'B' }
{ value => 'traffic_size_inbound', template => '%s', min => 0, unit => 'B' }
]
}
},
@ -79,7 +79,7 @@ sub set_counters {
output_template => 'traffic size outbound: %s %s',
output_change_bytes => 1,
perfdatas => [
{ value => 'traffic_size_outbound_absolute', template => '%s', min => 0, unit => 'B' }
{ value => 'traffic_size_outbound', template => '%s', min => 0, unit => 'B' }
]
}
},
@ -87,7 +87,7 @@ sub set_counters {
key_values => [ { name => 'session_duration_total', diff => 1 } ],
output_template => 'total sessions duration: %s ms',
perfdatas => [
{ value => 'session_duration_total_absolute', template => '%s', min => 0, unit => 'ms' }
{ value => 'session_duration_total', template => '%s', min => 0, unit => 'ms' }
]
}
},
@ -95,7 +95,7 @@ sub set_counters {
key_values => [ { name => 'session_duration_mean' } ],
output_template => 'mean sessions duration: %s ms',
perfdatas => [
{ value => 'session_duration_mean_absolute', template => '%s', min => 0, unit => 'ms' }
{ value => 'session_duration_mean', template => '%s', min => 0, unit => 'ms' }
]
}
}

View File

@ -45,7 +45,7 @@ sub set_counters {
key_values => [ { name => 'requests_time_total', diff => 1 } ],
output_template => 'total requests time: %s ms',
perfdatas => [
{ value => 'requests_time_total_absolute', template => '%s', min => 0, unit => 'ms' }
{ value => 'requests_time_total', template => '%s', min => 0, unit => 'ms' }
]
}
},
@ -53,7 +53,7 @@ sub set_counters {
key_values => [ { name => 'requests_time_mean' } ],
output_template => 'mean requests time: %s ms',
perfdatas => [
{ value => 'requests_time_mean_absolute', template => '%s', min => 0, unit => 'ms' }
{ value => 'requests_time_mean', template => '%s', min => 0, unit => 'ms' }
]
}
},
@ -61,7 +61,7 @@ sub set_counters {
key_values => [ { name => 'requests', diff => 1 } ],
output_template => 'total requests: %s',
perfdatas => [
{ value => 'requests_absolute', template => '%s', min => 0 }
{ value => 'requests', template => '%s', min => 0 }
]
}
},
@ -69,7 +69,7 @@ sub set_counters {
key_values => [ { name => 'requests_200', diff => 1 } ],
output_template => 'total 200 requests: %s',
perfdatas => [
{ value => 'requests_200_absolute', template => '%s', min => 0 }
{ value => 'requests_200', template => '%s', min => 0 }
]
}
},
@ -77,7 +77,7 @@ sub set_counters {
key_values => [ { name => 'requests_304', diff => 1 } ],
output_template => 'total 304 requests: %s',
perfdatas => [
{ value => 'requests_304_absolute', template => '%s', min => 0 }
{ value => 'requests_304', template => '%s', min => 0 }
]
}
}

View File

@ -45,7 +45,7 @@ sub set_counters {
key_values => [ { name => 'packets_all', diff => 1 } ],
output_template => 'all packets sent: %s',
perfdatas => [
{ value => 'packets_all_absolute', template => '%s', min => 0 }
{ value => 'packets_all', template => '%s', min => 0 }
]
}
},
@ -53,7 +53,7 @@ sub set_counters {
key_values => [ { name => 'packets_chat', diff => 1 } ],
output_template => 'chat packets sent: %s',
perfdatas => [
{ value => 'packets_chat_absolute', template => '%s', min => 0 }
{ value => 'packets_chat', template => '%s', min => 0 }
]
}
}

View File

@ -72,8 +72,8 @@ sub set_counters {
key_values => [ { name => 'speed_events' }, { name => 'display' } ],
output_template => 'Speed Events: %s/s',
perfdatas => [
{ label => 'speed_events', value => 'speed_events_absolute', template => '%s',
unit => 'events/s', min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'speed_events', value => 'speed_events', template => '%s',
unit => 'events/s', min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -81,8 +81,8 @@ sub set_counters {
key_values => [ { name => 'queued_events' }, { name => 'display' } ],
output_template => 'Queued Events: %s',
perfdatas => [
{ label => 'queued_events', value => 'queued_events_absolute', template => '%s',
unit => 'events', min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'queued_events', value => 'queued_events', template => '%s',
unit => 'events', min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -90,8 +90,8 @@ sub set_counters {
key_values => [ { name => 'unacknowledged_events' }, { name => 'display' } ],
output_template => 'Unacknowledged Events: %s',
perfdatas => [
{ label => 'unacknowledged_events', value => 'unacknowledged_events_absolute', template => '%s',
unit => 'events', min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'unacknowledged_events', value => 'unacknowledged_events', template => '%s',
unit => 'events', min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},

View File

@ -31,9 +31,9 @@ sub custom_hosts_execution_time_output {
return sprintf(
'hosts active execution time (avg/min/max): %.3f/%.3f/%.3f sec',
$self->{result_values}->{avg_absolute},
$self->{result_values}->{min_absolute},
$self->{result_values}->{max_absolute}
$self->{result_values}->{avg},
$self->{result_values}->{min},
$self->{result_values}->{max}
);
}
@ -42,9 +42,9 @@ sub custom_services_execution_time_output {
return sprintf(
'services active execution time (avg/min/max): %.3f/%.3f/%.3f sec',
$self->{result_values}->{avg_absolute},
$self->{result_values}->{min_absolute},
$self->{result_values}->{max_absolute}
$self->{result_values}->{avg},
$self->{result_values}->{min},
$self->{result_values}->{max}
);
}
@ -53,10 +53,10 @@ sub custom_hosts_checked_output {
return sprintf(
'hosts active checked last 1/5/15/60 min: %d/%d/%d/%d',
$self->{result_values}->{last1min_absolute},
$self->{result_values}->{last5min_absolute},
$self->{result_values}->{last15min_absolute},
$self->{result_values}->{last60min_absolute},
$self->{result_values}->{last1min},
$self->{result_values}->{last5min},
$self->{result_values}->{last15min},
$self->{result_values}->{last60min},
);
}
@ -65,10 +65,10 @@ sub custom_services_checked_output {
return sprintf(
'services active checked last 1/5/15/60 min: %d/%d/%d/%d',
$self->{result_values}->{last1min_absolute},
$self->{result_values}->{last5min_absolute},
$self->{result_values}->{last15min_absolute},
$self->{result_values}->{last60min_absolute},
$self->{result_values}->{last1min},
$self->{result_values}->{last5min},
$self->{result_values}->{last15min},
$self->{result_values}->{last60min},
);
}
@ -77,9 +77,9 @@ sub custom_hosts_latency_output {
return sprintf(
'hosts active latency (avg/min/max): %.3f/%.3f/%.3f sec',
$self->{result_values}->{avg_absolute},
$self->{result_values}->{min_absolute},
$self->{result_values}->{max_absolute}
$self->{result_values}->{avg},
$self->{result_values}->{min},
$self->{result_values}->{max}
);
}
@ -88,9 +88,9 @@ sub custom_services_latency_output {
return sprintf(
'services active latency (avg/min/max): %.3f/%.3f/%.3f sec',
$self->{result_values}->{avg_absolute},
$self->{result_values}->{min_absolute},
$self->{result_values}->{max_absolute}
$self->{result_values}->{avg},
$self->{result_values}->{min},
$self->{result_values}->{max}
);
}
@ -99,9 +99,9 @@ sub custom_hosts_status_output {
return sprintf(
'hosts status up/down/unreach: %d/%d/%d',
$self->{result_values}->{up_absolute},
$self->{result_values}->{down_absolute},
$self->{result_values}->{unreach_absolute}
$self->{result_values}->{up},
$self->{result_values}->{down},
$self->{result_values}->{unreach}
);
}
@ -110,10 +110,10 @@ sub custom_services_status_output {
return sprintf(
'services status ok/warn/unk/crit: %d/%d/%d/%d',
$self->{result_values}->{ok_absolute},
$self->{result_values}->{warn_absolute},
$self->{result_values}->{unk_absolute},
$self->{result_values}->{crit_absolute}
$self->{result_values}->{ok},
$self->{result_values}->{warn},
$self->{result_values}->{unk},
$self->{result_values}->{crit}
);
}
@ -122,8 +122,8 @@ sub custom_commands_buffer_output {
return sprintf(
'commands buffer current/max: %d/%d',
$self->{result_values}->{current_absolute},
$self->{result_values}->{max_absolute}
$self->{result_values}->{current},
$self->{result_values}->{max}
);
}
@ -159,10 +159,10 @@ sub set_counters {
key_values => [
{ name => 'avg' }, { name => 'max' }, { name => 'min' }
],
threshold_use => $_->[0] . '_absolute',
threshold_use => $_->[0] ,
closure_custom_output => $self->can('custom_' . $type . '_execution_time_output'),
perfdatas => [
{ value => $_->[0] . '_absolute', template => '%.3f', min => 0, unit => 's' },
{ value => $_->[0] , template => '%.3f', min => 0, unit => 's' },
],
}
}
@ -180,10 +180,10 @@ sub set_counters {
key_values => [
{ name => 'last1min' }, { name => 'last5min' }, { name => 'last15min' }, { name => 'last60min' }
],
threshold_use => $_->[0] . '_absolute',
threshold_use => $_->[0] ,
closure_custom_output => $self->can('custom_' . $type . '_checked_output'),
perfdatas => [
{ value => $_->[0] . '_absolute', template => '%d', min => 0 },
{ value => $_->[0] , template => '%d', min => 0 },
],
}
}
@ -201,10 +201,10 @@ sub set_counters {
key_values => [
{ name => 'avg' }, { name => 'max' }, { name => 'min' }
],
threshold_use => $_->[0] . '_absolute',
threshold_use => $_->[0] ,
closure_custom_output => $self->can('custom_' . $type . '_latency_output'),
perfdatas => [
{ value => $_->[0] . '_absolute', template => '%.3f', min => 0, unit => 's' },
{ value => $_->[0] , template => '%.3f', min => 0, unit => 's' },
],
}
}
@ -223,10 +223,10 @@ sub set_counters {
key_values => [
{ name => 'up' }, { name => 'down' }, { name => 'unreach' }
],
threshold_use => $_->[0] . '_absolute',
threshold_use => $_->[0] ,
closure_custom_output => $self->can('custom_hosts_status_output'),
perfdatas => [
{ value => $_->[0] . '_absolute', template => '%s', min => 0, max => 'total_absolute' },
{ value => $_->[0] , template => '%s', min => 0, max => 'total' },
],
}
}
@ -244,10 +244,10 @@ sub set_counters {
key_values => [
{ name => 'ok' }, { name => 'warn' }, { name => 'unk' }, { name => 'crit' }, { name => 'total' }
],
threshold_use => $_->[0] . '_absolute',
threshold_use => $_->[0] ,
closure_custom_output => $self->can('custom_services_status_output'),
perfdatas => [
{ value => $_->[0] . '_absolute', template => '%s', min => 0, max => 'total_absolute' },
{ value => $_->[0] , template => '%s', min => 0, max => 'total' },
],
}
}
@ -265,10 +265,10 @@ sub set_counters {
key_values => [
{ name => 'current' }, { name => 'max' }, { name => 'total' }
],
threshold_use => $_->[0] . '_absolute',
threshold_use => $_->[0] ,
closure_custom_output => $self->can('custom_commands_buffer_output'),
perfdatas => [
{ value => $_->[0] . '_absolute', template => '%s', min => 0, max => 'total_absolute' },
{ value => $_->[0] , template => '%s', min => 0, max => 'total' },
],
}
}

View File

@ -58,29 +58,27 @@ sub set_counters {
closure_custom_calc => $self->can('custom_status_calc'),
closure_custom_output => $self->can('custom_status_output'),
closure_custom_perfdata => sub { return 0; },
closure_custom_threshold_check => \&catalog_status_threshold,
closure_custom_threshold_check => \&catalog_status_threshold
}
},
{ label => 'received-packets-rate', set => {
key_values => [ { name => 'ReceivedPackets', diff => 1 } ],
key_values => [ { name => 'ReceivedPackets', per_second => 1 } ],
output_template => 'Received Packets: %.2f/s',
per_second => 1,
perfdatas => [
{ label => 'received_packets_rate', value => 'ReceivedPackets_per_second', template => '%.2f',
min => 0, unit => 'packets/s' },
],
{ label => 'received_packets_rate', template => '%.2f',
min => 0, unit => 'packets/s' }
]
}
},
{ label => 'processed-packets-rate', set => {
key_values => [ { name => 'ProcessedPackets', diff => 1 } ],
key_values => [ { name => 'ProcessedPackets', per_second => 1 } ],
output_template => 'Processed Packets: %.2f/s',
per_second => 1,
perfdatas => [
{ label => 'processed_packets_rate', value => 'ProcessedPackets_per_second', template => '%.2f',
{ label => 'processed_packets_rate', template => '%.2f',
min => 0, unit => 'packets/s' },
],
]
}
},
}
];
}
@ -89,12 +87,11 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, statefile => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-counters:s" => { name => 'filter_counters', default => '' },
"warning-status:s" => { name => 'warning_status', default => '' },
"critical-status:s" => { name => 'critical_status', default => '%{processed_packets} < %{received_packets}' },
});
$options{options}->add_options(arguments => {
'warning-status:s' => { name => 'warning_status', default => '' },
'critical-status:s' => { name => 'critical_status', default => '%{processed_packets} < %{received_packets}' }
});
return $self;
}

View File

@ -37,37 +37,34 @@ sub set_counters {
key_values => [ { name => 'DrilldownCandidatesQueue' } ],
output_template => 'Drilldown Canditates Queue: %d',
perfdatas => [
{ label => 'drilldown_candidates_queue', value => 'DrilldownCandidatesQueue_absolute', template => '%d',
{ label => 'drilldown_candidates_queue', template => '%d',
min => 0 },
],
}
},
{ label => 'cutback-computation-rate', set => {
key_values => [ { name => 'Cutbackcomputation', diff => 1 } ],
key_values => [ { name => 'Cutbackcomputation', per_second => 1 } ],
output_template => 'Cutback Computation: %.2f/s',
per_second => 1,
perfdatas => [
{ label => 'cutback_computation_rate', value => 'Cutbackcomputation_per_second', template => '%.2f',
{ label => 'cutback_computation_rate', template => '%.2f',
min => 0 },
],
}
},
{ label => 'minimal-computation-rate', set => {
key_values => [ { name => 'Minimalcomputation', diff => 1 } ],
key_values => [ { name => 'Minimalcomputation', per_second => 1 } ],
output_template => 'Minimal Computation: %.2f/s',
per_second => 1,
perfdatas => [
{ label => 'minimal_computation_rate', value => 'Minimalcomputation_per_second', template => '%.2f',
{ label => 'minimal_computation_rate', template => '%.2f',
min => 0 },
],
}
},
{ label => 'recursive-computation-rate', set => {
key_values => [ { name => 'Recursivecomputation', diff => 1 } ],
key_values => [ { name => 'Recursivecomputation', per_second => 1 } ],
output_template => 'Recursive Computation: %.2f/s',
per_second => 1,
perfdatas => [
{ label => 'recursive_computation_rate', value => 'Recursivecomputation_per_second', template => '%.2f',
{ label => 'recursive_computation_rate', template => '%.2f',
min => 0 },
],
}
@ -80,10 +77,9 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, statefile => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-counters:s" => { name => 'filter_counters', default => '' },
});
$options{options}->add_options(arguments => {
});
return $self;
}

View File

@ -47,15 +47,14 @@ sub set_counters {
$label =~ s/_/-/g;
$output =~ s/_/ /g;
my $entry = { label => $label . '-rate', set => {
key_values => [ { name => $counter, diff => 1 } ],
output_template => ucfirst($output) . ': %.2f/s',
per_second => 1,
perfdatas => [
{ label => $label_perf . '_rate', value => $counter . '_per_second', template => '%.2f',
min => 0, unit => '/s' },
],
}
};
key_values => [ { name => $counter, per_second => 1 } ],
output_template => ucfirst($output) . ': %.2f/s',
perfdatas => [
{ label => $label_perf . '_rate', template => '%.2f',
min => 0, unit => '/s' }
]
}
};
push @{$self->{maps_counters}->{global}}, $entry;
}
}
@ -65,10 +64,9 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, statefile => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-counters:s" => { name => 'filter_counters', default => '' },
});
$options{options}->add_options(arguments => {
});
return $self;
}

View File

@ -36,7 +36,7 @@ sub set_counters {
key_values => [ { name => 'OpenContextCount' } ],
output_template => 'Open Views: %d',
perfdatas => [
{ label => 'open_views', value => 'OpenContextCount_absolute', template => '%d',
{ label => 'open_views', value => 'OpenContextCount', template => '%d',
min => 0, unit => 'views' },
],
}

View File

@ -36,7 +36,7 @@ sub set_counters {
key_values => [ { name => 'SessionCount' } ],
output_template => 'Active Sessions: %d',
perfdatas => [
{ label => 'active_sessions', value => 'SessionCount_absolute', template => '%d',
{ label => 'active_sessions', value => 'SessionCount', template => '%d',
min => 0, unit => 'sessions' },
],
}
@ -45,7 +45,7 @@ sub set_counters {
key_values => [ { name => 'AverageEventQueueSize' } ],
output_template => 'Average Event Queue Size: %d',
perfdatas => [
{ label => 'queue_size', value => 'AverageEventQueueSize_absolute', template => '%d',
{ label => 'queue_size', value => 'AverageEventQueueSize', template => '%d',
min => 0 },
],
}

View File

@ -43,7 +43,7 @@ sub set_counters {
key_values => [ { name => 'count' } ],
output_template => 'Count: %d',
perfdatas => [
{ label => 'map.synchronization.centreon.count', value => 'count_absolute', template => '%d',
{ label => 'map.synchronization.centreon.count', value => 'count', template => '%d',
min => 0 },
],
}
@ -53,7 +53,7 @@ sub set_counters {
key_values => [ { name => 'average' } ],
output_template => 'Average Duration: %.2f ms',
perfdatas => [
{ label => 'map.synchronization.centreon.duration.average.milliseconds', value => 'average_absolute',
{ label => 'map.synchronization.centreon.duration.average.milliseconds', value => 'average',
template => '%.2f', min => 0, unit => 'ms' },
],
}
@ -63,7 +63,7 @@ sub set_counters {
key_values => [ { name => 'max' } ],
output_template => 'Max Duration: %.2f ms',
perfdatas => [
{ label => 'map.synchronization.centreon.duration.max.milliseconds', value => 'max_absolute',
{ label => 'map.synchronization.centreon.duration.max.milliseconds', value => 'max',
template => '%.2f', min => 0, unit => 'ms' },
],
}
@ -75,8 +75,8 @@ sub set_counters {
key_values => [ { name => 'count' }, { name => 'name' } ],
output_template => 'Count: %d',
perfdatas => [
{ label => 'map.synchronization.acl.count', value => 'count_absolute', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'name_absolute' },
{ label => 'map.synchronization.acl.count', value => 'count', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'name' },
],
}
},
@ -85,8 +85,8 @@ sub set_counters {
key_values => [ { name => 'average' }, { name => 'name' } ],
output_template => 'Average Duration: %.2f ms',
perfdatas => [
{ label => 'map.synchronization.acl.duration.average.milliseconds', value => 'average_absolute',
template => '%.2f', min => 0, unit => 'ms', label_extra_instance => 1, instance_use => 'name_absolute' },
{ label => 'map.synchronization.acl.duration.average.milliseconds', value => 'average',
template => '%.2f', min => 0, unit => 'ms', label_extra_instance => 1, instance_use => 'name' },
],
}
},
@ -95,8 +95,8 @@ sub set_counters {
key_values => [ { name => 'max' }, { name => 'name' } ],
output_template => 'Max Duration: %.2f ms',
perfdatas => [
{ label => 'map.synchronization.acl.duration.max.milliseconds', value => 'max_absolute',
template => '%.2f', min => 0, unit => 'ms', label_extra_instance => 1, instance_use => 'name_absolute' },
{ label => 'map.synchronization.acl.duration.max.milliseconds', value => 'max',
template => '%.2f', min => 0, unit => 'ms', label_extra_instance => 1, instance_use => 'name' },
],
}
},
@ -107,8 +107,8 @@ sub set_counters {
key_values => [ { name => 'count' }, { name => 'name' } ],
output_template => 'Count: %d',
perfdatas => [
{ label => 'map.synchronization.resource.count', value => 'count_absolute', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'name_absolute' },
{ label => 'map.synchronization.resource.count', value => 'count', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'name' },
],
}
},
@ -117,8 +117,8 @@ sub set_counters {
key_values => [ { name => 'average' }, { name => 'name' } ],
output_template => 'Average Duration: %.2f ms',
perfdatas => [
{ label => 'map.synchronization.resource.duration.average.milliseconds', value => 'average_absolute',
template => '%.2f', min => 0, unit => 'ms', label_extra_instance => 1, instance_use => 'name_absolute' },
{ label => 'map.synchronization.resource.duration.average.milliseconds', value => 'average',
template => '%.2f', min => 0, unit => 'ms', label_extra_instance => 1, instance_use => 'name' },
],
}
},
@ -127,8 +127,8 @@ sub set_counters {
key_values => [ { name => 'max' }, { name => 'name' } ],
output_template => 'Max Duration: %.2f ms',
perfdatas => [
{ label => 'map.synchronization.resource.duration.max.milliseconds', value => 'max_absolute',
template => '%.2f', min => 0, unit => 'ms', label_extra_instance => 1, instance_use => 'name_absolute' },
{ label => 'map.synchronization.resource.duration.max.milliseconds', value => 'max',
template => '%.2f', min => 0, unit => 'ms', label_extra_instance => 1, instance_use => 'name' },
],
}
},

View File

@ -37,7 +37,7 @@ sub set_counters {
key_values => [ { name => '202' } ],
output_template => '202: %d',
perfdatas => [
{ value => '202_absolute', template => '%d', min => 0 },
{ value => '202', template => '%d', min => 0 },
],
}
},
@ -45,7 +45,7 @@ sub set_counters {
key_values => [ { name => '400' } ],
output_template => '400: %d',
perfdatas => [
{ value => '400_absolute', template => '%d', min => 0 },
{ value => '400', template => '%d', min => 0 },
],
}
},
@ -53,7 +53,7 @@ sub set_counters {
key_values => [ { name => '404' } ],
output_template => '404: %d',
perfdatas => [
{ value => '404_absolute', template => '%d', min => 0 },
{ value => '404', template => '%d', min => 0 },
],
}
},

View File

@ -37,7 +37,7 @@ sub set_counters {
key_values => [ { name => 'hosts' }, { name => 'display' } ],
output_template => 'Number of hosts : %s',
perfdatas => [
{ label => 'total_hosts', value => 'hosts_absolute', template => '%s',
{ label => 'total_hosts', value => 'hosts', template => '%s',
min => 0, label_extra_instance => 1 },
],
}
@ -46,7 +46,7 @@ sub set_counters {
key_values => [ { name => 'services' }, { name => 'display' } ],
output_template => 'Number of services : %s',
perfdatas => [
{ label => 'total_services', value => 'services_absolute', template => '%s',
{ label => 'total_services', value => 'services', template => '%s',
min => 0, label_extra_instance => 1 },
],
}

View File

@ -38,7 +38,7 @@ sub set_counters {
key_values => [ { name => 'total_queue_cache' } ],
output_template => 'Total current cache queue : %s',
perfdatas => [
{ label => 'total_queue_cache', value => 'total_queue_cache_absolute', template => '%s', min => 0 },
{ label => 'total_queue_cache', value => 'total_queue_cache', template => '%s', min => 0 },
],
}
},
@ -46,7 +46,7 @@ sub set_counters {
key_values => [ { name => 'total_queue_lock' } ],
output_template => 'Total current lock queue : %s',
perfdatas => [
{ label => 'total_queue_lock', value => 'total_queue_lock_absolute', template => '%s', min => 0 },
{ label => 'total_queue_lock', value => 'total_queue_lock', template => '%s', min => 0 },
],
}
},
@ -56,7 +56,7 @@ sub set_counters {
key_values => [ { name => 'num' }, { name => 'display' } ],
output_template => 'current cache queue : %s',
perfdatas => [
{ label => 'host_queue_cache', value => 'num_absolute', template => '%s',
{ label => 'host_queue_cache', value => 'num', template => '%s',
min => 0, label_extra_instance => 1 },
],
}

View File

@ -37,7 +37,7 @@ sub set_counters {
key_values => [ { name => 'delay' }, { name => 'display' } ],
output_template => 'delay for last update is %d seconds',
perfdatas => [
{ label => 'delay', value => 'delay_absolute', template => '%s',
{ label => 'delay', value => 'delay', template => '%s',
unit => 's', label_extra_instance => 1 },
],
}

View File

@ -37,7 +37,7 @@ sub set_counters {
key_values => [ { name => 'calls' } ],
output_template => 'Active calls: %d',
perfdatas => [
{ label => 'active_calls', value => 'calls_absolute', template => '%d',
{ label => 'active_calls', value => 'calls', template => '%d',
min => 0, unit => 'calls' },
],
}
@ -46,7 +46,7 @@ sub set_counters {
key_values => [ { name => 'numParticipantsLocal' } ],
output_template => 'Local participants: %d',
perfdatas => [
{ label => 'local_participants', value => 'numParticipantsLocal_absolute', template => '%d',
{ label => 'local_participants', value => 'numParticipantsLocal', template => '%d',
min => 0, unit => 'participants' },
],
}
@ -55,7 +55,7 @@ sub set_counters {
key_values => [ { name => 'numParticipantsRemote' } ],
output_template => 'Remote participants: %d',
perfdatas => [
{ label => 'remote_participants', value => 'numParticipantsRemote_absolute', template => '%d',
{ label => 'remote_participants', value => 'numParticipantsRemote', template => '%d',
min => 0, unit => 'participants' },
],
}
@ -64,7 +64,7 @@ sub set_counters {
key_values => [ { name => 'numCallLegs' } ],
output_template => 'Call legs: %d',
perfdatas => [
{ label => 'call_legs', value => 'numCallLegs_absolute', template => '%d',
{ label => 'call_legs', value => 'numCallLegs', template => '%d',
min => 0, unit => 'legs' },
],
}

View File

@ -66,7 +66,7 @@ sub set_counters {
key_values => [ { name => 'callLegsActive' } ],
output_template => 'Active: %d',
perfdatas => [
{ label => 'active_legs', value => 'callLegsActive_absolute', template => '%d',
{ label => 'active_legs', value => 'callLegsActive', template => '%d',
min => 0, unit => 'legs' },
],
}
@ -75,7 +75,7 @@ sub set_counters {
key_values => [ { name => 'callLegsCompleted' } ],
output_template => 'Completed: %d',
perfdatas => [
{ label => 'completed_legs', value => 'callLegsCompleted_absolute', template => '%d',
{ label => 'completed_legs', value => 'callLegsCompleted', template => '%d',
min => 0, unit => 'legs' },
],
}
@ -87,7 +87,7 @@ sub set_counters {
output_template => 'outgoing audio streams: %s %s/s',
output_change_bytes => 2,
perfdatas => [
{ label => 'audio_outgoing_rate', value => 'audioBitRateOutgoing_absolute', template => '%d',
{ label => 'audio_outgoing_rate', value => 'audioBitRateOutgoing', template => '%d',
min => 0, unit => 'b/s' },
],
}
@ -97,7 +97,7 @@ sub set_counters {
output_template => 'incoming audio streams: %s %s/s',
output_change_bytes => 2,
perfdatas => [
{ label => 'audio_incoming_rate', value => 'audioBitRateIncoming_absolute', template => '%d',
{ label => 'audio_incoming_rate', value => 'audioBitRateIncoming', template => '%d',
min => 0, unit => 'b/s' },
],
}
@ -107,7 +107,7 @@ sub set_counters {
output_template => 'outgoing video streams: %s %s/s',
output_change_bytes => 2,
perfdatas => [
{ label => 'video_outgoing_rate', value => 'videoBitRateOutgoing_absolute', template => '%d',
{ label => 'video_outgoing_rate', value => 'videoBitRateOutgoing', template => '%d',
min => 0, unit => 'b/s' },
],
}
@ -117,7 +117,7 @@ sub set_counters {
output_template => 'incoming video streams: %s %s/s',
output_change_bytes => 2,
perfdatas => [
{ label => 'video_incoming_rate', value => 'videoBitRateIncoming_absolute', template => '%d',
{ label => 'video_incoming_rate', value => 'videoBitRateIncoming', template => '%d',
min => 0, unit => 'b/s' },
],
}

View File

@ -37,7 +37,7 @@ sub set_counters {
key_values => [ { name => 'active' } ],
output_template => 'Active sessions: %d',
perfdatas => [
{ label => 'active_sessions', value => 'active_absolute', template => '%d',
{ label => 'active_sessions', value => 'active', template => '%d',
min => 0 },
],
}
@ -46,7 +46,7 @@ sub set_counters {
key_values => [ { name => 'postured' } ],
output_template => 'Postured endpoints: %d',
perfdatas => [
{ label => 'postured_endpoints', value => 'postured_absolute', template => '%d',
{ label => 'postured_endpoints', value => 'postured', template => '%d',
min => 0 },
],
}
@ -55,7 +55,7 @@ sub set_counters {
key_values => [ { name => 'profiler' } ],
output_template => 'Profiler service sessions: %d',
perfdatas => [
{ label => 'profiler_service_sessions', value => 'profiler_absolute', template => '%d',
{ label => 'profiler_service_sessions', value => 'profiler', template => '%d',
min => 0 },
],
}

View File

@ -30,11 +30,11 @@ sub custom_license_output {
my ($self, %options) = @_;
my $msg = sprintf("Licenses Total: %s Used: %s (%.2f%%) Free: %s (%.2f%%)",
$self->{result_values}->{total_absolute},
$self->{result_values}->{used_absolute},
$self->{result_values}->{prct_used_absolute},
$self->{result_values}->{free_absolute},
$self->{result_values}->{prct_free_absolute}
$self->{result_values}->{total},
$self->{result_values}->{used},
$self->{result_values}->{prct_used},
$self->{result_values}->{free},
$self->{result_values}->{prct_free}
);
return $msg;
}
@ -51,7 +51,7 @@ sub set_counters {
key_values => [ { name => 'used' }, { name => 'free' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' } ],
closure_custom_output => $self->can('custom_license_output'),
perfdatas => [
{ value => 'used_absolute', template => '%d', min => 0, max => 'total_absolute' },
{ value => 'used', template => '%d', min => 0, max => 'total' },
],
}
},
@ -59,7 +59,7 @@ sub set_counters {
key_values => [ { name => 'free' }, { name => 'used' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' } ],
closure_custom_output => $self->can('custom_license_output'),
perfdatas => [
{ value => 'free_absolute', template => '%d', min => 0, max => 'total_absolute' },
{ value => 'free', template => '%d', min => 0, max => 'total' },
],
}
},
@ -67,7 +67,7 @@ sub set_counters {
key_values => [ { name => 'prct_used' } ],
output_template => 'Licenses Used : %.2f %%',
perfdatas => [
{ value => 'prct_used_absolute', template => '%.2f', min => 0, max => 100, unit => '%' },
{ value => 'prct_used', template => '%.2f', min => 0, max => 100, unit => '%' },
],
}
},

View File

@ -62,8 +62,8 @@ sub set_counters {
key_values => [ { name => 'alBackendQueueCur' }, { name => 'display' } ],
output_template => 'Current queue : %s',
perfdatas => [
{ label => 'current_queue', value => 'alBackendQueueCur_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'current_queue', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -71,8 +71,8 @@ sub set_counters {
key_values => [ { name => 'alBackendSessionCur' }, { name => 'display' } ],
output_template => 'Current sessions : %s',
perfdatas => [
{ label => 'current_sessions', value => 'alBackendSessionCur_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'current_sessions', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -80,28 +80,28 @@ sub set_counters {
key_values => [ { name => 'alBackendSessionTotal', diff => 1 }, { name => 'display' } ],
output_template => 'Total sessions : %s',
perfdatas => [
{ label => 'total_connections', value => 'alBackendSessionTotal_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'total_connections', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
{ label => 'traffic-in', set => {
key_values => [ { name => 'alBackendBytesIN', diff => 1 }, { name => 'display' } ],
key_values => [ { name => 'alBackendBytesIN', per_second => 1 }, { name => 'display' } ],
output_template => 'Traffic In : %s %s/s',
per_second => 1, output_change_bytes => 2,
output_change_bytes => 2,
perfdatas => [
{ label => 'traffic_in', value => 'alBackendBytesIN_per_second', template => '%.2f',
min => 0, unit => 'b/s', label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'traffic_in', template => '%.2f',
min => 0, unit => 'b/s', label_extra_instance => 1, instance_use => 'display' },
],
}
},
{ label => 'traffic-out', set => {
key_values => [ { name => 'alBackendBytesOUT', diff => 1 }, { name => 'display' } ],
key_values => [ { name => 'alBackendBytesOUT', per_second => 1 }, { name => 'display' } ],
output_template => 'Traffic Out : %s %s/s',
per_second => 1, output_change_bytes => 2,
output_change_bytes => 2,
perfdatas => [
{ label => 'traffic_out', value => 'alBackendBytesOUT_per_second', template => '%.2f',
min => 0, unit => 'b/s', label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'traffic_out', template => '%.2f',
min => 0, unit => 'b/s', label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -114,9 +114,9 @@ sub new {
bless $self, $class;
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' },
'warning-status:s' => { name => 'warning_status', default => '' },
'critical-status:s' => { name => 'critical_status', default => '%{status} !~ /UP/i' },
'filter-name:s' => { name => 'filter_name' },
'warning-status:s' => { name => 'warning_status', default => '' },
'critical-status:s' => { name => 'critical_status', default => '%{status} !~ /UP/i' }
});
return $self;

View File

@ -46,7 +46,7 @@ sub set_counters {
my ($self, %options) = @_;
$self->{maps_counters_type} = [
{ name => 'frontend', type => 1, cb_prefix_output => 'prefix_frontend_output', message_multiple => 'All frontends are ok' },
{ name => 'frontend', type => 1, cb_prefix_output => 'prefix_frontend_output', message_multiple => 'All frontends are ok' }
];
$self->{maps_counters}->{frontend} = [
@ -55,47 +55,47 @@ sub set_counters {
closure_custom_calc => $self->can('custom_status_calc'),
closure_custom_output => $self->can('custom_status_output'),
closure_custom_perfdata => sub { return 0; },
closure_custom_threshold_check => \&catalog_status_threshold,
closure_custom_threshold_check => \&catalog_status_threshold
}
},
{ label => 'current-sessions', set => {
key_values => [ { name => 'alFrontendSessionCur' }, { name => 'display' } ],
output_template => 'Current sessions : %s',
perfdatas => [
{ label => 'current_sessions', value => 'alFrontendSessionCur_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
],
{ label => 'current_sessions', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' }
]
}
},
{ label => 'total-sessions', set => {
key_values => [ { name => 'alFrontendSessionTotal', diff => 1 }, { name => 'display' } ],
output_template => 'Total sessions : %s',
perfdatas => [
{ label => 'total_connections', value => 'alFrontendSessionTotal_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
],
{ label => 'total_connections', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' }
]
}
},
{ label => 'traffic-in', set => {
key_values => [ { name => 'alFrontendBytesIN', diff => 1 }, { name => 'display' } ],
key_values => [ { name => 'alFrontendBytesIN', per_second => 1 }, { name => 'display' } ],
output_template => 'Traffic In : %s %s/s',
per_second => 1, output_change_bytes => 2,
output_change_bytes => 2,
perfdatas => [
{ label => 'traffic_in', value => 'alFrontendBytesIN_per_second', template => '%.2f',
min => 0, unit => 'b/s', label_extra_instance => 1, instance_use => 'display_absolute' },
],
{ label => 'traffic_in', template => '%.2f',
min => 0, unit => 'b/s', label_extra_instance => 1, instance_use => 'display' }
]
}
},
{ label => 'traffic-out', set => {
key_values => [ { name => 'alFrontendBytesOUT', diff => 1 }, { name => 'display' } ],
key_values => [ { name => 'alFrontendBytesOUT', per_second => 1 }, { name => 'display' } ],
output_template => 'Traffic Out : %s %s/s',
per_second => 1, output_change_bytes => 2,
output_change_bytes => 2,
perfdatas => [
{ label => 'traffic_out', value => 'alFrontendBytesOUT_per_second', template => '%.2f',
min => 0, unit => 'b/s', label_extra_instance => 1, instance_use => 'display_absolute' },
],
{ label => 'traffic_out', template => '%.2f',
min => 0, unit => 'b/s', label_extra_instance => 1, instance_use => 'display' },
]
}
},
}
];
}
@ -105,9 +105,9 @@ sub new {
bless $self, $class;
$options{options}->add_options(arguments => {
"filter-name:s" => { name => 'filter_name' },
"warning-status:s" => { name => 'warning_status', default => '' },
"critical-status:s" => { name => 'critical_status', default => '%{status} !~ /OPEN/i' },
'filter-name:s' => { name => 'filter_name' },
'warning-status:s' => { name => 'warning_status', default => '' },
'critical-status:s' => { name => 'critical_status', default => '%{status} !~ /OPEN/i' }
});
return $self;

View File

@ -39,8 +39,8 @@ sub custom_temperature_output {
my ($self, %options) = @_;
return sprintf('temperature: %s %s',
$self->{result_values}->{temperature_absolute},
$self->{result_values}->{temperature_unit_absolute}
$self->{result_values}->{temperature},
$self->{result_values}->{temperature_unit}
);
}
@ -48,10 +48,10 @@ sub custom_temperature_perfdata {
my ($self, %options) = @_;
$self->{output}->perfdata_add(
nlabel => 'drive.temperature.' . ($self->{result_values}->{temperature_unit_absolute} eq 'C' ? 'celsius' : 'fahrenheit'),
instances => $self->{result_values}->{display_absolute},
unit => $self->{result_values}->{temperature_unit_absolute},
value => $self->{result_values}->{temperature_absolute},
nlabel => 'drive.temperature.' . ($self->{result_values}->{temperature_unit} eq 'C' ? 'celsius' : 'fahrenheit'),
instances => $self->{result_values}->{display},
unit => $self->{result_values}->{temperature_unit},
value => $self->{result_values}->{temperature},
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}),
);

View File

@ -52,13 +52,13 @@ sub set_counters {
sub custom_snapshot_output {
my ($self, %options) = @_;
return "[status = " . $self->{result_values}->{status_absolute} . "] checkpoint started '" . centreon::plugins::misc::change_seconds(value => $self->{result_values}->{snapshot_absolute}) . "' ago";
return "[status = " . $self->{result_values}->{status} . "] checkpoint started '" . centreon::plugins::misc::change_seconds(value => $self->{result_values}->{snapshot}) . "' ago";
}
sub custom_backing_output {
my ($self, %options) = @_;
return "[status = " . $self->{result_values}->{status_absolute} . "] backing started '" . centreon::plugins::misc::change_seconds(value => $self->{result_values}->{backing_absolute}) . "' ago";
return "[status = " . $self->{result_values}->{status} . "] backing started '" . centreon::plugins::misc::change_seconds(value => $self->{result_values}->{backing}) . "' ago";
}
sub prefix_vm_output {

View File

@ -46,7 +46,7 @@ sub set_counters {
sub custom_vm_output {
my ($self, %options) = @_;
return 'checkpoint started since : ' . centreon::plugins::misc::change_seconds(value => $self->{result_values}->{snapshot_absolute});
return 'checkpoint started since : ' . centreon::plugins::misc::change_seconds(value => $self->{result_values}->{snapshot});
}
sub prefix_vm_output {

View File

@ -61,8 +61,8 @@ sub set_counters {
key_values => [ { name => 'i3IgSpanInfoActiveChannels' }, { name => 'display' } ],
output_template => 'Current Active Channels : %s',
perfdatas => [
{ label => 'active_channels', value => 'i3IgSpanInfoActiveChannels_absolute', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'active_channels', value => 'i3IgSpanInfoActiveChannels', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},

View File

@ -38,7 +38,7 @@ sub set_counters {
key_values => [ { name => 'SipActiveCallsCount' } ],
output_template => 'SIP Current Active Calls : %s',
perfdatas => [
{ label => 'sip_active_calls', value => 'SipActiveCallsCount_absolute', template => '%d',
{ label => 'sip_active_calls', value => 'SipActiveCallsCount', template => '%d',
min => 0 },
],
}
@ -47,7 +47,7 @@ sub set_counters {
key_values => [ { name => 'TdmActiveCallsCount' } ],
output_template => 'TDM Current Active Calls : %s',
perfdatas => [
{ label => 'tdm_active_calls', value => 'TdmActiveCallsCount_absolute', template => '%d',
{ label => 'tdm_active_calls', value => 'TdmActiveCallsCount', template => '%d',
min => 0 },
],
}
@ -58,8 +58,8 @@ sub set_counters {
key_values => [ { name => 'i3IgChannelGroupActiveCallsCount' }, { name => 'display' } ],
output_template => 'Current Active Calls : %s',
perfdatas => [
{ label => 'channel_group_active_calls', value => 'i3IgChannelGroupActiveCallsCount_absolute', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'channel_group_active_calls', value => 'i3IgChannelGroupActiveCallsCount', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},

View File

@ -37,8 +37,8 @@ sub set_counters {
key_values => [ { name => 'i3MsAudioEngineAverageLoad' }, { name => 'display' } ],
output_template => 'Average Load : %s',
perfdatas => [
{ label => 'load_avg', value => 'i3MsAudioEngineAverageLoad_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'load_avg', value => 'i3MsAudioEngineAverageLoad', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -46,8 +46,8 @@ sub set_counters {
key_values => [ { name => 'i3MsAudioEngineElementCount' }, { name => 'display' } ],
output_template => 'Total active graph elements : %s',
perfdatas => [
{ label => 'elem_count', value => 'i3MsAudioEngineElementCount_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'elem_count', value => 'i3MsAudioEngineElementCount', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},

View File

@ -136,8 +136,8 @@ sub set_counters {
key_values => [ { name => 'i3MsCmdSrvResourceCount' }, { name => 'display' } ],
output_template => 'Resource Count : %s',
perfdatas => [
{ label => 'resource_count', value => 'i3MsCmdSrvResourceCount_absolute', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'resource_count', value => 'i3MsCmdSrvResourceCount', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},

View File

@ -38,7 +38,7 @@ sub set_counters {
output_template => 'Memory Used : %s %s',
output_change_bytes => 1,
perfdatas => [
{ label => 'used', value => 'used_absolute', template => '%s',
{ label => 'used', value => 'used', template => '%s',
unit => 'B', min => 0 },
],
}

View File

@ -39,8 +39,8 @@ sub set_counters {
key_values => [ { name => 'connect', diff => 1 }, { name => 'display' } ],
output_template => 'Connect Count : %s',
perfdatas => [
{ label => 'connect_count', value => 'connect_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'connect_count', value => 'connect', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -48,8 +48,8 @@ sub set_counters {
key_values => [ { name => 'close', diff => 1 }, { name => 'display' } ],
output_template => 'Close Count : %s',
perfdatas => [
{ label => 'close_count', value => 'close_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'close_count', value => 'close', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -57,8 +57,8 @@ sub set_counters {
key_values => [ { name => 'query', diff => 1 }, { name => 'display' } ],
output_template => 'Query Count : %s',
perfdatas => [
{ label => 'query_count', value => 'query_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'query_count', value => 'query', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -66,8 +66,8 @@ sub set_counters {
key_values => [ { name => 'insert', diff => 1 }, { name => 'display' } ],
output_template => 'Insert Count : %s',
perfdatas => [
{ label => 'insert_count', value => 'insert_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'insert_count', value => 'insert', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -75,8 +75,8 @@ sub set_counters {
key_values => [ { name => 'update', diff => 1 }, { name => 'display' } ],
output_template => 'Update Count : %s',
perfdatas => [
{ label => 'update_count', value => 'update_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'update_count', value => 'update', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},

View File

@ -38,8 +38,8 @@ sub set_counters {
key_values => [ { name => 'ActiveCount' }, { name => 'display' } ],
output_template => 'Current Active Connections : %s',
perfdatas => [
{ label => 'active_con', value => 'ActiveCount_absolute', template => '%s', min => 0,
label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'active_con', value => 'ActiveCount', template => '%s', min => 0,
label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -47,8 +47,8 @@ sub set_counters {
key_values => [ { name => 'AvailableCount' }, { name => 'display' } ],
output_template => 'Current Available Connections : %s',
perfdatas => [
{ label => 'available_con', value => 'AvailableCount_absolute', template => '%s', min => 0,
label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'available_con', value => 'AvailableCount', template => '%s', min => 0,
label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -56,8 +56,8 @@ sub set_counters {
key_values => [ { name => 'InUseCount' }, { name => 'display' } ],
output_template => 'Current In Use Connections : %s',
perfdatas => [
{ label => 'in_use_con', value => 'InUseCount_absolute', template => '%s', min => 0,
label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'in_use_con', value => 'InUseCount', template => '%s', min => 0,
label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -65,8 +65,8 @@ sub set_counters {
key_values => [ { name => 'CreatedCount', diff => 1 }, { name => 'display' } ],
output_template => 'Created Connections : %s',
perfdatas => [
{ label => 'created_con', value => 'CreatedCount_absolute', template => '%s', min => 0,
label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'created_con', value => 'CreatedCount', template => '%s', min => 0,
label_extra_instance => 1, instance_use => 'display' },
],
}
},

View File

@ -38,7 +38,7 @@ sub set_counters {
key_values => [ { name => 'leader_count' } ],
output_template => 'Leaders : %s',
perfdatas => [
{ label => 'leader_count', value => 'leader_count_absolute', template => '%s', min => 0 },
{ label => 'leader_count', template => '%s', min => 0 },
],
}
},
@ -46,7 +46,7 @@ sub set_counters {
key_values => [ { name => 'active_controller_count' } ],
output_template => 'Active Controllers : %s',
perfdatas => [
{ label => 'active_controller_count', value => 'active_controller_count_absolute', template => '%s', min => 0 },
{ label => 'active_controller_count', template => '%s', min => 0 },
],
}
},
@ -54,7 +54,7 @@ sub set_counters {
key_values => [ { name => 'partition_count' } ],
output_template => 'Partitions : %s',
perfdatas => [
{ label => 'partition_count', value => 'partition_count_absolute', template => '%s', min => 0 },
{ label => 'partition_count', template => '%s', min => 0 },
],
}
},
@ -62,7 +62,7 @@ sub set_counters {
key_values => [ { name => 'offline_partitions_count' } ],
output_template => 'Offline partitions : %s',
perfdatas => [
{ label => 'offline_partitions_count', value => 'offline_partitions_count_absolute', template => '%s',
{ label => 'offline_partitions_count', template => '%s',
min => 0 },
],
}
@ -71,7 +71,7 @@ sub set_counters {
key_values => [ { name => 'under_replicated_partitions' } ],
output_template => 'Under replicated partitions : %s',
perfdatas => [
{ label => 'under_replicated_partitions', value => 'under_replicated_partitions_absolute', template => '%s',
{ label => 'under_replicated_partitions', template => '%s',
min => 0 },
],
}
@ -80,26 +80,26 @@ sub set_counters {
key_values => [ { name => 'unclean_leader_elections', diff => 1 } ],
output_template => 'Number of unclean leader elections : %s',
perfdatas => [
{ label => 'unclean_leader_elections', value => 'unclean_leader_elections_absolute', template => '%s', min => 0 },
{ label => 'unclean_leader_elections', template => '%s', min => 0 },
],
}
},
{ label => 'traffic-in', set => {
key_values => [ { name => 'traffic_in', diff => 1 } ],
key_values => [ { name => 'traffic_in', per_second => 1 } ],
output_template => 'Traffic In : %s %s/s',
per_second => 1, output_change_bytes => 2,
output_change_bytes => 2,
perfdatas => [
{ label => 'traffic_in', value => 'traffic_in_per_second', template => '%.2f',
{ label => 'traffic_in', template => '%.2f',
min => 0, unit => 'b/s' },
],
}
},
{ label => 'traffic-out', set => {
key_values => [ { name => 'traffic_out', diff => 1 } ],
key_values => [ { name => 'traffic_out', per_second => 1 } ],
output_template => 'Traffic Out : %s %s/s',
per_second => 1, output_change_bytes => 2,
output_change_bytes => 2,
perfdatas => [
{ label => 'traffic_out', value => 'traffic_out_per_second', template => '%.2f',
{ label => 'traffic_out', template => '%.2f',
min => 0, unit => 'b/s' },
],
}
@ -108,7 +108,7 @@ sub set_counters {
key_values => [ { name => 'total_fetch_requests', diff => 1 } ],
output_template => 'Number of total fetch requests : %s',
perfdatas => [
{ label => 'total_fetch_requests', value => 'total_fetch_requests_absolute', template => '%s', min => 0 },
{ label => 'total_fetch_requests', template => '%s', min => 0 },
],
}
},
@ -119,11 +119,10 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, statefile => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {
});
return $self;
}

View File

@ -38,8 +38,8 @@ sub set_counters {
key_values => [ { name => 'cumulative_evictions', diff => 1 }, { name => 'display' } ],
output_template => 'Evictions Count : %s',
perfdatas => [
{ label => 'evictions_count', value => 'cumulative_evictions_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'evictions_count', value => 'cumulative_evictions', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -47,8 +47,8 @@ sub set_counters {
key_values => [ { name => 'cumulative_lookups', diff => 1 }, { name => 'display' } ],
output_template => 'Lookups Count : %s',
perfdatas => [
{ label => 'lookups_count', value => 'cumulative_lookups_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'lookups_count', value => 'cumulative_lookups', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -56,8 +56,8 @@ sub set_counters {
key_values => [ { name => 'cumulative_inserts', diff => 1 }, { name => 'display' } ],
output_template => 'Inserts Count : %s',
perfdatas => [
{ label => 'inserts_count', value => 'cumulative_inserts_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'inserts_count', value => 'cumulative_inserts', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -65,8 +65,8 @@ sub set_counters {
key_values => [ { name => 'cumulative_hits', diff => 1 }, { name => 'display' } ],
output_template => 'Hits Count : %s',
perfdatas => [
{ label => 'hits_count', value => 'cumulative_hits_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'hits_count', value => 'cumulative_hits', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},

View File

@ -38,8 +38,8 @@ sub set_counters {
key_values => [ { name => '15minRateRequestsPerSecond' }, { name => 'display' } ],
output_template => '15min Rate Requests : %.7f/s',
perfdatas => [
{ label => '15min_rate_requests', value => '15minRateRequestsPerSecond_absolute', template => '%.7f',
min => 0, unit => '/s', label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => '15min_rate_requests', value => '15minRateRequestsPerSecond', template => '%.7f',
min => 0, unit => '/s', label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -47,8 +47,8 @@ sub set_counters {
key_values => [ { name => 'avgRequestsPerSecond' }, { name => 'display' } ],
output_template => 'Average Requests : %.7f/s',
perfdatas => [
{ label => 'avg_requests', value => 'avgRequestsPerSecond_absolute', template => '%.7f',
min => 0, unit => '/s', label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'avg_requests', value => 'avgRequestsPerSecond', template => '%.7f',
min => 0, unit => '/s', label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -56,8 +56,8 @@ sub set_counters {
key_values => [ { name => 'avgTimePerRequest' }, { name => 'display' } ],
output_template => 'Average Time Per Request : %.3f ms',
perfdatas => [
{ label => 'avg_time', value => 'avgTimePerRequest_absolute', template => '%.3f',
min => 0, unit => 'ms', label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'avg_time', value => 'avgTimePerRequest', template => '%.3f',
min => 0, unit => 'ms', label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -65,8 +65,8 @@ sub set_counters {
key_values => [ { name => 'requests', diff => 1 }, { name => 'display' } ],
output_template => 'Requests Count : %s',
perfdatas => [
{ label => 'requests_count', value => 'requests_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'requests_count', value => 'requests', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},

View File

@ -60,8 +60,8 @@ sub set_counters {
key_values => [ { name => 'completed', diff => 1 }, { name => 'display' } ],
output_template => 'Requests completed : %s',
perfdatas => [
{ label => 'request_completed', value => 'completed_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'request_completed', value => 'completed', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -69,8 +69,8 @@ sub set_counters {
key_values => [ { name => 'pending' }, { name => 'display' } ],
output_template => 'Requests pending : %s',
perfdatas => [
{ label => 'request_pending', value => 'pending_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'request_pending', value => 'pending', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -78,8 +78,8 @@ sub set_counters {
key_values => [ { name => 'stuck' }, { name => 'display' } ],
output_template => 'Threads stuck : %s',
perfdatas => [
{ label => 'thread_stuck', value => 'stuck_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'thread_stuck', value => 'stuck', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},

View File

@ -38,7 +38,7 @@ sub set_counters {
key_values => [ { name => 'AvgRequestLatency' } ],
output_template => 'Avg Request Latency : %s ms',
perfdatas => [
{ label => 'avg_request_latency', value => 'AvgRequestLatency_absolute', template => '%s',
{ label => 'avg_request_latency', value => 'AvgRequestLatency', template => '%s',
min => 0, unit => 'ms' },
],
}
@ -47,7 +47,7 @@ sub set_counters {
key_values => [ { name => 'MaxRequestLatency' } ],
output_template => 'Max Request Latency : %s ms',
perfdatas => [
{ label => 'max_request_latency', value => 'MaxRequestLatency_absolute', template => '%s',
{ label => 'max_request_latency', value => 'MaxRequestLatency', template => '%s',
min => 0, unit => 'ms' },
],
}
@ -56,7 +56,7 @@ sub set_counters {
key_values => [ { name => 'OutstandingRequests' } ],
output_template => 'Outstanding Requests : %s',
perfdatas => [
{ label => 'outstanding_requests', value => 'OutstandingRequests_absolute', template => '%s',
{ label => 'outstanding_requests', value => 'OutstandingRequests', template => '%s',
min => 0 },
],
}
@ -65,7 +65,7 @@ sub set_counters {
key_values => [ { name => 'PacketsReceived', diff => 1 } ],
output_template => 'Packets Received : %s',
perfdatas => [
{ label => 'packets_received', value => 'PacketsReceived_absolute', template => '%s',
{ label => 'packets_received', value => 'PacketsReceived', template => '%s',
min => 0 },
],
}
@ -74,7 +74,7 @@ sub set_counters {
key_values => [ { name => 'PacketsSent', diff => 1 } ],
output_template => 'Packets Sent : %s',
perfdatas => [
{ label => 'packets_sent', value => 'PacketsSent_absolute', template => '%s',
{ label => 'packets_sent', value => 'PacketsSent', template => '%s',
min => 0 },
],
}
@ -83,7 +83,7 @@ sub set_counters {
key_values => [ { name => 'NumAliveConnections' } ],
output_template => 'Num Alive Connections : %s',
perfdatas => [
{ label => 'num_connections', value => 'NumAliveConnections_absolute', template => '%s',
{ label => 'num_connections', value => 'NumAliveConnections', template => '%s',
min => 0 },
],
}

View File

@ -39,7 +39,7 @@ sub set_counters {
key_values => [ { name => 'total' } ],
output_template => 'total users active: %s',
perfdatas => [
{ value => 'total_absolute', template => '%s', min => 0 },
{ value => 'total', template => '%s', min => 0 },
],
}
}
@ -52,7 +52,7 @@ sub set_counters {
key_values => [ { name => 'users_' . $_ } ],
output_template => '%s (' . $_ . ')',
perfdatas => [
{ value => 'users_' . $_ . '_absolute', template => '%s', min => 0 },
{ value => 'users_' . $_ , template => '%s', min => 0 },
],
}
};

View File

@ -39,7 +39,7 @@ sub set_counters {
key_values => [ { name => 'loadedclass' } ],
output_template => 'class loaded: %s',
perfdatas => [
{ value => 'loadedclass_absolute', template => '%s', min => 0 },
{ value => 'loadedclass', template => '%s', min => 0 },
],
}
},
@ -47,7 +47,7 @@ sub set_counters {
key_values => [ { name => 'unloadedclass', diff => 1 } ],
output_template => 'class unloaded: %s',
perfdatas => [
{ value => 'unloadedclass_absolute', template => '%s', min => 0 },
{ value => 'unloadedclass', template => '%s', min => 0 },
],
}
},

View File

@ -39,7 +39,7 @@ sub set_counters {
key_values => [ { name => 'init_pool_size' } ],
output_template => 'pool initial size: %s',
perfdatas => [
{ value => 'init_pool_size_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'init_pool_size', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -47,7 +47,7 @@ sub set_counters {
key_values => [ { name => 'max_pool_size' } ],
output_template => 'pool max size: %s',
perfdatas => [
{ value => 'max_pool_size_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'max_pool_size', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -55,7 +55,7 @@ sub set_counters {
key_values => [ { name => 'idle_timeout' } ],
output_template => 'idle timeout: %s',
perfdatas => [
{ value => 'idle_timeout_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'idle_timeout', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -63,7 +63,7 @@ sub set_counters {
key_values => [ { name => 'active_conn_count' } ],
output_template => 'connections active: %s',
perfdatas => [
{ value => 'active_conn_count_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'active_conn_count', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -71,7 +71,7 @@ sub set_counters {
key_values => [ { name => 'cur_conn_count' } ],
output_template => 'connections current: %s',
perfdatas => [
{ value => 'cur_conn_count_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'cur_conn_count', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -79,7 +79,7 @@ sub set_counters {
key_values => [ { name => 'max_conn_count' } ],
output_template => 'connections max: %s',
perfdatas => [
{ value => 'max_conn_count_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'max_conn_count', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -87,7 +87,7 @@ sub set_counters {
key_values => [ { name => 'create_count', diff => 1 } ],
output_template => 'connections created: %s',
perfdatas => [
{ value => 'create_count_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'create_count', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -95,7 +95,7 @@ sub set_counters {
key_values => [ { name => 'close_count', diff => 1 } ],
output_template => 'connections closed: %s',
perfdatas => [
{ value => 'close_count_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'close_count', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},

View File

@ -39,7 +39,7 @@ sub set_counters {
key_values => [ { name => 'maxthreads' } ],
output_template => 'threads max: %s',
perfdatas => [
{ value => 'maxthreads_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'maxthreads', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -47,7 +47,7 @@ sub set_counters {
key_values => [ { name => 'minsparethreads' } ],
output_template => 'threads spare min: %s',
perfdatas => [
{ value => 'minsparethreads_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'minsparethreads', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -55,7 +55,7 @@ sub set_counters {
key_values => [ { name => 'maxsparethreads' } ],
output_template => 'threads spare max: %s',
perfdatas => [
{ value => 'maxsparethreads_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'maxsparethreads', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -63,7 +63,7 @@ sub set_counters {
key_values => [ { name => 'maxqueuesize' } ],
output_template => 'max queue size: %s',
perfdatas => [
{ value => 'maxqueuesize_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'maxqueuesize', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -71,7 +71,7 @@ sub set_counters {
key_values => [ { name => 'idle_timeout' } ],
output_template => 'idle timeout: %s',
perfdatas => [
{ value => 'idle_timeout_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'idle_timeout', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -79,7 +79,7 @@ sub set_counters {
key_values => [ { name => 'processedcount', diff => 1 } ],
output_template => 'threads processed: %s',
perfdatas => [
{ value => 'processedcount_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'processedcount', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -87,7 +87,7 @@ sub set_counters {
key_values => [ { name => 'currentthreadcount' } ],
output_template => 'threads current: %s',
perfdatas => [
{ value => 'currentthreadcount_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'currentthreadcount', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -95,7 +95,7 @@ sub set_counters {
key_values => [ { name => 'currentthreadcount' } ],
output_template => 'threads current: %s',
perfdatas => [
{ value => 'currentthreadcount_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'currentthreadcount', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -103,7 +103,7 @@ sub set_counters {
key_values => [ { name => 'availablethreadcount' } ],
output_template => 'threads available: %s',
perfdatas => [
{ value => 'availablethreadcount_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'availablethreadcount', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -111,7 +111,7 @@ sub set_counters {
key_values => [ { name => 'busythreadcount' } ],
output_template => 'threads busy: %s',
perfdatas => [
{ value => 'busythreadcount_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'busythreadcount', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -119,7 +119,7 @@ sub set_counters {
key_values => [ { name => 'maxavailablethreadcount' } ],
output_template => 'threads available max: %s',
perfdatas => [
{ value => 'maxavailablethreadcount_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'maxavailablethreadcount', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -127,7 +127,7 @@ sub set_counters {
key_values => [ { name => 'maxbusythreadcount' } ],
output_template => 'threads busy max: %s',
perfdatas => [
{ value => 'maxbusythreadcount_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'maxbusythreadcount', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -135,7 +135,7 @@ sub set_counters {
key_values => [ { name => 'maxprocessedtime' } ],
output_template => 'threads processed time max: %s ms',
perfdatas => [
{ value => 'maxprocessedtime_absolute', template => '%s', min => 0, unit => 'ms', label_extra_instance => 1 },
{ value => 'maxprocessedtime', template => '%s', min => 0, unit => 'ms', label_extra_instance => 1 },
],
}
},
@ -143,7 +143,7 @@ sub set_counters {
key_values => [ { name => 'createcount' } ],
output_template => 'threads created: %s',
perfdatas => [
{ value => 'createcount_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'createcount', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -151,7 +151,7 @@ sub set_counters {
key_values => [ { name => 'destroycount' } ],
output_template => 'threads destroyed: %s',
perfdatas => [
{ value => 'destroycount_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'destroycount', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},

View File

@ -38,7 +38,7 @@ sub set_counters {
key_values => [ { name => 'collection_count', diff => 1 } ],
output_template => 'gc collection count: %s',
perfdatas => [
{ value => 'collection_count_absolute', template => '%s', min => 0 },
{ value => 'collection_count', template => '%s', min => 0 },
],
}
},
@ -46,7 +46,7 @@ sub set_counters {
key_values => [ { name => 'collection_time', diff => 1 } ],
output_template => 'gc collection time: %s ms',
perfdatas => [
{ value => 'collection_time_absolute', template => '%s', min => 0, unit => 'ms' },
{ value => 'collection_time', template => '%s', min => 0, unit => 'ms' },
],
}
},

View File

@ -39,9 +39,9 @@ sub set_counters {
{ label => 'uptime', nlabel => 'java.uptime.milliseconds', set => {
key_values => [ { name => 'uptime' }, { name => 'uptime_date' } ],
output_template => 'java uptime: %s',
output_use => 'uptime_date_absolute',
output_use => 'uptime_date',
perfdatas => [
{ value => 'uptime_absolute', template => '%s',
{ value => 'uptime', template => '%s',
unit => 'ms' },
],
}

View File

@ -42,7 +42,7 @@ sub set_counters {
key_values => [ { name => $def->[0] } ],
output_template => $def->[0] . ': %s',
perfdatas => [
{ value => $def->[0] . '_absolute', template => '%s', min => 0 },
{ value => $def->[0] , template => '%s', min => 0 },
],
}
};

View File

@ -39,7 +39,7 @@ sub set_counters {
key_values => [ { name => 'minor_gc_count', diff => 1 } ],
output_template => 'minor count: %s',
perfdatas => [
{ value => 'minor_gc_count_absolute', template => '%s', min => 0 },
{ value => 'minor_gc_count', template => '%s', min => 0 },
],
}
},
@ -47,7 +47,7 @@ sub set_counters {
key_values => [ { name => 'minor_gc_time', diff => 1 } ],
output_template => 'minor time: %s ms',
perfdatas => [
{ value => 'minor_gc_time_absolute', template => '%s', min => 0, unit => 'ms' },
{ value => 'minor_gc_time', template => '%s', min => 0, unit => 'ms' },
],
}
},
@ -55,7 +55,7 @@ sub set_counters {
key_values => [ { name => 'full_gc_count', diff => 1 } ],
output_template => 'full count: %s',
perfdatas => [
{ value => 'full_gc_count_absolute', template => '%s', min => 0 },
{ value => 'full_gc_count', template => '%s', min => 0 },
],
}
},
@ -63,7 +63,7 @@ sub set_counters {
key_values => [ { name => 'full_gc_time', diff => 1 } ],
output_template => 'full time: %s ms',
perfdatas => [
{ value => 'full_gc_time_absolute', template => '%s', min => 0, unit => 'ms' },
{ value => 'full_gc_time', template => '%s', min => 0, unit => 'ms' },
],
}
},

View File

@ -38,7 +38,7 @@ sub set_counters {
key_values => [ { name => 'ksqltemp_count' } ],
output_template => 'ksqltemp table: %s',
perfdatas => [
{ value => 'ksqltemp_count_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'ksqltemp_count', template => '%s', min => 0, label_extra_instance => 1 },
],
}
}

View File

@ -38,7 +38,7 @@ sub set_counters {
key_values => [ { name => 'recyclebin_count' } ],
output_template => 'recyclebin table: %s',
perfdatas => [
{ value => 'recyclebin_count_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'recyclebin_count', template => '%s', min => 0, label_extra_instance => 1 },
],
}
}

View File

@ -38,7 +38,7 @@ sub set_counters {
key_values => [ { name => 'inactive' } ],
output_template => 'inactive: %s',
perfdatas => [
{ value => 'inactive_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'inactive', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -46,7 +46,7 @@ sub set_counters {
key_values => [ { name => 'active' } ],
output_template => 'active: %s',
perfdatas => [
{ value => 'active_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'active', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -54,7 +54,7 @@ sub set_counters {
key_values => [ { name => 'current' } ],
output_template => 'current: %s',
perfdatas => [
{ value => 'current_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'current', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},

View File

@ -38,7 +38,7 @@ sub set_counters {
key_values => [ { name => 'active' } ],
output_template => 'sessions active: %s',
perfdatas => [
{ value => 'active_absolute', template => '%s', min => 0, max => 'total_absolute', label_extra_instance => 1 },
{ value => 'active', template => '%s', min => 0, max => 'total', label_extra_instance => 1 },
],
}
},
@ -46,7 +46,7 @@ sub set_counters {
key_values => [ { name => 'inactive' } ],
output_template => 'sessions inactive: %s',
perfdatas => [
{ value => 'inactive_absolute', template => '%s', min => 0, max => 'total_absolute', label_extra_instance => 1 },
{ value => 'inactive', template => '%s', min => 0, max => 'total', label_extra_instance => 1 },
],
}
},
@ -62,7 +62,7 @@ sub set_counters {
key_values => [ { name => $_ } ],
output_template => 'wait class ' . $_ . ': %s',
perfdatas => [
{ value => $_ . '_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => $_ , template => '%s', min => 0, label_extra_instance => 1 },
],
}
};

View File

@ -38,7 +38,7 @@ sub set_counters {
key_values => [ { name => 'num_rows' } ],
output_template => 'number of rows: %s',
perfdatas => [
{ value => 'num_rows_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'num_rows', template => '%s', min => 0, label_extra_instance => 1 },
],
}
},
@ -46,7 +46,7 @@ sub set_counters {
key_values => [ { name => 'actual_num_rows' } ],
output_template => 'number of actual rows: %s',
perfdatas => [
{ value => 'actual_num_rows_absolute', template => '%s', min => 0, label_extra_instance => 1 },
{ value => 'actual_num_rows', template => '%s', min => 0, label_extra_instance => 1 },
],
}
}

View File

@ -39,7 +39,7 @@ sub set_counters {
key_values => [ { name => 'active_thread_count' } ],
output_template => 'threads active: %s',
perfdatas => [
{ value => 'active_thread_count_absolute', template => '%s', min => 0 },
{ value => 'active_thread_count', template => '%s', min => 0 },
],
}
},
@ -47,7 +47,7 @@ sub set_counters {
key_values => [ { name => 'stub_count' } ],
output_template => 'stubs: %s',
perfdatas => [
{ value => 'stub_count_absolute', template => '%s', min => 0 },
{ value => 'stub_count', template => '%s', min => 0 },
],
}
},
@ -55,7 +55,7 @@ sub set_counters {
key_values => [ { name => 'proxy_count' } ],
output_template => 'proxies: %s',
perfdatas => [
{ value => 'proxy_count_absolute', template => '%s', min => 0 },
{ value => 'proxy_count', template => '%s', min => 0 },
],
}
},
@ -63,7 +63,7 @@ sub set_counters {
key_values => [ { name => 'client_session_count' } ],
output_template => 'sessions client: %s',
perfdatas => [
{ value => 'client_session_count_absolute', template => '%s', min => 0 },
{ value => 'client_session_count', template => '%s', min => 0 },
],
}
},
@ -71,7 +71,7 @@ sub set_counters {
key_values => [ { name => 'server_session_count' } ],
output_template => 'sessions server: %s',
perfdatas => [
{ value => 'server_session_count_absolute', template => '%s', min => 0 },
{ value => 'server_session_count', template => '%s', min => 0 },
],
}
},
@ -79,7 +79,7 @@ sub set_counters {
key_values => [ { name => 'client_invoke_count_per_minute' } ],
output_template => 'clients invoke: %s/m',
perfdatas => [
{ value => 'client_invoke_count_per_minute_absolute', template => '%s', min => 0, unit => '/m' },
{ value => 'client_invoke_count_per_minute', template => '%s', min => 0, unit => '/m' },
],
}
},
@ -87,7 +87,7 @@ sub set_counters {
key_values => [ { name => 'processed_service_count_per_minute' } ],
output_template => 'processed service: %s/m',
perfdatas => [
{ value => 'processed_service_count_per_minute_absolute', template => '%s', min => 0, unit => '/m' },
{ value => 'processed_service_count_per_minute', template => '%s', min => 0, unit => '/m' },
],
}
},
@ -95,7 +95,7 @@ sub set_counters {
key_values => [ { name => 'client_invoke_count', diff => 1 } ],
output_template => 'clients invoked: %s',
perfdatas => [
{ value => 'client_invoke_count_absolute', template => '%s', min => 0 },
{ value => 'client_invoke_count', template => '%s', min => 0 },
],
}
},
@ -103,7 +103,7 @@ sub set_counters {
key_values => [ { name => 'processed_service_count', diff => 1 } ],
output_template => 'processed service: %s',
perfdatas => [
{ value => 'processed_service_count_absolute', template => '%s', min => 0 },
{ value => 'processed_service_count', template => '%s', min => 0 },
],
}
},

View File

@ -39,7 +39,7 @@ sub set_counters {
key_values => [ { name => 'active_count' } ],
output_template => 'active: %s',
perfdatas => [
{ value => 'active_count_absolute', template => '%s', min => 0 },
{ value => 'active_count', template => '%s', min => 0 },
],
}
},
@ -47,7 +47,7 @@ sub set_counters {
key_values => [ { name => 'timedout_count' } ],
output_template => 'timed out: %s',
perfdatas => [
{ value => 'timedout_count_absolute', template => '%s', min => 0 },
{ value => 'timedout_count', template => '%s', min => 0 },
],
}
},
@ -55,7 +55,7 @@ sub set_counters {
key_values => [ { name => 'committed_count', diff => 1 } ],
output_template => 'committed: %s',
perfdatas => [
{ value => 'committed_count_absolute', template => '%s', min => 0 },
{ value => 'committed_count', template => '%s', min => 0 },
],
}
},
@ -63,7 +63,7 @@ sub set_counters {
key_values => [ { name => 'rolledback_count', diff => 1 } ],
output_template => 'rolledback: %s',
perfdatas => [
{ value => 'rolledback_count_absolute', template => '%s', min => 0 },
{ value => 'rolledback_count', template => '%s', min => 0 },
],
}
},
@ -71,7 +71,7 @@ sub set_counters {
key_values => [ { name => 'transaction_count', diff => 1 } ],
output_template => 'created: %s',
perfdatas => [
{ value => 'transaction_count_absolute', template => '%s', min => 0 },
{ value => 'transaction_count', template => '%s', min => 0 },
],
}
},
@ -79,7 +79,7 @@ sub set_counters {
key_values => [ { name => 'total_transaction_time', diff => 1 } ],
output_template => 'total time: %s ms',
perfdatas => [
{ value => 'total_transaction_time_absolute', template => '%s', min => 0, unit => 'ms' },
{ value => 'total_transaction_time', template => '%s', min => 0, unit => 'ms' },
],
}
},
@ -87,7 +87,7 @@ sub set_counters {
key_values => [ { name => 'max_transaction_time', diff => 1 } ],
output_template => 'max time: %s ms',
perfdatas => [
{ value => 'max_transaction_time_absolute', template => '%s', min => 0, unit => 'ms' },
{ value => 'max_transaction_time', template => '%s', min => 0, unit => 'ms' },
],
}
},
@ -95,7 +95,7 @@ sub set_counters {
key_values => [ { name => 'default_timeout' } ],
output_template => 'default timeout: %s',
perfdatas => [
{ value => 'default_timeout_absolute', template => '%s', min => 0 },
{ value => 'default_timeout', template => '%s', min => 0 },
],
}
},

View File

@ -37,7 +37,7 @@ sub set_counters {
key_values => [ { name => 'total' } ],
output_template => '%d Total users',
perfdatas => [
{ label => 'total_users', value => 'total_absolute', template => '%d',
{ label => 'total_users', value => 'total', template => '%d',
unit => 'users', min => 0, label_extra_instance => 0 },
],
}
@ -46,7 +46,7 @@ sub set_counters {
key_values => [ { name => 'unique' } ],
output_template => '%d Unique users',
perfdatas => [
{ label => 'unique_users', value => 'unique_absolute', template => '%d',
{ label => 'unique_users', value => 'unique', template => '%d',
unit => 'users', min => 0, label_extra_instance => 0 },
],
}

View File

@ -55,7 +55,7 @@ sub set_counters {
key_values => [ { name => 'problems_open' } ],
output_template => 'number of open problems : %s',
perfdatas => [
{ value => 'problems_open_absolute', template => '%s', value => 'problems_open_absolute', min => 0 },
{ value => 'problems_open', template => '%s', value => 'problems_open', min => 0 },
],
}
},

View File

@ -47,20 +47,20 @@ sub custom_metric_output {
my ($self, %options) = @_;
my $msg;
if (defined($mapping_units->{ $self->{result_values}->{unit_absolute} }->{scale})) {
if (defined($mapping_units->{ $self->{result_values}->{unit} }->{scale})) {
$msg = sprintf(
'value: %s %s%s',
$self->{perfdata}->change_bytes(
value => $self->{result_values}->{value_absolute},
network => $mapping_units->{ $self->{result_values}->{unit_absolute} }->{network}
value => $self->{result_values}->{value},
network => $mapping_units->{ $self->{result_values}->{unit} }->{network}
),
$mapping_units->{ $self->{result_values}->{unit_absolute} }->{extra_unit}
$mapping_units->{ $self->{result_values}->{unit} }->{extra_unit}
);
} else {
$msg = sprintf(
'value: %s %s',
$self->{result_values}->{value_absolute},
$self->{result_values}->{unit_absolute}
$self->{result_values}->{value},
$self->{result_values}->{unit}
);
}
return $msg;
@ -70,10 +70,10 @@ sub custom_metric_perfdata {
my ($self, %options) = @_;
$self->{output}->perfdata_add(
unit => $self->{result_values}->{unit_absolute},
nlabel => 'scenario.metric.usage.' . $mapping_units->{ $self->{result_values}->{unit_absolute} }->{label},
unit => $self->{result_values}->{unit},
nlabel => 'scenario.metric.usage.' . $mapping_units->{ $self->{result_values}->{unit} }->{label},
instances => $self->{instance},
value => $self->{result_values}->{value_absolute},
value => $self->{result_values}->{value},
);
}

View File

@ -37,8 +37,8 @@ sub set_counters {
key_values => [ { name => 'response_time' }, { name => 'display' } ],
output_template => 'Total Response Time: %.3fs',
perfdatas => [
{ value => 'response_time_absolute', template => '%.3f',
min => 0, unit => 's', label_extra_instance => 1, instance_use => 'display_absolute' },
{ value => 'response_time', template => '%.3f',
min => 0, unit => 's', label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -46,8 +46,8 @@ sub set_counters {
key_values => [ { name => 'availability' }, { name => 'display' } ],
output_template => 'Availability: %.2f%%',
perfdatas => [
{ value => 'availability_absolute', template => '%s',
min => 0, max => 100, unit => '%', label_extra_instance => 1, instance_use => 'display_absolute' },
{ value => 'availability', template => '%s',
min => 0, max => 100, unit => '%', label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -55,8 +55,8 @@ sub set_counters {
key_values => [ { name => 'avg_step_response_time' }, { name => 'display' } ],
output_template => 'Step Average Response Time: %.3fs',
perfdatas => [
{ value => 'avg_step_response_time_absolute', template => '%.3f',
min => 0, unit => 's', label_extra_instance => 1, instance_use => 'display_absolute' },
{ value => 'avg_step_response_time', template => '%.3f',
min => 0, unit => 's', label_extra_instance => 1, instance_use => 'display' },
],
}
},

View File

@ -54,7 +54,7 @@ sub set_counters {
key_values => [ { name => $_ } ],
output_template => $_ . ': %s',
perfdatas => [
{ value => $_ . '_absolute', template => '%s', min => 0 },
{ value => $_ , template => '%s', min => 0 },
],
}
};

View File

@ -44,7 +44,7 @@ sub set_counters {
key_values => [ { name => 'StorePercentUsage' }, { name => 'display' } ],
output_template => 'store usage: %.2f %%',
perfdatas => [
{ value => 'StorePercentUsage_absolute', template => '%.2f', unit => '%', min => 0, max => 100, label_extra_instance => 1 }
{ value => 'StorePercentUsage', template => '%.2f', unit => '%', min => 0, max => 100, label_extra_instance => 1 }
]
}
},
@ -52,7 +52,7 @@ sub set_counters {
key_values => [ { name => 'TempPercentUsage' }, { name => 'display' } ],
output_template => 'temporary usage: %.2f %%',
perfdatas => [
{ value => 'TempPercentUsage_absolute', template => '%.2f', unit => '%', min => 0, max => 100, label_extra_instance => 1 }
{ value => 'TempPercentUsage', template => '%.2f', unit => '%', min => 0, max => 100, label_extra_instance => 1 }
]
}
},
@ -60,7 +60,7 @@ sub set_counters {
key_values => [ { name => 'MemoryPercentUsage' }, { name => 'display' } ],
output_template => 'memory usage: %.2f %%',
perfdatas => [
{ value => 'MemoryPercentUsage_absolute', template => '%.2f', unit => '%', min => 0, max => 100, label_extra_instance => 1 }
{ value => 'MemoryPercentUsage', template => '%.2f', unit => '%', min => 0, max => 100, label_extra_instance => 1 }
]
}
}
@ -72,7 +72,7 @@ sub set_counters {
key_values => [ { name => 'AverageEnqueueTime' }, { name => 'display' } ],
output_template => 'average time messages remained enqueued: %.3f ms',
perfdatas => [
{ value => 'AverageEnqueueTime_absolute',
{ value => 'AverageEnqueueTime',
template => '%.3f', unit => 'ms', min => 0, label_extra_instance => 1 }
]
}
@ -81,7 +81,7 @@ sub set_counters {
key_values => [ { name => 'ConsumerCount' }, { name => 'display' } ],
output_template => 'consumers connected: %s',
perfdatas => [
{ value => 'ConsumerCount_absolute',
{ value => 'ConsumerCount',
template => '%s', min => 0, label_extra_instance => 1 }
]
}
@ -90,7 +90,7 @@ sub set_counters {
key_values => [ { name => 'ProducerCount' }, { name => 'display' } ],
output_template => 'producers connected: %s',
perfdatas => [
{ value => 'ProducerCount_absolute',
{ value => 'ProducerCount',
template => '%s', min => 0, label_extra_instance => 1 }
]
}
@ -99,7 +99,7 @@ sub set_counters {
key_values => [ { name => 'MemoryPercentUsage' }, { name => 'display' } ],
output_template => 'memory usage: %.2f %%',
perfdatas => [
{ value => 'MemoryPercentUsage_absolute',
{ value => 'MemoryPercentUsage',
template => '%.2f', unit => '%', min => 0, max => 100, label_extra_instance => 1 }
]
}
@ -108,7 +108,7 @@ sub set_counters {
key_values => [ { name => 'QueueSize' }, { name => 'display' } ],
output_template => 'queue size: %s',
perfdatas => [
{ value => 'QueueSize_absolute',
{ value => 'QueueSize',
template => '%s', min => 0, label_extra_instance => 1 }
]
}
@ -117,7 +117,7 @@ sub set_counters {
key_values => [ { name => 'EnqueueCount', diff => 1 }, { name => 'display' } ],
output_template => 'messages enqueued: %s',
perfdatas => [
{ value => 'EnqueueCount_absolute',
{ value => 'EnqueueCount',
template => '%s', min => 0, label_extra_instance => 1 }
]
}
@ -126,7 +126,7 @@ sub set_counters {
key_values => [ { name => 'DequeueCount', diff => 1 }, { name => 'display' } ],
output_template => 'messages dequeued: %s',
perfdatas => [
{ value => 'DequeueCount_absolute',
{ value => 'DequeueCount',
template => '%s', min => 0, label_extra_instance => 1 }
]
}
@ -135,7 +135,7 @@ sub set_counters {
key_values => [ { name => 'ExpiredCount', diff => 1 }, { name => 'display' } ],
output_template => 'messages expired: %s',
perfdatas => [
{ value => 'ExpiredCount_absolute',
{ value => 'ExpiredCount',
template => '%s', min => 0, label_extra_instance => 1 }
]
}
@ -144,7 +144,7 @@ sub set_counters {
key_values => [ { name => 'InFlightCount', diff => 1 }, { name => 'display' } ],
output_template => 'messages in-flighted: %s',
perfdatas => [
{ value => 'InFlightCount_absolute',
{ value => 'InFlightCount',
template => '%s', min => 0, label_extra_instance => 1 }
]
}
@ -154,7 +154,7 @@ sub set_counters {
output_template => 'average messages size: %s %s',
output_change_bytes => 1,
perfdatas => [
{ value => 'AverageMessageSize_absolute',
{ value => 'AverageMessageSize',
template => '%s', unit => 'B', min => 0, label_extra_instance => 1 }
]
}

View File

@ -42,8 +42,8 @@ sub custom_traffic_in_perfdata {
$self->{output}->perfdata_add(
nlabel => $self->{nlabel}, unit => 'b/s',
instances => [$self->{result_values}->{qmgr_name_absolute}, $self->{result_values}->{channel_name_absolute}],
value => $self->{result_values}->{traffic_in_per_second},
instances => [$self->{result_values}->{qmgr_name}, $self->{result_values}->{channel_name}],
value => $self->{result_values}->{traffic_in},
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}),
min => 0
@ -55,8 +55,8 @@ sub custom_traffic_out_perfdata {
$self->{output}->perfdata_add(
nlabel => $self->{nlabel}, unit => 'b/s',
instances => [$self->{result_values}->{qmgr_name_absolute}, $self->{result_values}->{channel_name_absolute}],
value => $self->{result_values}->{traffic_out_per_second},
instances => [$self->{result_values}->{qmgr_name}, $self->{result_values}->{channel_name}],
value => $self->{result_values}->{traffic_out},
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}),
min => 0
@ -89,16 +89,16 @@ sub set_counters {
}
},
{ label => 'traffic-in', nlabel => 'channel.traffic.in.bitspersecond', set => {
key_values => [ { name => 'traffic_in', diff => 1 }, { name => 'qmgr_name' }, { name => 'channel_name' } ],
key_values => [ { name => 'traffic_in', per_second => 1 }, { name => 'qmgr_name' }, { name => 'channel_name' } ],
output_template => 'traffic in: %s %s/s',
per_second => 1, output_change_bytes => 2,
output_change_bytes => 2,
closure_custom_perfdata => $self->can('custom_traffic_in_perfdata')
}
},
{ label => 'traffic-out', nlabel => 'channel.traffic.out.bitspersecond', set => {
key_values => [ { name => 'traffic_out', diff => 1 }, { name => 'qmgr_name' }, { name => 'channel_name' } ],
key_values => [ { name => 'traffic_out', per_second => 1 }, { name => 'qmgr_name' }, { name => 'channel_name' } ],
output_template => 'traffic out: %s %s/s',
per_second => 1, output_change_bytes => 2,
output_change_bytes => 2,
closure_custom_perfdata => $self->can('custom_traffic_out_perfdata')
}
}
@ -115,8 +115,9 @@ sub new {
'filter-type:s' => { name => 'filter_type' },
'unknown-status:s' => { name => 'unknown_status', default => '' },
'warning-status:s' => { name => 'warning_status', default => '' },
'critical-status:s' => { name => 'critical_status', default => '%{channel_status} !~ /running|idle/i' },
'critical-status:s' => { name => 'critical_status', default => '%{channel_status} !~ /running|idle/i' }
});
return $self;
}
@ -174,7 +175,7 @@ sub manage_selection {
}
}
$self->{cache_name} = "ibmmq_" . $self->{mode} . '_' . $options{custom}->get_hostname() . '_' . $options{custom}->get_port() . '_' .
$self->{cache_name} = 'ibmmq_' . $self->{mode} . '_' . $options{custom}->get_hostname() . '_' . $options{custom}->get_port() . '_' .
(defined($self->{option_results}->{filter_counters}) ? md5_hex($self->{option_results}->{filter_counters}) : md5_hex('all'));
}

View File

@ -42,8 +42,8 @@ sub custom_connections_perfdata {
$self->{output}->perfdata_add(
nlabel => $self->{nlabel},
instances => $self->{result_values}->{display_absolute},
value => $self->{result_values}->{connection_count_absolute},
instances => $self->{result_values}->{display},
value => $self->{result_values}->{connection_count},
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}),
min => 0

View File

@ -31,7 +31,7 @@ sub custom_oldest_output {
return sprintf(
'oldest message: %s',
centreon::plugins::misc::change_seconds(value => $self->{result_values}->{oldest_msg_age_absolute})
centreon::plugins::misc::change_seconds(value => $self->{result_values}->{oldest_msg_age})
);
}
@ -40,8 +40,8 @@ sub custom_connections_perfdata {
$self->{output}->perfdata_add(
nlabel => $self->{nlabel},
instances => [$self->{result_values}->{qmgr_name_absolute}, $self->{result_values}->{queue_name_absolute}],
value => $self->{result_values}->{open_input_count_absolute},
instances => [$self->{result_values}->{qmgr_name}, $self->{result_values}->{queue_name}],
value => $self->{result_values}->{open_input_count},
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}),
min => 0
@ -53,8 +53,8 @@ sub custom_qdepth_perfdata {
$self->{output}->perfdata_add(
nlabel => $self->{nlabel},
instances => [$self->{result_values}->{qmgr_name_absolute}, $self->{result_values}->{queue_name_absolute}],
value => $self->{result_values}->{current_qdepth_absolute},
instances => [$self->{result_values}->{qmgr_name}, $self->{result_values}->{queue_name}],
value => $self->{result_values}->{current_qdepth},
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}),
min => 0
@ -66,8 +66,8 @@ sub custom_oldest_perfdata {
$self->{output}->perfdata_add(
nlabel => $self->{nlabel},
instances => [$self->{result_values}->{qmgr_name_absolute}, $self->{result_values}->{queue_name_absolute}],
value => $self->{result_values}->{oldest_msg_age_absolute},
instances => [$self->{result_values}->{qmgr_name}, $self->{result_values}->{queue_name}],
value => $self->{result_values}->{oldest_msg_age},
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}),
min => 0

View File

@ -51,25 +51,23 @@ sub set_counters {
}
},
{ label => 'read', nlabel => 'node.io.read.usage.bytespersecond', set => {
key_values => [ { name => 'io_read_bytes', diff => 1 }, { name => 'display' } ],
key_values => [ { name => 'io_read_bytes', per_second => 1 }, { name => 'display' } ],
output_template => 'read i/o : %s %s/s',
per_second => 1, output_change_bytes => 1,
output_change_bytes => 1,
perfdatas => [
{ value => 'io_read_bytes_per_second', template => '%d',
unit => 'B/s', min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
],
{ template => '%d', unit => 'B/s', min => 0, label_extra_instance => 1, instance_use => 'display' }
]
}
},
{ label => 'write', nlabel => 'node.io.write.usage.bytespersecond', set => {
key_values => [ { name => 'io_write_bytes', diff => 1 }, { name => 'display' } ],
key_values => [ { name => 'io_write_bytes', per_second => 1 }, { name => 'display' } ],
output_template => 'write i/o : %s %s/s',
per_second => 1, output_change_bytes => 1,
output_change_bytes => 1,
perfdatas => [
{ value => 'io_write_bytes_per_second', template => '%d',
unit => 'B/s', min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
],
{ template => '%d', unit => 'B/s', min => 0, label_extra_instance => 1, instance_use => 'display' }
]
}
},
}
];
}

View File

@ -54,8 +54,8 @@ sub set_counters {
key_values => [ { name => 'queue_messages' }, { name => 'display' } ],
output_template => 'current queue messages : %s',
perfdatas => [
{ label => 'queue_msg', value => 'queue_messages_absolute', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'queue_msg', value => 'queue_messages', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -63,8 +63,8 @@ sub set_counters {
key_values => [ { name => 'queue_messages_ready' }, { name => 'display' } ],
output_template => 'current queue messages ready : %s',
perfdatas => [
{ label => 'queue_msg_ready', value => 'queue_messages_ready_absolute', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'queue_msg_ready', value => 'queue_messages_ready', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},

View File

@ -38,49 +38,42 @@ sub set_counters {
key_values => [ { name => 'queue_messages' } ],
output_template => 'current queue messages : %s',
perfdatas => [
{ label => 'queue_msg', value => 'queue_messages_absolute', template => '%d',
min => 0 },
],
{ template => '%d', min => 0 }
]
}
},
{ label => 'queue-msg-ready', nlabel => 'system.queue.messages.ready.count', set => {
key_values => [ { name => 'queue_messages_ready' } ],
output_template => 'current queue messages ready : %s',
perfdatas => [
{ label => 'queue_msg_ready', value => 'queue_messages_ready_absolute', template => '%d',
min => 0 },
],
{ template => '%d', min => 0 }
]
}
},
{ label => 'db-event-queue', nlabel => 'system.db.event.queue.count', set => {
key_values => [ { name => 'db_event_queue' } ],
output_template => 'db event queue : %s',
perfdatas => [
{ label => 'db_event_queue', value => 'db_event_queue_absolute', template => '%d',
min => 0 },
],
{ template => '%d', min => 0 }
]
}
},
{ label => 'disk-read-iops', nlabel => 'system.disk.read.usage.iops', set => {
key_values => [ { name => 'disk_reads', diff => 1 } ],
per_second => 1,
key_values => [ { name => 'disk_reads', per_second => 1 } ],
output_template => 'disk reads iops : %s',
perfdatas => [
{ label => 'disk_reads', value => 'disk_reads_per_second', template => '%d',
unit => 'iops', min => 0, },
],
{ template => '%d', unit => 'iops', min => 0 }
]
}
},
{ label => 'disk-write-iops', nlabel => 'system.disk.write.usage.iops', set => {
key_values => [ { name => 'disk_writes', diff => 1 } ],
per_second => 1,
key_values => [ { name => 'disk_writes', per_second => 1 } ],
output_template => 'disk writes iops : %s',
perfdatas => [
{ label => 'disk_writes', value => 'disk_writes_per_second', template => '%d',
unit => 'iops', min => 0, },
],
{ template => '%d', unit => 'iops', min => 0 }
]
}
},
}
];
}
@ -91,6 +84,7 @@ sub new {
$options{options}->add_options(arguments => {
});
return $self;
}

View File

@ -55,8 +55,8 @@ sub set_counters {
key_values => [ { name => 'queue_messages' }, { name => 'display' } ],
output_template => 'current queue messages : %s',
perfdatas => [
{ label => 'queue_msg', value => 'queue_messages_absolute', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'queue_msg', value => 'queue_messages', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
@ -64,8 +64,8 @@ sub set_counters {
key_values => [ { name => 'queue_messages_ready' }, { name => 'display' } ],
output_template => 'current queue messages ready : %s',
perfdatas => [
{ label => 'queue_msg_ready', value => 'queue_messages_ready_absolute', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
{ label => 'queue_msg_ready', value => 'queue_messages_ready', template => '%d',
min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},

Some files were not shown because too many files have changed in this diff Show More