Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
centreon
centreon-plugins
Commits
b3dc4285
Commit
b3dc4285
authored
Aug 09, 2021
by
Simon Bomm
Browse files
enh: aws-status only system check
parent
55fdee83
Changes
1
Hide whitespace changes
Inline
Side-by-side
cloud/aws/ec2/mode/status.pm
View file @
b3dc4285
...
...
@@ -109,6 +109,7 @@ sub new {
$options
{
options
}
->
add_options
(
arguments
=>
{
'
type:s
'
=>
{
name
=>
'
type
'
},
'
name:s@
'
=>
{
name
=>
'
name
'
},
'
system-only
'
=>
{
name
=>
'
system_only
'
},
'
warning-status:s
'
=>
{
name
=>
'
warning_status
',
default
=>
''
},
'
critical-status:s
'
=>
{
name
=>
'
critical_status
',
default
=>
'
%{status} =~ /failed/i
'
}
});
...
...
@@ -145,8 +146,9 @@ sub check_options {
$self
->
{
aws_period
}
=
defined
(
$self
->
{
option_results
}
->
{
period
})
?
$self
->
{
option_results
}
->
{
period
}
:
60
;
$self
->
{
aws_statistics
}
=
['
Average
'];
foreach
my
$metric
('
StatusCheckFailed_
Instance
',
'
StatusCheckFailed_
System
')
{
foreach
my
$metric
('
StatusCheckFailed_
System
',
'
StatusCheckFailed_
Instance
')
{
push
@
{
$self
->
{
aws_metrics
}},
$metric
;
last
if
(
defined
(
$self
->
{
option_results
}
->
{
system_only
}));
}
$self
->
change_macros
(
macros
=>
['
warning_status
',
'
critical_status
']);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment