-
Notifications
You must be signed in to change notification settings - Fork 298
Description
Hello everyone, I'm reporting this bug and hope I can contribute.
Bug report
Quick description
*We have an active alarm, which can be confirmed when using the --debug option. The output indicates that the instance memory has ALARM. However, the final result is: OK: 0 problem(s) detected | 'alerts'=0;;;0; *
How to reproduce
Please provide the initial conditions to reproduce the bug down below
- Environment: AlmaLinux release 9.6 (Sage Margay)
- Version of the plugin: centreon-plugin-Cloud-Aws-Cloudwatch-Api-20250800-1.el9.noarch
- Information about the monitored resource: AWS Cloudwatch aws-cli/2.28.22 Python/3.13.7 Linux/5.14.0-570.24.1.el9_6.x86_64 exe/x86_64.almalinux.9
- Command line: /usr/lib/centreon/plugins/centreon_aws_cloudwatch_api.pl --plugin=cloud::aws::cloudwatch::plugin --mode=get-alarms --custommode='awscli' --aws-secret-key='' --aws-access-key='' --aws-role-arn='' --proxyurl='' --region='sa-east-1' --filter-alarm-name='' --warning-status='%{state_value} =~ /INSUFFICIENT_DATA/i' --critical-status='%{state_value} =~ /ALARM/i' --verbose.
Expected result
CRITICAL: 1 problem(s) detected
Actual result
*
breaching
2025-09-01T18:58:33.193Z
ALARM
40.0
Threshold Crossed: no datapoints were received for 1 period and 1 missing datapoint was treated as [Breaching].
2025-09-02T04:39:15.668Z
2025-09-02T04:39:15.668Z
GreaterThanThreshold
Instance memory
1
{"version":"1.0","queryDate":"2025-09-02T04:39:15.664+0000","period":300,"recentDatapoints":[],"threshold":40.0,"evaluatedDatapoints":[{"timestamp":"2025-09-02T04:34:00.000+0000"}]}
true
1
MAX(e1)
true
Instance memory usage
e2
300
SELECT AVG(mem_used_percent) FROM SCHEMA(CWAgent,InstanceId) GROUP BY InstanceId ORDER BY AVG() DESC
false
Instance
e1
87b60bf6-d984-4612-8e58-c77ed25e9809/1751060096124
arn:aws:cloudwatch:sa-east-1:074071149174:alarm:Instance memory
af6003e5-476b-400c-a06f-77ce382f0c99
2025-09-02 09:44:31,070 - MainThread - botocore.hooks - DEBUG - Event needs-retry.cloudwatch.DescribeAlarms: calling handler <botocore.retryhandler.RetryHandler object at 0x7f8741f3e650>
2025-09-02 09:44:31,071 - MainThread - botocore.retryhandler - DEBUG - No retry needed.
OK: 0 problem(s) detected | 'alerts'=0;;;0;
Command line: 'aws cloudwatch describe-alarms --region sa-east-1 --output json --debug'
ok: status : skipped (no value(s))
ok: status : skipped (no value(s)).*