Skip to content

feat: support prometheus scrape configuration in sysdig-agent #610

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yuvraj-singh-3
Copy link

Description

  • Added support for custom Prometheus scrape_configs in the Sysdig agent Helm chart via a new Terraform variable.
  • Allows injecting a multi-line YAML string for Prometheus scraping configuration (including relabeling etc).
    Example:
scrape_configs:
- job_name: 'k8s-pods'
  tls_config:
    insecure_skip_verify: true
  kubernetes_sd_configs:
  - role: pod
  relabel_configs:
  - action: keep
    source_labels: [__meta_kubernetes_pod_host_ip]
    regex: __HOSTIPS__
  - action: keep
    source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
    regex: true
  metric_relabel_configs:
  - source_labels: [__name__]
    regex: ()
    action: keep
  • If left empty, the default behavior remains unchanged and no Prometheus config is applied.

Release required?

  • No release
  • Patch release (x.x.X)
  • Minor release (x.X.x)
  • Major release (X.x.x)
Release notes content

Run the pipeline

If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.

Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:

/run pipeline

Checklist for reviewers

  • If relevant, a test for the change is included or updated with this PR.
  • If relevant, documentation for the change is included or updated with this PR.

For mergers

  • Use a conventional commit message to set the release level. Follow the guidelines.
  • Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
  • Use the Squash and merge option.

add support for prometheus scrape config in sysdig agent configmap
@yuvraj-singh-3
Copy link
Author

Ready for review

@ocofaigh
Copy link
Contributor

ocofaigh commented Jul 21, 2025

@yuvraj-singh-3 Please be aware that this module has been deprecated in favour of the following 2 modules:

The new terraform-ibm-monitoring-agent module is consuming the community sysdig-deploy helm chart. Can you check if this helm chart supports what you are trying to do? And if so, perhaps you could create a PR to expose it in the terraform-ibm-monitoring-agent module repo? Or even create a GIT issue in that repo to add support?

@yuvraj-singh-3
Copy link
Author

Thanks @ocofaigh
Let me check

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