AthennaMind / opnsense-exporter

OPNsense Exporter for Prometheus
Apache License 2.0
75 stars 7 forks source link

[QUESTION]: Newbie: How do I get this to work when connecting to Grafana? #28

Closed nicw closed 3 months ago

nicw commented 3 months ago

I'm new to Prometheus, but I thought there should be an /api/v1 URL exposed for Grafana to pull, correct? Via browser, I see data correctly coming across under /metrics so I know the exporter is successfully talking to OPNsense. But if I visit /api/v1/... I just get an HTML file and the grafana log shows:

logger=tsdb.prometheus t=2024-06-15T21:30:56.53085898Z level=warn msg="failed to get prometheus heuristics" err="failed to get buildinfo: failed to unmarshal JSON: invalid character '<' looking for beginning of value"

My data source configuration is very benign, the only input is the url: http:myloggingserver.mydomain:8080 and clicking 'Save and Test' gives a green message about validating the URL.

Thanks for this, can't wait for it to work for me!

nicw commented 3 months ago

SORTED: Forgot that this was the exporter.....