Files
frigate/docs/docs/configuration/metrics.md
T

127 lines
4.2 KiB
Markdown
Raw Normal View History

2025-02-09 10:04:39 -07:00
---
id: metrics
title: Metrics
---
2026-03-30 11:36:45 -05:00
import ConfigTabs from "@site/src/components/ConfigTabs";
import TabItem from "@theme/TabItem";
import NavPath from "@site/src/components/NavPath";
2025-02-09 10:04:39 -07:00
# Metrics
Frigate exposes Prometheus metrics at the `/api/metrics` endpoint that can be used to monitor the performance and health of your Frigate instance.
2025-02-09 10:04:39 -07:00
2026-03-30 11:36:45 -05:00
## Enabling Telemetry
Prometheus metrics are exposed via the telemetry configuration. Enable or configure telemetry to control metric availability.
<ConfigTabs>
<TabItem value="ui">
Navigate to <NavPath path="Settings > System > Telemetry" /> to configure metrics and telemetry settings.
</TabItem>
<TabItem value="yaml">
Metrics are available at `/api/metrics` by default. No additional Frigate configuration is required to expose them.
</TabItem>
</ConfigTabs>
2025-02-09 10:04:39 -07:00
## Available Metrics
### System Metrics
2026-03-30 11:36:45 -05:00
2025-02-09 10:04:39 -07:00
- `frigate_cpu_usage_percent{pid="", name="", process="", type="", cmdline=""}` - Process CPU usage percentage
- `frigate_mem_usage_percent{pid="", name="", process="", type="", cmdline=""}` - Process memory usage percentage
- `frigate_gpu_usage_percent{gpu_name=""}` - GPU utilization percentage
- `frigate_gpu_mem_usage_percent{gpu_name=""}` - GPU memory usage percentage
### Camera Metrics
2026-03-30 11:36:45 -05:00
2025-02-09 10:04:39 -07:00
- `frigate_camera_fps{camera_name=""}` - Frames per second being consumed from your camera
- `frigate_detection_fps{camera_name=""}` - Number of times detection is run per second
- `frigate_process_fps{camera_name=""}` - Frames per second being processed
- `frigate_skipped_fps{camera_name=""}` - Frames per second skipped for processing
- `frigate_detection_enabled{camera_name=""}` - Detection enabled status for camera
- `frigate_audio_dBFS{camera_name=""}` - Audio dBFS for camera
- `frigate_audio_rms{camera_name=""}` - Audio RMS for camera
### Detector Metrics
2026-03-30 11:36:45 -05:00
2025-02-09 10:04:39 -07:00
- `frigate_detector_inference_speed_seconds{name=""}` - Time spent running object detection in seconds
- `frigate_detection_start{name=""}` - Detector start time (unix timestamp)
### Storage Metrics
2026-03-30 11:36:45 -05:00
2025-02-09 10:04:39 -07:00
- `frigate_storage_free_bytes{storage=""}` - Storage free bytes
- `frigate_storage_total_bytes{storage=""}` - Storage total bytes
- `frigate_storage_used_bytes{storage=""}` - Storage used bytes
- `frigate_storage_mount_type{mount_type="", storage=""}` - Storage mount type info
### Service Metrics
2026-03-30 11:36:45 -05:00
2025-02-09 10:04:39 -07:00
- `frigate_service_uptime_seconds` - Uptime in seconds
- `frigate_service_last_updated_timestamp` - Stats recorded time (unix timestamp)
- `frigate_device_temperature{device=""}` - Device Temperature
### Event Metrics
2026-03-30 11:36:45 -05:00
2025-02-09 10:04:39 -07:00
- `frigate_camera_events{camera="", label=""}` - Count of camera events since exporter started
## Configuring Prometheus
To scrape metrics from Frigate, add the following to your Prometheus configuration:
```yaml
scrape_configs:
2026-03-30 11:36:45 -05:00
- job_name: "frigate"
metrics_path: "/api/metrics"
2025-02-09 10:04:39 -07:00
static_configs:
2026-03-30 11:36:45 -05:00
- targets: ["frigate:5000"]
2025-02-09 10:04:39 -07:00
scrape_interval: 15s
```
## Example Queries
Here are some example PromQL queries that might be useful:
```promql
# Average CPU usage across all processes
avg(frigate_cpu_usage_percent)
# Total GPU memory usage
sum(frigate_gpu_mem_usage_percent)
# Detection FPS by camera
rate(frigate_detection_fps{camera_name="front_door"}[5m])
# Storage usage percentage
(frigate_storage_used_bytes / frigate_storage_total_bytes) * 100
# Event count by camera in last hour
increase(frigate_camera_events[1h])
```
## Grafana Dashboard
You can use these metrics to create Grafana dashboards to monitor your Frigate instance. Here's an example of metrics you might want to track:
- CPU, Memory and GPU usage over time
- Camera FPS and detection rates
- Storage usage and trends
- Event counts by camera
- System temperatures
A sample Grafana dashboard JSON will be provided in a future update.
## Metric Types
The metrics exposed by Frigate use the following Prometheus metric types:
- **Counter**: Cumulative values that only increase (e.g., `frigate_camera_events`)
- **Gauge**: Values that can go up and down (e.g., `frigate_cpu_usage_percent`)
- **Info**: Key-value pairs for metadata (e.g., `frigate_storage_mount_type`)
For more information about Prometheus metric types, see the [Prometheus documentation](https://prometheus.io/docs/concepts/metric_types/).