diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 6f3a291..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "liveServer.settings.port": 5501 -} \ No newline at end of file diff --git a/README.md b/README.md index df3b196..86b3c36 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,9 @@ repository stating what is missing. Observing Chaos Impact On Services Instrument Grafana Dashboards with LitmusChaos Prometheus Metrics - Coming Soon + + Click Here + Integrating with GitOps diff --git a/tutorial-running-chaos-workflow-on-remote-cluster/codelab.json b/tutorial-running-chaos-workflow-on-remote-cluster/codelab.json index d5e68e5..c73eb1c 100644 --- a/tutorial-running-chaos-workflow-on-remote-cluster/codelab.json +++ b/tutorial-running-chaos-workflow-on-remote-cluster/codelab.json @@ -18,5 +18,5 @@ "web" ], "tags": [], - "url": "tutorial-running-chaos-workflow-on-remote-cluster" + "url": "" } diff --git a/tutorials-observing-chaos-impact-on-services/codelab.json b/tutorials-observing-chaos-impact-on-services/codelab.json new file mode 100644 index 0000000..309d3d9 --- /dev/null +++ b/tutorials-observing-chaos-impact-on-services/codelab.json @@ -0,0 +1,22 @@ +{ + "environment": "web", + "format": "html", + "prefix": "https://storage.googleapis.com", + "mainga": "UA-49880327-14", + "updated": "2021-11-03T23:11:30Z", + "id": "", + "duration": 10, + "title": "Observing Chaos Impact On Services", + "authors": "Gbadebo Bello", + "summary": "In this tutorial, you will learn how to observe the impact of your chaos on services by implementing the Grafana dashboard on Litmus chaos Prometheus metrics", + "source": "1faVxpc_yLEBjR_7xhj6xu8zVt7HqK3tr18j9WQ88MuY", + "theme": "web", + "status": [ + "drafts" + ], + "category": [ + "web" + ], + "tags": [], + "url": "" +} diff --git a/tutorials-observing-chaos-impact-on-services/img/194f3f6662628e2.png b/tutorials-observing-chaos-impact-on-services/img/194f3f6662628e2.png new file mode 100644 index 0000000..80f09b7 Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/194f3f6662628e2.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/317ef59c0bbc2cca.png b/tutorials-observing-chaos-impact-on-services/img/317ef59c0bbc2cca.png new file mode 100644 index 0000000..86ee1d0 Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/317ef59c0bbc2cca.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/3587f7656d1dd13c.png b/tutorials-observing-chaos-impact-on-services/img/3587f7656d1dd13c.png new file mode 100644 index 0000000..6309da0 Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/3587f7656d1dd13c.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/3efe3dedff964b6a.png b/tutorials-observing-chaos-impact-on-services/img/3efe3dedff964b6a.png new file mode 100644 index 0000000..3fd720c Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/3efe3dedff964b6a.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/56e3f13e2a020281.png b/tutorials-observing-chaos-impact-on-services/img/56e3f13e2a020281.png new file mode 100644 index 0000000..ec7ff90 Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/56e3f13e2a020281.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/5a1632fd1e93b2a3.png b/tutorials-observing-chaos-impact-on-services/img/5a1632fd1e93b2a3.png new file mode 100644 index 0000000..c1345d0 Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/5a1632fd1e93b2a3.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/653d0fecffcf2dc2.png b/tutorials-observing-chaos-impact-on-services/img/653d0fecffcf2dc2.png new file mode 100644 index 0000000..8e81d0c Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/653d0fecffcf2dc2.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/69dab721be186ca6.png b/tutorials-observing-chaos-impact-on-services/img/69dab721be186ca6.png new file mode 100644 index 0000000..e9e34b3 Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/69dab721be186ca6.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/6e986e3739a12e67.png b/tutorials-observing-chaos-impact-on-services/img/6e986e3739a12e67.png new file mode 100644 index 0000000..3a676b0 Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/6e986e3739a12e67.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/72d7b8bc85510451.png b/tutorials-observing-chaos-impact-on-services/img/72d7b8bc85510451.png new file mode 100644 index 0000000..ee6f84f Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/72d7b8bc85510451.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/76bcafd5450d9a0.png b/tutorials-observing-chaos-impact-on-services/img/76bcafd5450d9a0.png new file mode 100644 index 0000000..043e97d Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/76bcafd5450d9a0.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/79a0df36bf246b22.png b/tutorials-observing-chaos-impact-on-services/img/79a0df36bf246b22.png new file mode 100644 index 0000000..659f32a Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/79a0df36bf246b22.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/8675549166221c1e.png b/tutorials-observing-chaos-impact-on-services/img/8675549166221c1e.png new file mode 100644 index 0000000..30e31cd Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/8675549166221c1e.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/8c9577491a7adcdb.png b/tutorials-observing-chaos-impact-on-services/img/8c9577491a7adcdb.png new file mode 100644 index 0000000..1ac216d Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/8c9577491a7adcdb.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/8cc4b7dedd6ee956.png b/tutorials-observing-chaos-impact-on-services/img/8cc4b7dedd6ee956.png new file mode 100644 index 0000000..ba36fbf Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/8cc4b7dedd6ee956.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/c438023c32b78484.png b/tutorials-observing-chaos-impact-on-services/img/c438023c32b78484.png new file mode 100644 index 0000000..7765b73 Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/c438023c32b78484.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/dd67e83bf813f006.png b/tutorials-observing-chaos-impact-on-services/img/dd67e83bf813f006.png new file mode 100644 index 0000000..324ae8b Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/dd67e83bf813f006.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/dff34e556a7b978d.png b/tutorials-observing-chaos-impact-on-services/img/dff34e556a7b978d.png new file mode 100644 index 0000000..cb77b5c Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/dff34e556a7b978d.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/f2644f403fd9bcdd.png b/tutorials-observing-chaos-impact-on-services/img/f2644f403fd9bcdd.png new file mode 100644 index 0000000..1d75a51 Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/f2644f403fd9bcdd.png differ diff --git a/tutorials-observing-chaos-impact-on-services/img/fdfc84a7bb0b0a8f.png b/tutorials-observing-chaos-impact-on-services/img/fdfc84a7bb0b0a8f.png new file mode 100644 index 0000000..ecab5ec Binary files /dev/null and b/tutorials-observing-chaos-impact-on-services/img/fdfc84a7bb0b0a8f.png differ diff --git a/tutorials-observing-chaos-impact-on-services/index.html b/tutorials-observing-chaos-impact-on-services/index.html new file mode 100644 index 0000000..0ccef4d --- /dev/null +++ b/tutorials-observing-chaos-impact-on-services/index.html @@ -0,0 +1,178 @@ + + + + + + + + + Observing Chaos Impact On Services + + + + + + + + + + +

Welcome

+

In this tutorial, you will learn how to observe the impact of your chaos on services by using a Prometheus data source and configuring a dashboard on Litmus

+

What you will learn

+ +

In this tutorial, we would first go over why monitoring is important in chaos engineering. We would then take a look at the analytics section on the portal, learn how to create and add a new data source. Lastly, we would use these data sources to create monitoring dashboards that we can use to observe impacts on our services.

+

Pre-Requisites

+ + + +
+ + +

The aim of Chaos Engineering is to build confidence in a system, and this confidence can only be built if this system can be tested in undesirable circumstances. As a part of the monitoring infrastructure, litmus has an analytics section that provides you with a complete set of visualization and performance metrics that helps you gain visual insights from your chaos experiments.

+ + +
+ + +

There are a couple of things that need to be done before you can begin to monitor your chaos workflows on the portal. But first, you need to add a data source.

+

Get a data source

+

First, we need to set up a data source that can be added. For this, we would be setting up Prometheus and grafana dashboards. Prometheus is an example of data source we can use here, however, there are other options.

+

Clone litmus and navigate to monitoring

+
git clone https://github.com/litmuschaos/litmus.git
+cd litmus/monitoring
+

Create a monitoring namespace on the cluster

+
Kubectl create ns monitoring
+

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 grafana manifests

+
kubectl -n monitoring apply -f utils/grafana/
+

It might take a while for the manifests to apply, ensure that the pods in the monitoring namespace have a Running status before proceeding. Run the command below to ensure this.

+
kubectl get pods -n monitoring
+

You should get the following output.

+

+

To access your grafana dashboard, navigate to <node ip>:<grafana port>. Run the below command to get your node IP. In case you have an external IP you can directly make use of that too.

+

For this example, the Node IP is: 192.168.49.2

+
kubectl get nodes -o wide
+

+

To get the port number of grafana service, run the below command

+
kubectl get svc -n monitoring
+

+

You can now navigate to <node ip>:<grafana port>, in my case, this will be 192.168.49.2:31688.

+

+

To access prometheus, navigate to <node ip>:<prometheus port>.

+

+ + +
+ + +

On your portal, navigate to the analytics section on the right navigation bar. Navigate to the Data Sources part of the top navigation bar and click the Add data source button.

+

+

The Data Source Type has defaulted to Prometheus, give your source a title and paste your <node ip>:<grafana port> in the URL section. Click next and save without editing anything else.

+

+

You will notice that this data source has now been added as a data source in your Data Source tab.

+

+ + +
+ + +

Now that we have a data source setup, we need to configure a dashboard where we can interface with our analytics data.

+

On the overview tab of the analytics section, click the Create a dashboard button.

+

+

Next, you will select a dashboard type, there are two default dashboard types namely:

+ +

You will see an option to select one of these metrics. For this tutorial, we would be using the Pod metrics as an example, so select Pod metrics.

+

+

Don't edit anything on the dashboard metadata, leave it as it is and click Next.

+

+

Next, you will select metrics to visualize, there are two options:

+ +

Click both checkboxes to select both.

+

+

Next, you will see an interface that allows you to tune the Queries that are being used to fetch the visualized data. If you know some SQL, you can write custom queries that fit your use case.

+

+

You can then save your changes and you'll be taken to your dashboard visualizations page.

+

+

There is an info button at the top right of the dashboard, you can toggle this button to see and adjust your application dashboard information.

+

+

Clicking the menu bar beside the info button lets you do the following:

+ +

You will also see the visualization being grouped into CPU and Memory usage respectively.

+

The visualizations are with respect to time, and you can hover on the graphs to see the values at that specific data point boldly.

+

+

Each visualization has three buttons at the top right. Edit, pop out and view metrics info.

+

+

Clicking edit takes you back to the page where you can tune/edit its queries.

+

+

Clicking view metrics info or pop out displays the chart in a way that shows the metrics info more clearly.

+

+

You can hover on anywhere on the chart to see the metrics at that point.

+ + +
+ + +

In this tutorial, you were introduced to the importance of Monitoring in chaos engineering, then you went over how you can add a Prometheus data source to your Litmus portal.

+

Lastly, you learned how to configure a new dashboard and monitor specific data points.

+ + +
+ + +

Please visit us in our LitmusSlack Channel (in Kubernetes workspace) and tell us how you like LitmusChaos and this tutorial! We are happy to hear your thoughts & suggestions!

+

Also, make sure to follow us on Twitter to get the latest news on LitmusChaos, our tutorials, and the newest releases!

+ + +
+ +
+ + + + + + + + +