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

Add prometheus metrics to cc workers #4205

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

Conversation

svkrieger
Copy link
Contributor

@svkrieger svkrieger commented Feb 3, 2025

A short explanation of the proposed change:

Add a small webserver to the first worker process on cc-worker VM, which publishes cc-worker metrics in a prometheus endpoint. Metrics of all worker processes are stored in the same DirectFileStore, so that we only need one endpoint to publish all their metrics.

An explanation of the use cases your change solves

Currently we only publish metrics on the API VMs. We are also interested in metrics on worker VMs e.g. DB connection metrics. With this change metrics are being published in the same way and can be scraped using the prom_scraper job of the loggregator release.

Links to any other associated PRs

Configuration in CAPI: cloudfoundry/capi-release#507

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

Implemented a small puma webserver, which will be started in a separate thread with the first worker process.
Using the exporter middleware provided by the prometheus client, the metrics stored in the registry will be published under `/metrics`.
All processes use the same DirectFileStore registry, so that metrics can be published in a single webserver.
@svkrieger svkrieger force-pushed the add-prometheus-metrics-to-cc-workers branch 3 times, most recently from afb0dbb to 661f75d Compare February 4, 2025 13:46
@svkrieger svkrieger force-pushed the add-prometheus-metrics-to-cc-workers branch from 661f75d to e2f6a74 Compare February 4, 2025 15:12
@svkrieger svkrieger marked this pull request as ready for review February 5, 2025 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant