Skip to content

Commit

Permalink
Merge pull request #1 from egallis31/grafana_dashboard
Browse files Browse the repository at this point in the history
Add Grafana Dashboard
  • Loading branch information
merlindorin authored Jul 25, 2024
2 parents 3579884 + ffe89a1 commit 478fc60
Show file tree
Hide file tree
Showing 5 changed files with 2,194 additions and 11 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ scrape_configs:
Replace `<exporter-host>` and `<port>` with the appropriate values for your setup.

## Integrate with Grafana

To integrate the metrics from Prometheus into Grafana, ensure the Prometheus is added as a Datasource. Next you can import the example dashboard from `./compose/grafana/unifi-protect/unifi-protect-dashboard.json`

## CLI Reference

The exporter provides several command-line options for configuring its behavior:
Expand Down
7 changes: 5 additions & 2 deletions compose/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ services:
- GF_SECURITY_ADMIN_PASSWORD=grafana
- GF_INSTALL_PLUGINS=grafana-clock-panel,natel-discrete-panel,grafana-piechart-panel
volumes:
- ./grafana:/etc/grafana/provisioning/datasources
- ./grafana/datasources:/etc/grafana/provisioning/datasources
- ./grafana/dashboards:/etc/grafana/provisioning/dashboards
- ./grafana/unifi-protect:/var/lib/grafana/dashboards/unifi-protect

unifi-protect:
image: ghcr.io/merlindorin/unifi-protect:latest
image: ghcr.io/hoomy-official/exporter-unifi-protect:v0.0.5
container_name: unifi-protect
command:
- "serve"
Expand Down
13 changes: 13 additions & 0 deletions compose/grafana/dashboards/dashboard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: 1

providers:

- name: unifi-protect
orgId: 1
folder: ''
type: file
disableDeletion: false
allowUiUpdates: true
options:
path: /var/lib/grafana/dashboards/unifi-protect
foldersFromFilesStructure: true
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: 1

datasources:
- name: Prometheus
type: prometheus
url: http://prometheus:9090
isDefault: true
access: proxy
editable: true
apiVersion: 1

datasources:
- name: Prometheus
type: prometheus
url: http://prometheus:9090
isDefault: true
access: proxy
editable: true
Loading

0 comments on commit 478fc60

Please sign in to comment.