SQLExporterScrapingLimit #
Meaning #
Alert is triggered when Prometheus takes too long to fetch the SQL exporter metrics
Impact #
The monitoring system is degraded. SQL exporter does not collect SQL metrics, alerts cannot be triggered.
Diagnosis #
Check CPU and IOPS usage of the PostgreSQL server
An overloaded server may have difficulty collecting metrics.
Look at PostgreSQL Server logs to identify long running queries.
You may need to enable
log_min_duration_statement
to identify which queries are long to be executed.
Mitigation #
Identify and kill heavy queries
How to terminate queries?
SELECT pg_terminate_backend(pid), usename, datname, application_name, client_addr, client_port, state, wait_event_type, wait_event, state_change, query FROM pg_stat_activity WHERE pid in ('<replace_with_pids>');
Additional resources #
n/a