addons: Add grafana 4.6.1 and extend prometheus docs
This commit is contained in:
parent
77fc14db71
commit
279f36effd
|
@ -0,0 +1,46 @@
|
|||
apiVersion: apps/v1beta2
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: grafana
|
||||
namespace: monitoring
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
name: grafana
|
||||
phase: prod
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: grafana
|
||||
phase: prod
|
||||
spec:
|
||||
containers:
|
||||
- name: grafana
|
||||
image: grafana/grafana:4.6.1
|
||||
env:
|
||||
- name: GF_SERVER_HTTP_PORT
|
||||
value: "8080"
|
||||
- name: GF_AUTH_BASIC_ENABLED
|
||||
value: "false"
|
||||
- name: GF_AUTH_ANONYMOUS_ENABLED
|
||||
value: "true"
|
||||
- name: GF_AUTH_ANONYMOUS_ORG_ROLE
|
||||
value: Admin
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
resources:
|
||||
requests:
|
||||
memory: 100Mi
|
||||
cpu: 100m
|
||||
limits:
|
||||
memory: 200Mi
|
||||
cpu: 200m
|
||||
volumes:
|
||||
- name: grafana-storage
|
||||
emptyDir: {}
|
|
@ -0,0 +1,15 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: grafana
|
||||
namespace: monitoring
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
name: grafana
|
||||
phase: prod
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: 8080
|
|
@ -5,7 +5,7 @@ Every Typhoon cluster is verified to work well with several post-install addons.
|
|||
* [CLUO](cluo.md) (Container Linux only)
|
||||
* Nginx [Ingress Controller](ingress.md)
|
||||
* [Heapster](heapster.md)
|
||||
* Kubernetes [Dashboard](dashboard.md)
|
||||
* [Prometheus](prometheus.md)
|
||||
* Grafana
|
||||
* [Grafana](prometheus.md#grafana)
|
||||
* Kubernetes [Dashboard](dashboard.md)
|
||||
|
||||
|
|
|
@ -45,6 +45,21 @@ Visit [127.0.0.1:9090](http://127.0.0.1:9090) to query [expressions](http://127.
|
|||
<br/>
|
||||
![Prometheus Targets](/img/prometheus-targets.png)
|
||||
|
||||
### Visualization
|
||||
## Grafana
|
||||
|
||||
Grafana can be used to build dashboards and rich visualizations that use Prometheus as the datasource. Create the grafana deployment and service.
|
||||
|
||||
```
|
||||
kubectl apply -f addons/grafana -R
|
||||
```
|
||||
|
||||
Use `kubectl` to authenticate to the apiserver and create a local port-forward to the Grafana pod.
|
||||
|
||||
```
|
||||
kubectl port-forward grafana-POD-ID 8080 -n monitoring
|
||||
```
|
||||
|
||||
Visit [127.0.0.1:8080](http://127.0.0.1:8080), add the prometheus data-source (http://prometheus.monitoring.svc.cluster.local), and import your desired dashboard (e.g. 315).
|
||||
|
||||
![Grafana Dashboard](/img/grafana-dashboard.png)
|
||||
|
||||
Grafana can be used to build dashboards and rich visualizations that use Prometheus as the datasource. Favor Grafana for these use cases and use the Prometheus for debugging or quickly checking available metrics.
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 212 KiB |
Loading…
Reference in New Issue