Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

Push of additionalScrapeConfigs to PrometheusAgent - #2312

Merged
harshavardhana merged 4 commits into
minio:masterfrom
stijzermans:feature/scrape-prometheusagent
Sep 11, 2024
Merged

harshavardhana merged 4 commits into
minio:masterfrom
stijzermans:feature/scrape-prometheusagent

Conversation

@stijzermans

@stijzermans stijzermans commented Sep 5, 2024 •

Copy link
Copy Markdown
Contributor

Implement #2311, so both Prometheuses and PrometheusAgents can be updated with additionalScrapeConfigs.

How to test:

  • Make sure prometheus-operator is installed and watching a namespace.
  • Deploy PrometheusAgent in that watched namespace, through applying a manifest like:
apiVersion: monitoring.coreos.com/v1alpha1
kind: PrometheusAgent
metadata:
  name: prometheus-grafana-kube-pr-prometheus
spec:
  arbitraryFSAccessThroughSMs: {}
  externalUrl: http://prometheus-grafana-kube-pr-prometheus:9090
  hostNetwork: false
  image: quay.io/prometheus/prometheus:v2.54.1
  listenLocal: false
  logFormat: logfmt
  logLevel: info
  paused: false
  podMonitorNamespaceSelector: {}
  podMonitorSelector: {}
  portName: http-web
  probeNamespaceSelector: {}
  probeSelector: {}
  replicas: 1
  resources: {}
  routePrefix: /
  scrapeConfigNamespaceSelector: {}
  scrapeConfigSelector:
    matchLabels:
      release: prometheus-grafana
  scrapeInterval: 30s
  serviceAccountName: prometheus-grafana-kube-pr-prometheus
  serviceMonitorNamespaceSelector: {}
  serviceMonitorSelector: {}
  shards: 1
  version: v2.54.1
  walCompression: true
  • Make sure at least PROMETHEUS_NAMESPACE is set in the minio-operator env to this watched namespace, minio-operator should then update the additionalScrapeConfigs attribute of the Prometheus agent when running.

@stijzermans stijzermans changed the title Implement scraping of PrometheusAgent Implement push of additionalScrapeConfigs to PrometheusAgent Sep 5, 2024
@stijzermans stijzermans changed the title Implement push of additionalScrapeConfigs to PrometheusAgent Push of additionalScrapeConfigs to PrometheusAgent Sep 5, 2024
@pjuarezd
pjuarezd requested a review from cesnietor September 5, 2024 21:56
@pjuarezd

pjuarezd commented Sep 5, 2024

Copy link
Copy Markdown
Member

Looks good to me, is there any reason we are aware of to do not support PrometheusAgent @cesnietor?

@stijzermans
stijzermans force-pushed the feature/scrape-prometheusagent branch from e0ff9fc to 04dbb78 Compare September 6, 2024 08:40
@cesnietor

Copy link
Copy Markdown
Contributor

LGTM we should support it. thanks for the PR.

@pjuarezd
pjuarezd force-pushed the feature/scrape-prometheusagent branch from 04dbb78 to 3955009 Compare September 11, 2024 06:16
@pjuarezd

Copy link
Copy Markdown
Member

LGTM we should support it. thanks for the PR.

Thank you!, could you approve please? @cesnietor

@harshavardhana
harshavardhana merged commit b28a0b4 into minio:master Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants