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

2.0.1 install post render error "prometheus.io/scrape" already defined #1094

Open
dat-intellis opened this issue Jan 10, 2025 · 3 comments
Open
Assignees

Comments

@dat-intellis
Copy link

dat-intellis commented Jan 10, 2025

The chart 2.0.1 release yields the following error when attempting to install with a simple configuration:

Solution: Reverting back to 2.0.0

Error:

k8s-monitoring	2.0.1	False	False	Helm install failed for release observability/k8s-monitoring with chart [email protected]: error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors: line 20: mapping key "prometheus.io/scrape" already defined at line 19

Values:

cluster:
  name: my-cluster

destinations:
  - name: hostedMetrics
    type: prometheus
    url: <REDACTED>.grafana.net/api/prom/push
    auth:
      type: basic
      username: <REDACTED>
      password: <REDACTED>

  - name: hostedLogs
    type: loki
    url: <REDACTED>.grafana.net/loki/api/v1/push
    auth:
      type: basic
      username: <REDACTED>
      password: <REDACTED>

  - name: otlpGateway
    type: otlp
    url: <REDACTED>.grafana.net:443
    auth:
      type: basic
      username: <REDACTED>
      password: <REDACTED>
    traces:  { enabled: true }

clusterEvents:
  enabled: true

clusterMetrics:
  enabled: true

alloy-metrics:
  enabled: true
  
alloy-singleton:
  enabled: true
@petewall
Copy link
Collaborator

There's an underlying problem with windows exporter.
Unless that's important, try adding this:

clusterMetrics:
  windows-exporter:
    enabled: false
    deploy: false

@petewall
Copy link
Collaborator

I created an issue upstream to fix this: prometheus-community/helm-charts#5129

@petewall
Copy link
Collaborator

Upstream PR: prometheus-community/helm-charts#5132
In the meantime, i'll remove the problem code. it will result in duplicate metrics, if:

  1. clusterMetrics w/ Windows exporter is enabled
  2. Windows nodes are present
  3. annotationAutodiscovery is enabled
  4. The annotations are modified to match on prometheus.io/scrape

That's a lot of conditions, but not unheard of.

@petewall petewall self-assigned this Jan 10, 2025
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

When branches are created from issues, their pull requests are automatically linked.

2 participants