Integrated alerting - PostgreSQL connections in use

Best regards:

I have been testing the integrated alert module and I was validating the use of the PostgreSQL connections in use alert, which when selected by default fills me with the data of:
• Threshold= 80
• Duration(s): 300
• Severity: Decrease

However, I have changed in the test alert the data to:
• Threshold= 20
• Duration(s): 120

The above to do some short tests and validate the operation of the Alert. However, with an unused rds (1-4 connections), the alert is triggered without even starting the load test (to validate the operation of the alert) and the type of message that reaches slack is very particular (attached image ).

I want to know if these types of alerts operate only with Threshold > 80% or is it that something is being misconfigured.

Thank you.
alert_pmm

1 Like

Hi @jhon.gomez were you able to resolve this issue? 264% seems to be a very high value for connections, if you could paste the rule here we could review it and provide feedback

1 Like

hi @Michael_Coburn, thanks for the answer. I haven’t solved the problem yet. I am using the default template they have (PostgreSQL connections in use).

by default the template says:
sum(pg_stat_activity_count{datname!~“template.*|postgres”})

pg_settings_max_connections * [[ .threshold ]] / 100

RuleAlert:
PostgreSQL too many connections ({{ $labels.service_name }})

1 Like