diff --git a/centreon-plugins/cloud/aws/custom/paws.pm b/centreon-plugins/cloud/aws/custom/paws.pm index b971dffa9..59513974d 100644 --- a/centreon-plugins/cloud/aws/custom/paws.pm +++ b/centreon-plugins/cloud/aws/custom/paws.pm @@ -582,8 +582,8 @@ sub health_describe_events { my $health = Paws->service('Health', caller => $lwp_caller, region => $self->{option_results}->{region}); my $health_options = { Filter => {} }; foreach ((['service', 'Services'], ['region', 'Regions'], ['entity_value', 'EntityValues'], ['event_status', 'EventStatusCodes'], ['event_category', 'EventTypeCategories'])) { - next if (!defined($options{ $_->[0] })); - $health_options->{Filter}->{ $_->[1] } = $_->[0]; + next if (!defined($options{ 'filter_' . $_->[0] })); + $health_options->{Filter}->{ $_->[1] } = $options{ 'filter_' . $_->[0] }; } while ((my $events = $health->DescribeEvents(%$health_options))) { diff --git a/centreon-plugins/cloud/aws/health/mode/events.pm b/centreon-plugins/cloud/aws/health/mode/events.pm index 16e8c306f..55d29d0e8 100644 --- a/centreon-plugins/cloud/aws/health/mode/events.pm +++ b/centreon-plugins/cloud/aws/health/mode/events.pm @@ -103,7 +103,7 @@ sub check_options { next if ($option eq ''); $self->{filter_options}->{'filter_' . $_} = [] if (!defined($self->{filter_options}->{'filter_' . $_})); - push @{$self->{filter_options}->{'filter_' . $_}}, $option; + push @{$self->{filter_options}->{'filter_' . $_}}, split(/,/, $options); } } }