Merge branch 'master' into 'master'

Add Grafana datasoure and dashboard provisioning

See merge request allianceauth/allianceauth!1501
This commit is contained in:
Ariel Rin 2023-06-03 05:06:23 +00:00
commit 5b39c887a5
3 changed files with 44 additions and 0 deletions

View File

@ -57,7 +57,14 @@ services:
depends_on:
- auth_mysql
volumes:
- ./grafana-datasource.yml:/etc/grafana/provisioning/datasources/datasource.yaml
- ./grafana-dashboards.yml:/etc/grafana/provisioning/dashboards/datasource.yaml
- ./grafana/dashboards:/var/lib/grafana/dashboards:ro
- grafana-data:/var/lib/grafana
environment:
GF_INSTALL_PLUGINS: grafana-piechart-panel,grafana-clock-panel,grafana-simple-json-datasource
GF_AUTH_DATABASE_PASSWORD: ${GRAFANA_DB_PASSWORD}
proxy:
image: 'jc21/nginx-proxy-manager:latest'
restart: always

View File

@ -0,0 +1,25 @@
apiVersion: 1
providers:
# <string> an unique provider name
- name: 'auth dashboards'
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <string, required> name of the dashboard folder. Required
folder: ''
# <string> folder UID. will be automatically generated if not specified
folderUid: ''
# <string, required> provider type. Required
type: file
# <bool> disable dashboard deletion
disableDeletion: false
# <bool> enable dashboard editing
editable: true
# <int> how often Grafana will scan for changed dashboards
updateIntervalSeconds: 10
# <bool> allow updating provisioned dashboards from the UI
allowUiUpdates: false
options:
# <string, required> path to dashboard files on disk. Required
path: /var/lib/grafana/dashboards
foldersFromFilesStructure: true

View File

@ -0,0 +1,12 @@
apiVersion: 1
datasources:
- name: MySQL
type: mysql
url: auth_mysql
database: alliance_auth
user: grafana
editable: true
secureJsonData:
password: ${GF_AUTH_DATABASE_PASSWORD}