Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidArgumentException in monitor-aurora-with-grafana lamda #108

Open
syndic8-joe opened this issue Nov 29, 2023 · 2 comments
Open

InvalidArgumentException in monitor-aurora-with-grafana lamda #108

syndic8-joe opened this issue Nov 29, 2023 · 2 comments
Assignees

Comments

@syndic8-joe
Copy link

syndic8-joe commented Nov 29, 2023

I implemented the monitor-aurora-with-grafana script as described without issue (all 4 steps in the CF stack were successful), however each lamda invocation includes this error:

[ERROR] InvalidArgumentException: An error occurred (InvalidArgumentException) when calling the GetResourceMetrics operation: This group is not a known group: db.application is not valid for current resourceTraceback (most recent call last):  File "/var/task/lambda_function.py", line 33, in lambda_handler    pi_response = get_db_resource_metrics(instance)  File "/var/task/lambda_function.py", line 78, in get_db_resource_metrics    response = pi_client.get_resource_metrics(  File "/var/runtime/botocore/client.py", line 530, in _api_call    return self._make_api_call(operation_name, kwargs)  File "/var/runtime/botocore/client.py", line 960, in _make_api_call    raise error_class(parsed_response, operation_name) | [ERROR] InvalidArgumentException: An error occurred (InvalidArgumentException) when calling the GetResourceMetrics operation: This group is not a known group: db.application is not valid for current resource Traceback (most recent call last):   File "/var/task/lambda_function.py", line 33, in lambda_handler     pi_response = get_db_resource_metrics(instance)   File "/var/task/lambda_function.py", line 78, in get_db_resource_metrics     response = pi_client.get_resource_metrics(   File "/var/runtime/botocore/client.py", line 530, in _api_call     return self._make_api_call(operation_name, kwargs)   File "/var/runtime/botocore/client.py", line 960, in _make_api_call     raise error_class(parsed_response, operation_name)

and no metrics are published to CloudWatch.

I have confirmed the region is correct, and we have multiple databases in this region with Performance Insights enabled.

@syndic8-joe syndic8-joe changed the title Logs Insights Example Query monitor-aurora-with-grafana - InvalidArgumentException Nov 29, 2023
@syndic8-joe syndic8-joe changed the title monitor-aurora-with-grafana - InvalidArgumentException InvalidArgumentException in monitor-aurora-with-grafana lamda Nov 29, 2023
@kshammai
Copy link

kshammai commented Nov 29, 2023

I managed to resolve it by removing the invalid groups from dbSliceGroup (line 25 - sandbox/monitor-aurora-with-grafana/function/lambda_function.py)

In my scenario, I made the following change:

Originally:

dbSliceGroup = { "db.sql_tokenized", "db.application", "db.wait_event", "db.user", "db.session_type", "db.host", "db", "db.application" }

Changed to:

dbSliceGroup = { "db.wait_event", "db.user", "db.host", "db" }

@LorenzoRogai
Copy link

LorenzoRogai commented Apr 2, 2024

This is happening because the AWS Guide talk about Aurora PostgreSQL. We have a MySQL cluster and this is happening also for us, the above workaround works fine. You can however put the "db.sql_tokenized" metric again. That is correctly recognized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants