Closed DaveTSG closed 1 month ago
Hey @DaveTSG,
Looks like your Prometheus setup doesn't like the length of the labels that this Frigate Prometheus exporter outputs from what you shown here:
Error: label_value_length_limit exceeded (metric: frigate_bandwidth_usages_kBps, label name: cmdline, value: "ffmpeg -hide_banner -loglevel warning -threads 2 -", length: 543, limit: 200)
Frigate commands are stored in this exporters metric labels and Frigate commands can get really long. The commands are shown in Grafana to provide some context when looking at process CPU and MEM stats. For example, if you test different frame rates or resolutions, can look at the command to see what settings were used.
Googling label_value_length_limit
finds the Prometheus configuration page and one of the settings is this:
# Per-scrape limit on length of labels value that will be accepted for a sample.
# If a label value is longer than this number post metric-relabeling, the
# entire scrape will be treated as failed. 0 means no limit.
[ label_value_length_limit: <int> | default = 0 ]
Looks like your current label_value_length_limit
is 200 and it failed the entire scrape because it found a label with length 543. So I think best solution would be to set your Prometheus label_value_length_limit: 0
I think best solution would be to set your Prometheus
label_value_length_limit: 0
Bingo! Working perfectly now. Thank you for your help!
Hello,
I have just installed Prometheus-Frigate-Exporter and am having some difficulty getting the data into Grafana.
I already have Frigate and Prometheus running in pre-existing Docker containers. Both are in the "proxy" Docker network (a bridge network). I created a new docker-compose file for Prometheus-Frigate-Exporter, specifically, which contains:
Loading https://frigate.davesservers.com/api/stats in my browser shows quite a bit of data. Ditto loading the PFE metrics page http://192.168.4.7:9100/metrics in my browser shows many lines of output, similar to what is shown on your page:
If I load Prometheus targets list (at http://192.168.4.7:9090/targets), it shows my pre-existing target (Crowdsec), which I configured when I set up Prometheus (earlier today). The Crowdsec target is up and running fine, and the data is being shown in Grafana.
instance="192.168.4.7:9100" job="prometheus_frigate_exporter" Discovered labels: address="192.168.4.7:9100" metrics_path="/metrics" scheme="http" scrape_interval="15s" __scrape_timeout__="10s" job="prometheus_frigate_exporter"
My prometheus.yml file contains the following:
The Prometheus-Frigate-Exporter logs show all ok:
I am not sure if it is relevant or not, but I also have Traefik (proxy and load balancer) installed. It is not being used with Prometheus-Frigate-Exporter, but it is working with Frigate itself. Here's my Frigate docker-compose.yml file:
I was able to create a new data source in Grafana, along with the dashboard as per the instructions, but the dashboard itself just shows a bunch of "no data", which makes sense, given the Prometheus target is "down".
Would anyone know why this might be and how to fix the issue please?
Thank you.