(monitoring): Readme, dashboard and service fixes (#2792)

* Readme fix and pre loaded dashboard update.
* Sock shop dashboard, readme update and service nodePort update for grafana.

Signed-off-by: ishangupta-ds <ishan@chaosnative.com>
This commit is contained in:
Ishan Gupta 2021-05-12 19:28:43 +05:30 committed by GitHub
parent a97d191acd
commit c52f68251d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 64 additions and 90 deletions

View File

@ -42,7 +42,28 @@ kubectl create ns monitoring
### Setup prometheus TSDB
#### Model-1 (optional): Service monitor and prometheus operator model.
#### Model-1 (optional): Prometheus scrape config model.
> Deploy prometheus components
```
kubectl -n monitoring apply -f utils/prometheus/prometheus-scrape-configuration/
```
> Deploy metrics exporters
```
kubectl -n monitoring apply -f utils/metrics-exporters/node-exporter/
kubectl -n monitoring apply -f utils/metrics-exporters/kube-state-metrics/
```
> Deploy chaos-exporter when the cluster is not connected to litmus 2.0 control plane via litmus agent (exporter is installed as a part of the agent bundle)
```
kubectl -n litmus apply -f utils/metrics-exporters/litmus-metrics/chaos-exporter/
```
#### Model-2 (optional): Service monitor and prometheus operator model.
> Create the operator to instantiate all CRDs
@ -55,6 +76,11 @@ kubectl -n monitoring apply -f utils/prometheus/prometheus-operator/
```
kubectl -n monitoring apply -f utils/metrics-exporters-with-service-monitors/node-exporter/
kubectl -n monitoring apply -f utils/metrics-exporters-with-service-monitors/kube-state-metrics/
```
> Deploy chaos-exporter when the cluster is not connected to litmus 2.0 control plane via litmus agent (exporter is installed as a part of the agent bundle)
```
kubectl -n litmus apply -f utils/metrics-exporters-with-service-monitors/litmus-metrics/chaos-exporter/
```
@ -72,22 +98,6 @@ kubectl -n monitoring apply -f utils/prometheus/prometheus-configuration/
kubectl -n monitoring apply -f utils/alert-manager-with-service-monitor/
```
#### Model-2 (optional): Prometheus scrape config model.
> Deploy prometheus components
```
kubectl -n monitoring apply -f utils/prometheus/prometheus-scrape-configuration/
```
> Deploy metrics exporters
```
kubectl -n monitoring apply -f utils/metrics-exporters/node-exporter/
kubectl -n monitoring apply -f utils/metrics-exporters/kube-state-metrics/
kubectl -n litmus apply -f utils/metrics-exporters/litmus-metrics/chaos-exporter/
```
### Setup Grafana
#### Apply the grafana manifests after deploying prometheus for all metrics.

View File

@ -1,46 +1,10 @@
{
"__inputs": [
{
"name": "DS_DS_PROMETHEUS",
"label": "DS_PROMETHEUS",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "panel",
"id": "gauge",
"name": "Gauge",
"version": ""
},
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.5.5"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
}
],
"annotations": {
"list": [
{
"$$hashKey": "object:258",
"builtIn": 1,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"enable": true,
"expr": "litmuschaos_awaited_experiments{chaosresult_name=~\"$chaosresult_name\", job=\"litmus/chaos-exporter\", app=\"chaos-exporter\"}",
"hide": false,
@ -55,7 +19,7 @@
"type": "dashboard"
},
{
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"enable": true,
"expr": "litmuschaos_experiment_verdict{chaosresult_name=~\"$chaosresult_name\",chaosengine_context=~\"$chaosengine_context\", job=\"litmus/chaos-exporter\", app=\"chaos-exporter\"}",
"hide": false,
@ -79,7 +43,7 @@
"panels": [
{
"collapsed": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"gridPos": {
"h": 1,
"w": 24,
@ -97,7 +61,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"unit": "none"
@ -192,7 +156,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"unit": "none"
@ -299,7 +263,7 @@
},
{
"cacheTimeout": null,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"mappings": [],
@ -361,7 +325,7 @@
},
{
"cacheTimeout": null,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"mappings": [],
@ -423,7 +387,7 @@
},
{
"cacheTimeout": null,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"mappings": [],
@ -483,7 +447,7 @@
},
{
"cacheTimeout": null,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"mappings": [],
@ -575,7 +539,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"unit": "none"
@ -727,7 +691,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"unit": "none"
@ -847,7 +811,7 @@
},
{
"collapsed": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"gridPos": {
"h": 1,
"w": 24,
@ -865,7 +829,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"links": []
@ -1008,7 +972,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"links": []
@ -1163,7 +1127,7 @@
},
{
"collapsed": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"gridPos": {
"h": 1,
"w": 24,
@ -1181,7 +1145,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"links": []
@ -1327,7 +1291,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"links": []
@ -1484,7 +1448,7 @@
},
{
"collapsed": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"gridPos": {
"h": 1,
"w": 24,
@ -1502,7 +1466,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"links": []
@ -1608,7 +1572,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"links": []
@ -1714,7 +1678,7 @@
},
{
"collapsed": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"gridPos": {
"h": 1,
"w": 24,
@ -1732,7 +1696,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"links": []
@ -1839,7 +1803,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"links": []
@ -1945,7 +1909,7 @@
},
{
"collapsed": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"gridPos": {
"h": 1,
"w": 24,
@ -1963,7 +1927,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"links": []
@ -2065,7 +2029,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"links": []
@ -2171,7 +2135,7 @@
},
{
"collapsed": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"gridPos": {
"h": 1,
"w": 24,
@ -2189,7 +2153,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"links": []
@ -2291,7 +2255,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"links": []
@ -2397,7 +2361,7 @@
},
{
"collapsed": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"gridPos": {
"h": 1,
"w": 24,
@ -2415,7 +2379,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"links": []
@ -2517,7 +2481,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"links": []
@ -2631,7 +2595,7 @@
{
"allValue": null,
"current": {},
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"definition": "label_values(litmuschaos_awaited_experiments{app=~\"chaos-exporter\"}, chaosresult_name)",
"description": "Chaos results",
"error": null,
@ -2658,7 +2622,7 @@
{
"allValue": null,
"current": {},
"datasource": "${DS_DS_PROMETHEUS}",
"datasource": "DS_PROMETHEUS",
"definition": "label_values(litmuschaos_experiment_verdict{app=~\"chaos-exporter\"}, chaosengine_context)",
"description": "Chaos Engine contexts",
"error": null,

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ metadata:
namespace: monitoring
spec:
ports:
- nodePort: 31687
- nodePort: 31688
port: 3000
protocol: TCP
targetPort: 3000