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

Set correct log level for Prometheus logger #358

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

haoming29
Copy link
Contributor

Fixes #290

Testing Instructions

Run your director then registry in the same container and in the terminal for registry you should be able to see a warning and an error log message:

WARNING[2023-11-08T19:49:54Z] A lockfile from a previous execution already existed. It was replaced  component=tsdb file=/var/lib/pelican/monitoring/data/lock
INFO[2023-11-08T19:49:54Z] Stopping scrape discovery manager...          component=prometheus
INFO[2023-11-08T19:49:54Z] Stopping scraper config periodic reload...    component=prometheus
INFO[2023-11-08T19:49:54Z] Stopping scrape manager...                    component=prometheus
INFO[2023-11-08T19:49:54Z] Scrape discovery manager stopped              component=prometheus
INFO[2023-11-08T19:49:54Z] Stopping scraper config periodic reload...    component=prometheus
INFO[2023-11-08T19:49:54Z] Scrape manager stopped                        component=prometheus
ERROR[2023-11-08T19:49:54Z] opening storage failed: lock DB directory: resource temporarily unavailable  component=prometheus

This means that the error level from Prometheus components is propagated correctly to the log message.

@haoming29 haoming29 requested a review from bbockelm November 10, 2023 18:23
@haoming29 haoming29 added the bug Something isn't working label Nov 13, 2023
@haoming29 haoming29 added this to the v7.3.0 milestone Nov 13, 2023
@bbockelm bbockelm requested review from jhiemstrawisc and joereuss12 and removed request for bbockelm and jhiemstrawisc November 15, 2023 15:17
Copy link
Contributor

@joereuss12 joereuss12 left a comment

Choose a reason for hiding this comment

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

LGTM, just resolve the merge conflicts and it should be good to go

@haoming29 haoming29 merged commit d84935b into PelicanPlatform:main Nov 16, 2023
6 checks passed
@haoming29 haoming29 deleted the prom-log-level branch November 16, 2023 14:46
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

Successfully merging this pull request may close these issues.

Embedded Prometheus logger didn't set correct log level
2 participants