DaCrow13 commited on
Commit
8c80239
·
1 Parent(s): a88a684

Fix Grafana provisioning permissions by moving to local app path

Browse files
docker/scripts/start_space.sh CHANGED
@@ -55,7 +55,7 @@ done
55
  echo "$(date) - Configuring and starting Prometheus..."
56
  # Patch Grafana Datasource for Localhost (HF Space)
57
  # Replace prometheus:9090 with 127.0.0.1:9090 in all datasource configs
58
- find /etc/grafana/provisioning/datasources -name '*.yml' -exec sed -i 's/prometheus:9090/127.0.0.1:9090/g' {} +
59
 
60
  # Copy production configs to /tmp for modification
61
  cp /etc/prometheus/prometheus.yml /tmp/prometheus.yml
@@ -127,7 +127,7 @@ $GRAFANA_BIN --homepath=/usr/share/grafana \
127
  cfg:paths.data=/tmp/grafana_data \
128
  cfg:paths.logs=/tmp/grafana_logs \
129
  cfg:paths.plugins=/usr/share/grafana/plugins \
130
- cfg:paths.provisioning=/etc/grafana/provisioning \
131
  cfg:server.root_url="$GRAFANA_ROOT_URL" \
132
  cfg:server.serve_from_sub_path=true \
133
  cfg:server.http_port=3000 \
 
55
  echo "$(date) - Configuring and starting Prometheus..."
56
  # Patch Grafana Datasource for Localhost (HF Space)
57
  # Replace prometheus:9090 with 127.0.0.1:9090 in all datasource configs
58
+ find /app/monitoring/grafana/provisioning/datasources -name '*.yml' -exec sed -i 's/prometheus:9090/127.0.0.1:9090/g' {} +
59
 
60
  # Copy production configs to /tmp for modification
61
  cp /etc/prometheus/prometheus.yml /tmp/prometheus.yml
 
127
  cfg:paths.data=/tmp/grafana_data \
128
  cfg:paths.logs=/tmp/grafana_logs \
129
  cfg:paths.plugins=/usr/share/grafana/plugins \
130
+ cfg:paths.provisioning=/app/monitoring/grafana/provisioning \
131
  cfg:server.root_url="$GRAFANA_ROOT_URL" \
132
  cfg:server.serve_from_sub_path=true \
133
  cfg:server.http_port=3000 \
monitoring/grafana/provisioning/dashboards/dashboard.yml CHANGED
@@ -9,5 +9,5 @@ providers:
9
  updateIntervalSeconds: 10
10
  allowUiUpdates: true
11
  options:
12
- path: /var/lib/grafana/dashboards
13
  foldersFromFilesStructure: true
 
9
  updateIntervalSeconds: 10
10
  allowUiUpdates: true
11
  options:
12
+ path: /app/monitoring/grafana/dashboards
13
  foldersFromFilesStructure: true
monitoring/grafana/provisioning/datasources/prometheus.yml CHANGED
@@ -6,7 +6,7 @@ datasources:
6
  access: proxy
7
  uid: prometheus
8
  orgId: 1
9
- url: http://prometheus:9090
10
  isDefault: true
11
  editable: true
12
  jsonData:
 
6
  access: proxy
7
  uid: prometheus
8
  orgId: 1
9
+ url: http://127.0.0.1:9090
10
  isDefault: true
11
  editable: true
12
  jsonData: