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

Some postgres alerts are not related to postgres-exporter #302

Open
antoinematyja opened this issue Aug 22, 2022 · 0 comments
Open

Some postgres alerts are not related to postgres-exporter #302

antoinematyja opened this issue Aug 22, 2022 · 0 comments

Comments

@antoinematyja
Copy link

Hello,

We wanted to add this alert rule:

Postgresql high rate statement timeout

https://awesome-prometheus-alerts.grep.to/rules#rule-postgresql-1-12

So we installed prometheus-community/postgres_exporter (as mentioned in the title of the section).

But we quickly realized that the metric postgresql_errors_total (used in this rule) was not available with postgres_exporter.

After some research we found this pdf: https://www.postgresql.eu/events/pgconfeu2018/sessions/session/2166/slides/147/monitoring.pdf

Which presents prometheus monitoring of postgres with postgres-exporter AND using postgres logs via mtail. We can see that postgresql_errors_total is created with mtail (the mtail config file is somewhere in the middle of the pdf, search for postgresql_errors_total).

So the following alerts do not require postgres-exporter, but mtail with a custom configuration:

  • Postgresql high rate statement timeout
  • Postgresql high rate deadlock
    (both relying on postgresql_errors_total)

This should be mentioned next to these rules, or the rules moved to a subsection.

I looked up the original commit adding these rules:
0b89a76

It seems like it was added at the same time as the other postgres rules (which rely on postgres-exporter).

Thanks

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

1 participant