Skip to content

Add support for prometheus scrape config #153

@yuvraj-singh-3

Description

@yuvraj-singh-3

Description

Add support for custom prometheus scrape_configs in sysdig-agent configmap. Ref: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#configuration-file
Example:

prometheus.yaml: |
  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

This is supported in agent's configmap and then configured in values.yaml

We have to pass the prometheus.yaml file through a variable

New or affected modules


By submitting this issue, you agree to follow our Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions