grafana/k8s-monitoring-helm

Opencost UI no values

Closed this issue · 10 comments

Hi,
Can't seem to get opencost to read any information when using 0.10.3 or 1.0.2 of this chart

Seems to be same case as #263 but can't get it to solve.

  opencost:
    opencost:
      ui:
        enabled: true
      exporter:
        defaultClusterId: 'Hrk8sDEV'
      prometheus:
        existingSecretName: prometheus-k8s-monitoring
        external:
          url: 'https://prometheus-us-central1.grafana.net/api/prom'

image

@marquesj2-ppb What sort of results are you getting back when querying for node_ram_hourly_cost in Grafana?

image
This is the metric explorer on grafana

@marquesj2-ppb I think this will solve your issue: opencost/opencost-grafana-dashboard#2 (comment)

There does appear to be an issue with k8s-monitoring-helm regarding this, where it is re-writing the instance label which causes issues with Opencost.

Should your solution be implemented in the base chart?
opencost/opencost-grafana-dashboard#2 (comment)

I'm not sure what @dlahn 's fix is, but I think adding honor_labels = true to the code will help the issue. That will keep the instance label set by OpenCost as instance and not rename it to exported_instance, just to set instance to the OpenCost service name, which is not helpful.

@petewall Your solution is the optimal one. I'm doing a bunch of renaming, which is not ideal :)

Ah, relabel rules can be painful fun! haha. I'd love your eyes on the PR in a few minutes.

I just released version 1.0.7 which should solve the instance label issue: https://github.com/grafana/k8s-monitoring-helm/releases/tag/v1.0.7

@marquesj2-ppb , let me know if this solved things for you.

Seems good on my end as well. Thanks for the fix @petewall. I had been meaning to open an issue.

Seems good here!
thanks a lot 🙇