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

Draft: Adds possibility to call BBS to retrieve stats for application's processes states. #129

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

gmllt
Copy link
Member

@gmllt gmllt commented May 30, 2024

The purpose of this PR is to propose the use of BBS to fetch the RUNNING state of the main application process.
This should help to avoid calls to /v2/space/:space_guid/summary endpoints

bbs internal client is configurable with :

      --bbs.api_url=BBS.API_URL  BBS API URL ($CF_EXPORTER_BBS_API_URL)
      --bbs.ca_file=BBS.CA_FILE  BBS CA File ($CF_EXPORTER_BBS_CA_FILE)
      --bbs.cert_file=BBS.CERT_FILE
                                 BBS Cert File ($CF_EXPORTER_BBS_CERT_FILE)
      --bbs.key_file=BBS.KEY_FILE
                                 BBS Key File ($CF_EXPORTER_BBS_KEY_FILE)
      --bbs.skip_ssl_verify      Disable SSL Verify for BBS ($CF_EXPORTER_BBS_SKIP_SSL_VERIFY)
      --bbs.timeout=5            BBS API Timeout ($CF_EXPORTER_BBS_TIMEOUT)

If bbs is not configured or unreachable, the code switch to the old method using /v2/space/:space_guid/summary to retrieve application running instances number.

Buildpacks information are retrieve with the new relationship introduced since CAPI 1.189.0

@gmllt gmllt force-pushed the use-bbs-to-fetch-instances-running branch 4 times, most recently from 2d914f6 to 71eb8b8 Compare June 21, 2024 09:57
@gmllt
Copy link
Member Author

gmllt commented Jun 28, 2024

Waiting for cloudfoundry/cloud_controller_ng!3863 to be merged and released.
This will only work with capi shipping the correct version of cloud_controller_ng

@gmllt
Copy link
Member Author

gmllt commented Aug 9, 2024

Waiting for cloudfoundry/cli!2933 to be merged.

@gmllt gmllt force-pushed the use-bbs-to-fetch-instances-running branch from 337713f to aea97bd Compare January 8, 2025 21:41
@gmllt gmllt force-pushed the use-bbs-to-fetch-instances-running branch from 3d9c60e to 8550d41 Compare February 11, 2025 22:14
@gmllt gmllt force-pushed the use-bbs-to-fetch-instances-running branch from 8550d41 to e1bad98 Compare February 12, 2025 18:49
@gmllt gmllt changed the title Draft: Adds possibility to call BBS to retrieve stats for application's processes states. Adds possibility to call BBS to retrieve stats for application's processes states. Feb 12, 2025
@gmllt gmllt force-pushed the use-bbs-to-fetch-instances-running branch from 28375f6 to 6d6a189 Compare February 12, 2025 22:16
@gmllt gmllt changed the title Adds possibility to call BBS to retrieve stats for application's processes states. Draft: Adds possibility to call BBS to retrieve stats for application's processes states. Feb 12, 2025
@benjaminguttmann-avtq
Copy link
Contributor

@benjaminguttmann-avtq
Copy link
Contributor

I receive always

ERRO[0100] unable to initialize bbs client error="failed to ping BBS"
so would be good if you have an example config, so I can find out what I am doing wrong here

@benjaminguttmann-avtq
Copy link
Contributor

got it to work, setting skip-ssl to true made the trick. Unfortunately the logs do not give you any insights why the connection did not work.

I don't think we do a fallback to the old logic, as it gets removed nevertheless. I would remove the fallback and make the BBS config optional, e.g. if the BBS config is not present do not gather the summary metrics as maybe not everyone wants to make BBS available to their monitoring VMs.

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

Successfully merging this pull request may close these issues.

None yet

2 participants