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

Monitoring: adds podmonitor and prometheusrule for prometheus-operator enabled clusters #94

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dgo19
Copy link

@dgo19 dgo19 commented Mar 10, 2022

Hi,
I added a podmonitor for prometheus to scrape the metrics port of the postgresql pods.
Also adds an prometheusrule example to enable alerts with prometheus/alertmanager.

Regards, Daniel

@benjaminjb benjaminjb added helm and removed helm labels Oct 19, 2022
@genofire
Copy link

Hello CrunchyData @benjaminjb - why is there no reaction on such an PR ?

This is really usefull PR.

(Myself i do not like the values.yaml structure but @dgo19 just follow the structure that already exists.)

Comment on lines +37 to +45
- sourceLabels: [dbname]
targetLabel: dbname
replacement: '$1'
- sourceLabels: [relname]
targetLabel: relname
replacement: '$1'
- sourceLabels: [schemaname]
targetLabel: schemaname
replacement: '$1'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain why we need this relabeling?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I simply copied the complete relabel_config from the original prometheus-config.
https://github.com/dgo19/postgres-operator-examples/blob/main/kustomize/monitoring/prometheus-config.yaml#L65-L73

There are several changes in the last 2 years ;-)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are several changes in the last 2 years ;-)

Thanks for mentioning this ;-) I will also have a look directly to these files

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

Successfully merging this pull request may close these issues.

4 participants