Open PabloSebastian opened 2 months ago
Same issue here since upgrading to v1.110.0 (Chart 1.35.0).
CONFIG_PATH
to its mount path, the error in the logs disappeared.
However, the UI still shows no data. @PabloSebastian does it work when you downgrade to 1.109.0 (Chart 1.34.0)?
@asdfgugus By mounting a volume and setting en env var CONFIG_PATH
the following error disappeared:
ERR Controller: pullWatchers: failed to save statuses failed to save config statuses to file: open /var/configs/cloud-configurations.json: no such file or directory
But I still have this issue on the top of the logs:
ERR Failed to query prometheus at http://vmselect-victoria-metrics-k8s-stack.victoria-metrics.svc:8481/select/0/prometheus. Error: no running jobs on Prometheus at /select/0/prometheus/api/v1/query . Troubleshooting help available at: https://www.opencost.io/docs/integrations/prometheus
As it can't retrieve any metrics from VictoriaMetrics, I'm having the UI empty.
My bad, I thought that you meant the error at the bottom of the logs.
When initializing, OpenCost queries the up
metrics to extract the jobs. It seems to me that this query returns nothing and causes the error...
Can you verify that?
Yes, I made a curl request to the vmcluster service:
~ $ curl http://vmselect-victoria-metrics-k8s-stack.victoria-metrics.svc:8481/select/0/prometheus/api/v1/query?query=up
{"status":"success","isPartial":false,"data":{"resultType":"vector","result":[]},"stats":{"seriesFetched": "0","executionTimeMsec":1}}
Also made another curl request to the vmagent targets:
~ $ curl http://vmagent-victoria-metrics-k8s-stack.victoria-metrics.svc:8429/targets | grep opencost
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 65289 0 65289 0 0 4739k 0 --:--:-- --:--:-- --:--:-- 4904k
job=serviceScrape/opencost/opencost/0 (1/1 up)
state=up, endpoint=http://10.0.0.192:9003/metrics, labels={container="opencost",endpoint="http",instance="10.0.0.192:9003",job="opencost",namespace="opencost",pod="opencost-56ddf67cff-jhhqf",service="opencost"}, scrapes_total=113, scrapes_failed=2, last_scrape=25.084s ago, scrape_duration=25ms, samples_scraped=1641, error=
That means that the metrics are being scraped
~ $ curl http://vmselect-victoria-metrics-k8s-stack.victoria-metrics.svc:8481/select/0/prometheus/api/v1/query?query=up {"status":"success","isPartial":false,"data":{"resultType":"vector","result":[]},"stats":{"seriesFetched": "0","executionTimeMsec":1}}
This should return the
up
metrics in theresult
. But it is empty.
Does this need to be over in the opencost/opencost repo? Is it a Helm issue or how OpenCost works with VictoriaMetrics?
In my case, it is how Opencost works with VictoriaMetrics. I followed the documentation explaining how to configure both applications but couldn't get it to work. Documentations:
@PabloSebastian this guide is outdated, use only this. Regarding your setup, have you checked VMAgent logs? if you cluster is empty means that VMAgent cannot for some reason ingest data there. Also among your scrape targets there's only opencost. VictoriaMetrics helm chart provides out of box set of scrape configs, and services, which Opencost relies on (node exporter, etc), so initial query should return bunch of metrics, if vmagent works properly
Yes, I know that the latest is the one from the VictoriaMetrics blog, but I tested both configurations to make sure I tried all I could find about it to make it work. Regarding the VMAgent targets, the query retrieves many scrape targets. For this case, I use the grep
command to only return the opencost target.
Reviewing the VMAgent logs, the target discovery is working:
@AndrewChubatiuk should we create a VictoriaMetrics section in the docs? I think this would be pretty useful and we could position VM as a Prometheus alternative directly in the installation since I know it's picking up popularity with OpenCost users.
Setup
vmcluster
1.110
Issue
After deploying the VictoriaMetrics and OpenCost charts using ArgoCD I got the following error in the OpenCost pod:
The OpenCost UI works but there is no info in it:![imagen](https://github.com/opencost/opencost-helm-chart/assets/26856461/8f84edcf-b5e8-43a3-a064-2b10e498cc14)