Skip to content

Metric collector v2#286

Merged
reggeenr merged 64 commits into
mainfrom
metric-collector-v2
Jun 18, 2026
Merged

Metric collector v2#286
reggeenr merged 64 commits into
mainfrom
metric-collector-v2

Conversation

@reggeenr

@reggeenr reggeenr commented Feb 13, 2026

Copy link
Copy Markdown
Collaborator

This PR enables resource metric integration within Code Engine by running a metrics-collector that emits CPU, and memory usage metrics to IBM Cloud Logs.

Furthermore, this PR contains a dashboard that can be imported into IBM Cloud Monitoring:
monitoring-dashboard-ce-component-resources

On top, this PR demonstrates a away on how Code Engine jobs and apps can emit custom metrics, which are sent to Sysdig

See Readme for further details: https://github.com/IBM/CodeEngine/blob/metric-collector-v2/metrics-collector/README.md

To demonstrate custom metric collection, this PR provides an enrichment of the network-test-app (see readme https://github.com/IBM/CodeEngine/blob/metric-collector-v2/network-test-app/README.md)
image

@reggeenr reggeenr requested a review from norman465 March 2, 2026 23:32
Comment thread metrics-collector/setup/ibm-cloud-monitoring/README.md
Comment thread metrics-collector/main.go
Comment thread metrics-collector/prometheus.yml.template
Comment thread metrics-collector/prometheus.yml.template Outdated
Comment thread metrics-collector/README.md Outdated

1. The metrics collector exposes Prometheus metrics on `localhost:9100/metrics`
2. The embedded Prometheus agent scrapes these metrics every 30 seconds
3. The agent also discovers and scrapes pods with the `codeengine.cloud.ibm.com/userMetricsScrape: 'true'` annotation

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the agent would discover those pods and scrape additional custom metrics. Default CPU/Memory metrics would be collected for all workload irrespective of that label, right?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I am not quite getting your question. Would you mind to elaborate a bit?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm missing the information here that the metrics collector automatically scrapes general metrics for apps, jobs etc. in addition to the aforementioned scraping of custom metrics by annotation. Or does every pod that the user wants to have metrics for need to be annotated?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ah thanks for the feedback. I re-read it and I agree it is not clear at all what the metrics collector does do

Comment thread metrics-collector/setup/ibm-cloud-monitoring/README.md
Comment thread metrics-collector/verify
Comment thread metrics-collector/main.go
@reggeenr reggeenr merged commit dda2999 into main Jun 18, 2026
3 checks passed
@reggeenr reggeenr deleted the metric-collector-v2 branch June 18, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants