Skip to content

Commit 1b4437c

Browse files
Adds protected Grafana and generated Grafana dashboard JSON
1 parent 13561cf commit 1b4437c

File tree

5 files changed

+619
-6
lines changed

5 files changed

+619
-6
lines changed

Taskfile.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ tasks:
255255
- kubectl --kubeconfig={{.KUBECONFIG}} rollout status deployment/grafana --timeout=120s
256256
- echo ""
257257
- echo "Grafana UI available at https://app.roussev.com/grafana"
258-
- echo "Anonymous access enabled (no login required)"
258+
- echo "Public viewing enabled (Viewer role)"
259+
- echo "Admin login - admin/admin"
259260

260261
deploy:observability:
261262
desc: Deploy full observability stack (Jaeger, Prometheus, Grafana)

apps/items-service/src/html.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function getRootPageHtml(): string {
4747
<p><strong>Observability:</strong></p>
4848
<p><a href="/jaeger" target="_blank">Jaeger</a> - Distributed tracing</p>
4949
<p><a href="/prometheus" target="_blank">Prometheus</a> - Metrics collection</p>
50-
<p><a href="https://app.roussev.com/grafana/d/a7333118-220b-4389-b277-3d79b0605970/items-service-dashboard?orgId=1" target="_blank">Grafana</a> - Metrics visualization</p>
50+
<p><a href="https://app.roussev.com/grafana/d/items-service-metrics/items-service-metrics" target="_blank">Grafana</a> - Metrics dashboard</p>
5151
<p><a href="/items/metrics" target="_blank">Metrics Endpoint</a> - Raw Prometheus metrics</p>
5252
5353
<p><strong>Documentation:</strong></p>

infra/k8s/local/grafana-local.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,19 @@ spec:
126126
- containerPort: 3000
127127
name: http
128128
env:
129+
# Anonymous access - read-only for public viewing
129130
- name: GF_AUTH_ANONYMOUS_ENABLED
130131
value: "true"
131132
- name: GF_AUTH_ANONYMOUS_ORG_ROLE
132-
value: "Admin"
133+
value: "Viewer"
134+
# Keep login form enabled for admin access
133135
- name: GF_AUTH_DISABLE_LOGIN_FORM
134-
value: "true"
136+
value: "false"
137+
# Admin credentials for editing dashboards
138+
- name: GF_SECURITY_ADMIN_USER
139+
value: "admin"
140+
- name: GF_SECURITY_ADMIN_PASSWORD
141+
value: "admin"
135142
- name: GF_SECURITY_ALLOW_EMBEDDING
136143
value: "true"
137144
volumeMounts:

0 commit comments

Comments
 (0)