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 user #499

Open
amandahla opened this issue Jun 17, 2024 · 6 comments
Open

Monitoring user #499

amandahla opened this issue Jun 17, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@amandahla
Copy link

Steps to reproduce

There were no PostgreSQL metrics so I saw these errors in one of the units:

Jun 17 20:05:32 juju-007f82-prod-chat-synapse-db-42 charmed-postgresql.prometheus-postgres-exporter[1392284]: ts=2024-06-17T20:05:32.276Z caller=collector.go:194 level=error msg="collector failed" name=database duration_seconds=0.006477263 err="pq: password authentication failed for user \"monitoring\""

Expected behavior

Grafana dashboard with all metrics.

Actual behavior

Only OS metrics.

Versions

Operating system:

Juju CLI: 3.5.1

Juju agent: 3.1.8

Charm revision: 14/edge 405

LXD:

Log output

Juju debug log:

Additional context

I was able to fix it by setting the monitoring user password again. (Canonical-only) I wrote a how to:
https://discourse.canonical.com/t/how-to-fix-postgresql-charm-not-sending-metrics/3801

Maybe it could be considered adding an action to do this.

@amandahla amandahla added the bug Something isn't working label Jun 17, 2024
Copy link
Contributor

@dragomirp
Copy link
Contributor

Hi, @amandahla, the set-password and get-password actions should work with the monitoring user as well.

@amandahla
Copy link
Author

amandahla commented Jun 18, 2024

Cool, I thought would be only for the operator user, thanks! I think this issue can be closed then unless you prefer to keep it open for investigating why the monitoring user has a different password at some point.

@taurus-forever
Copy link
Contributor

taurus-forever commented Jun 21, 2024

Hi @amandahla , thank you for the bugreport!
Regarding set-password you can check https://charmhub.io/postgresql/docs/e-users

I never saw such an issue. I am not sure, how can we fix something here without steps to reproduce.
Is it a fresh setup or a long running system? Did metrics gone, or never existed?

From the discourse post:

  content:
    monitoring-password: password
    operator-password: aaa

It looks like the monitoring password was not set (in Juju secrets), do you see some ERRORS in the debug log for those units?

Tnx!

@taurus-forever
Copy link
Contributor

@amandahla do you have steps-to-reproduce here?
Otherwise we are not sure how to fix this. :-( Tnx!

@amandahla
Copy link
Author

Hi, sorry for the delay.
Unfortunately, I don't have steps :( We have a PostgreSQL environment running for some time and then I noticed the metrics were missing.
This environment was restored from a backup, maybe something at this moment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants