-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add the prometheus-log-parser
optional component
#473
Conversation
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/2870/Result ✅ SUCCESS BIRDHOUSE_DEPLOY_BRANCH : prometheus-log-parser DACCS_IAC_BRANCH : master DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-216.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/1735/NOTEBOOK TEST RESULTS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really happy to see this PR. This will be super valuable for reporting.
birdhouse/optional-components/prometheus-log-parser/config/thredds/prometheus-log-exporter.py
Outdated
Show resolved
Hide resolved
birdhouse/optional-components/prometheus-log-parser/config/thredds/prometheus-log-exporter.py
Outdated
Show resolved
Hide resolved
Co-authored-by: David Huard <[email protected]>
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/2876/Result ❌ FAILURE BIRDHOUSE_DEPLOY_BRANCH : prometheus-log-parser DACCS_IAC_BRANCH : master DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-216.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/1738/NOTEBOOK TEST RESULTS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice implementation, separating the generic of I/O line parsing and our specific proxy logs format parsing. I love how you "steal" the logs from inside the proxy container :D
I just have a question. I see you have logs in your generic log-parser. Where are those logs going to? To stdout
which will be in docker logs
output? How can we increase or decrease the logging level?
Oh and please also add a comment to
optional-components/prometheus-log-parser/config/thredds/prometheus-log-exporter.py .
|
Yeah it goes to stdout by default but can be logged to a file by setting the Log level can be set with an environment variable as well. I'll add in an option so that we can set it in the default.env file if you'd like by setting
There's already a comment by the regex but I'll add one in the nginx config file as well. |
I wasn't asking for a log to file either. Logs going to |
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/2886/Result ❌ FAILURE BIRDHOUSE_DEPLOY_BRANCH : prometheus-log-parser DACCS_IAC_BRANCH : master DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-216.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/1744/NOTEBOOK TEST RESULTS |
Wouldn't it be logged to file automatically because of x-logging: &default-logging
driver: "json-file"
options:
max-size: "50m"
max-file: "10" Logging to file would be redundant, unless an alternate log representation is desired. |
@fmigneault |
Note that this update bumps the minor version since it creates a new component. |
Overview
This component parses log files from other components and converts their logs to prometheus metrics that are then ingested by the monitoring Prometheus instance (the one created by the
components/monitoring
component).For more information on how this component reads log files and converts them to prometheus components see the log-parser documentation.
To configure this component:
PROMETHEUS_LOG_PARSER_POLL_DELAY
variable to a number of seconds to set how often the log parser checks if new lines have been added to log files (default: 1)PROMETHEUS_LOG_PARSER_TAIL
variable to"true"
to only parse new lines in log files. If unset, this will parse all existing lines in the log file as well (default:"true"
)To view all metrics exported by the log parser:
https://<BIRDHOUSE_FQDN>/prometheus/graph
search page{job="log_parser"}
in the search bar and click the "Execute" buttonUpdate the prometheus version to the current latest
v2.53.3
. This is required to support loading multiple prometheus scrape configuration files with thescrape_config_files
configuration option.Changes
Non-breaking changes
Breaking changes
Related Issue / Discussion
Additional Information
implements parser given as an example here: 💡 [Feature] Log download stats from THREDDS server #444 (comment)
this is an alternative to Add the
promtail
andloki
optional components #474. See discussion in 💡 [Feature] Log download stats from THREDDS server #444 to help decide which we should pick.CI Operations
birdhouse_daccs_configs_branch: master
birdhouse_skip_ci: false