You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/02/07 12:17:57 UTC

[GitHub] [skywalking-website] kezhenxu94 commented on a change in pull request #210: blog:SkyWalking 8.4 provides infrastructure monitoring

kezhenxu94 commented on a change in pull request #210:
URL: https://github.com/apache/skywalking-website/pull/210#discussion_r571607857



##########
File path: content/blog/2021-02-07-infrastructure-monitoring/index.md
##########
@@ -0,0 +1,204 @@
+---
+title: "SkyWalking 8.4 provides infrastructure monitoring"
+date: 2021-02-07
+author: Kai Wan, Sheng Wu. tetrate.io
+description: In this tutorial, learn how to use Apache SkyWalking for infrastructure monitoring 
+tags:
+- Infrastructure Monitoring
+---
+
+## Background
+Apache SkyWalking-- the APM tool for distributed systems--  has historically focused on providing observability around tracing and metrics, but service performance is often affected by the host. The newest release, SkyWalking 8.4.0, introduces a new  feature for monitoring  virtual machines. Users can easily detect possible problems from the dashboard-- for example, when CPU usage is overloaded, when there’s not enough memory or disk space, or when the network status is unhealthy, etc. 
+
+## How it works
+SkyWalking leverages Prometheus and OpenTelemetry for collecting metrics data as we did for Istio control panel metrics; Prometheus is mature and widely used, and we expect to see increased adoption of the new CNCF project, OpenTelemetry. The SkyWalking OAP Server receives these metrics data of OpenCensus format from OpenTelemetry. The process is as follows:
+
+![The monitring work process](how-it-works.jpg)
+
+1. Prometheus Node Exporter collects metrics data from the VMs.
+2. OpenTelemetry Collector fetches metrics from Node Exporters via Prometheus Receiver,  and pushes metrics to Skywalking OAP Server via the OpenCensus GRPC Exporter.
+3. The Skywalking OAP Server parses the expression with [MAL](https://github.com/apache/skywalking/blob/master/docs/en/concepts-and-designs/mal.md) to filter/calculate/aggregate and store the results. The expression rules are in `/config/otel-oc-rules/vm.yaml`.
+4. We can now see the data on the SkyWalking WebUI dashboard.
+   
+## What to monitor
+SkyWalking provides default monitoring metrics including:
+CPU Usage (%)
+Memory RAM Usage (MB)
+Memory Swap Usage (MB)
+CPU Average Used
+CPU Load
+Memory RAM (total/available/used MB)
+Memory Swap (total/free MB)
+File System Mount point Usage (%)
+Disk R/W (KB/s)
+Network Bandwidth Usage (receive/transmit KB/s)
+Network Status (tcp_curr_estab/tcp_tw/tcp_alloc/sockets_used/udp_inuse)
+File fd Allocated
+ 
+The following is how it looks when we monitor Linux:
+
+![](monitoring-screen-shot1.png)
+
+![](monitoring-screen-shot2.png)
+
+## How to use
+To enable this feature, we need to install Prometheus Node Exporter and OpenTelemetry Collector and activate the VM monitoring rules in SkyWalking OAP Server.
+
+### Install Prometheus Node Exporter
+
+```shell
+wget https://github.com/prometheus/node_exporter/releases/download/v1.0.1/node_exporter-1.0.1.linux-amd64.tar.gz
+tar xvfz node_exporter-1.0.1.linux-amd64.tar.gz
+cd node_exporter-1.0.1.linux-amd64
+./node_exporter
+```
+
+In linux Node Exporter  exposes metrics on port `9100` by default. When it is running, we can get the metrics  from the `/metrics` endpoint. Use a web browser or command `curl` to verify.
+
+```shell
+curl http://localhost:9100/metrics
+```
+
+We should see all the metrics from the output like:
+```shell
+# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
+# TYPE go_gc_duration_seconds summary
+go_gc_duration_seconds{quantile="0"} 7.7777e-05
+go_gc_duration_seconds{quantile="0.25"} 0.000113756
+go_gc_duration_seconds{quantile="0.5"} 0.000127199
+go_gc_duration_seconds{quantile="0.75"} 0.000147778
+go_gc_duration_seconds{quantile="1"} 0.000371894
+go_gc_duration_seconds_sum 0.292994058
+go_gc_duration_seconds_count 2029
+...
+```
+
+Note: We only need to install Node Exporter,  rather than Prometheus server. 
+If you want to get more information about Prometheus Node Exporter  see: https://prometheus.io/docs/guides/node-exporter/
+
+### Install OpenTelemetry Collector
+We can quickly install a OpenTelemetry Collector instance by using `docker-compose` with the following steps
+Create a directory to store the configuration files, like `/usr/local/otel`

Review comment:
       Add a period `.` at the end of the sentence, or use a bullet list at the beginning of the sentence, otherwise the rendered page is odd.
   <img width="1045" alt="image" src="https://user-images.githubusercontent.com/15965696/107146192-851e8680-6981-11eb-8a57-fedf9a98082a.png">
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org