fix aws apigateway and kinesis

This commit is contained in:
Colin Gagnaire 2019-09-12 14:33:40 +02:00
parent 5a9bef0b04
commit a0996663ff
4 changed files with 33 additions and 53 deletions

View File

@ -95,11 +95,10 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, force_new_perfdata => 1, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"api-name:s@" => { name => 'api_name' },
"filter-metric:s" => { name => 'filter_metric' },
});
$options{options}->add_options(arguments => {
"api-name:s@" => { name => 'api_name' },
"filter-metric:s" => { name => 'filter_metric' },
});
return $self;
}
@ -185,16 +184,11 @@ Set the API name (Required) (Can be multiple).
Filter metrics (Can be: 'Latency', 'IntegrationLatency')
=item B<--warning-*>
=item B<--warning-*> B<--critical-*>
Thresholds warning
star substitution possibilities: client-latency, backend-latency
=item B<--critical-*>
Thresholds critical
star substitution possibilities: client-latency, backend-latency
=back
=cut

View File

@ -28,17 +28,17 @@ use warnings;
my %metrics_mapping = (
'Count' => {
'output' => 'Client Requests',
'label' => 'request-client',
'label' => 'requests-client',
'nlabel' => 'apigateway.requests.client.count'
},
'4XXError' => {
'output' => 'HTTP 4XX Errors',
'label' => 'requests-4xx-errors',
'label' => 'requests-errors-4xx',
'nlabel' => 'apigateway.requests.errors.4xx.count'
},
'5XXError' => {
'output' => 'HTTP 5XX Errors',
'label' => 'requests-5xx-errors',
'label' => 'requests-errors-5xx',
'nlabel' => 'apigateway.requests.errors.5xx.count'
},
);
@ -96,11 +96,10 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, force_new_perfdata => 1, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"api-name:s@" => { name => 'api_name' },
"filter-metric:s" => { name => 'filter_metric' },
});
$options{options}->add_options(arguments => {
"api-name:s@" => { name => 'api_name' },
"filter-metric:s" => { name => 'filter_metric' },
});
return $self;
}
@ -188,15 +187,11 @@ Set the api name (Required) (Can be multiple).
Filter metrics (Can be: 'Count', '4XXError', '5XXError')
=item B<--warning-*>
=item B<--warning-*> B<--critical-*>
Thresholds warning
star substitusion possibilities: request-client, requests-4xx-errors, requests-5xx-errors
=item B<--critical-*>
Thresholds critical
star substitusion possibilities: request-client, requests-4xx-errors, requests-5xx-errors
star substitusion possibilities: requests-client,
requests-errors-4xx, requests-errors-5xx
=back

View File

@ -135,11 +135,10 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, force_new_perfdata => 1, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"stream-name:s@" => { name => 'stream_name' },
"filter-metric:s" => { name => 'filter_metric' },
});
$options{options}->add_options(arguments => {
"stream-name:s@" => { name => 'stream_name' },
"filter-metric:s" => { name => 'filter_metric' },
});
return $self;
}
@ -225,17 +224,13 @@ Set the stream name (Required) (Can be multiple).
Filter metrics (Can be: 'GetRecords.IteratorAgeMilliseconds', 'GetRecords.Bytes', )
=item B<--warning-*>
=item B<--warning-*> B<--critical-*>
Thresholds warning
can be: 'records-get-iteratorage', 'records-get-volume', 'records-get-latency', 'records-get-success',
'records-put-volume', 'records-put-latency', 'records-get-success',
=item B<--critical-*>
Thresholds critical
can be: 'records-get-iteratorage', 'records-get-volume', 'records-get-latency', 'records-get-success',
'records-put-volume', 'records-put-latency', 'records-get-success',
can be: 'records-get-iteratorage', 'records-get-volume',
'records-get-latency', 'records-get-success',
'records-put-volume', 'records-put-latency',
'records-get-success',
=back

View File

@ -111,11 +111,10 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, force_new_perfdata => 1, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"stream-name:s@" => { name => 'stream_name' },
"filter-metric:s" => { name => 'filter_metric' },
});
$options{options}->add_options(arguments => {
"stream-name:s@" => { name => 'stream_name' },
"filter-metric:s" => { name => 'filter_metric' },
});
return $self;
}
@ -200,17 +199,14 @@ Set the stream name (Required) (Can be multiple).
=item B<--filter-metric>
Filter metrics (Can be: 'IncomingBytes', 'IncomingRecords', 'OutgoingBytes', 'OutgoingRecords')
Filter metrics (Can be: 'IncomingBytes', 'IncomingRecords',
'OutgoingBytes', 'OutgoingRecords')
=item B<--warning-*>
=item B<--warning-*> B<--critical-*>
Thresholds warning
can be: 'incoming-bytes', 'incoming-records', 'outgoing-volume', 'outgoing-volume'.
=item B<--critical-*>
Thresholds critical
can be: 'incoming-bytes', 'incoming-records', 'outgoing-volume', 'outgoing-volume'.
can be: 'incoming-bytes', 'incoming-records',
'outgoing-volume', 'outgoing-volume'.
=back