From a5f3a11a5e0578f24e9908052e2f6cb065a4b61c Mon Sep 17 00:00:00 2001
From: Fabian Reinartz <fab.reinartz@gmail.com>
Date: Mon, 24 Oct 2016 16:54:48 +0200
Subject: [PATCH] Document dashboarding

---
 README.md                                         | 15 +++++++++++++++
 .../example-app/servicemonitor-frontend.yaml      |  4 ++--
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 3bea1c65..b453b72d 100644
--- a/README.md
+++ b/README.md
@@ -63,6 +63,21 @@ Teardown:
 hack/example-service-monitoring/teardown
 ```
 
+## Dashboarding
+
+The provided manifests deploy a Grafana instance serving dashboards provided via a ConfigMap.
+To modify, delete, or add dashboards, the `grafana-dashboards` ConfigMap must be modified.
+
+Currently, Grafana does not support serving dashboards from static files. Instead, the `grafana-watcher`
+sidecar container aims to emulate the behavior, by keeping the Grafana database always in sync
+with the provided ConfigMap. Hence, the Grafana pod is effectively stateless.
+This allows managing dashboards via `git` etc. and easily deploying them via CD pipelines.
+
+In the future, a separate Grafana controller should support gathering dashboards from multiple
+ConfigMaps, which are selected by their labels.
+Prometheus servers deployed by the Prometheus controller should be automatically added as
+Grafana data sources.  
+
 ## Roadmap
 
 * Incorporate [Alertmanager controller](https://github.com/coreos/kube-alertmanager-controller)
diff --git a/manifests/examples/example-app/servicemonitor-frontend.yaml b/manifests/examples/example-app/servicemonitor-frontend.yaml
index 7e03b4f0..e4fc0396 100644
--- a/manifests/examples/example-app/servicemonitor-frontend.yaml
+++ b/manifests/examples/example-app/servicemonitor-frontend.yaml
@@ -9,6 +9,6 @@ spec:
   selector:
     matchLabels:
       team: frontend
-  scrapeInterval: 10s
   endpoints:
-  - port: web
\ No newline at end of file
+  - port: web
+    interval: 10s
\ No newline at end of file
-- 
GitLab