You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/blog/set-up-apache-skywalking-for-k8s-and-vm-monitoring-in-hpe-greenlake-private-cloud.md
+27-28Lines changed: 27 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,28 +12,28 @@ tags:
12
12
13
13
[HPE GreenLake for Private Cloud Enterprise](https://www.hpe.com/us/en/greenlake/private-cloud-enterprise.html) delivers a modern private cloud to support your app workloads with bare metal, containers, and virtual machines (VMs) running in any combination across your edges, colocations, and data centers. It combines self-service resource access for developers with consumption and performance transparency for IT. Within this modern application environment, having a robust application performance monitoring (APM) tool is becoming essential. It can help IT professionals to ensure that deployed applications meet the performance, reliability and valuable user experience required by developers, partners and customers.
14
14
15
-
In [my first blog post](https://developer.hpe.com/blog/get-started-with-application-performance-monitoring-tools-overview/), we walked through some of the best APM tools, described their key features and discussed in details their strengths and weaknesses.
15
+
In [the first blog post](https://developer.hpe.com/blog/get-started-with-application-performance-monitoring-tools-overview/), we walked through some of the best APM tools, described their key features and discussed in details their strengths and weaknesses.
16
16
17
-
In this blog post, we will start choosing one APM tool, *Apache SkyWalking*, and describe the detailed process to set it up in HPE GreenLake for Private Cloud Enterprise for monitoring customer applications.
17
+
In this blog post, we will start choosing one APM tool, *Apache SkyWalking*, and describe the detailed process how to set it up in HPE GreenLake for Private Cloud Enterprise for monitoring and alerting customer applications.
18
18
19
19
## Apache SkyWalking
20
20
21
21
[Apache SkyWalking](https://skywalking.apache.org/) is an open source APM tool with capabilities for monitoring, tracing and diagnosing distributed system. It’s especially designed for microservices, cloud native and container-based architectures.
22
22
23
-
Apache SkyWalking provides a list of agents to be used for building *Java*, *.NET Core*, *PHP*, *Node.js*, *Golang*, *LUA*, *Rust* and *C++* apps. It provides tracing, metrics analysis, alerting, service mesh observability and visualization.
23
+
Apache SkyWalking provides a list of agents to be used for building *Java*, *.NET Core*, *PHP*, *NodeJS*, *Golang*, *LUA*, *Rust* and *C++* apps. It provides tracing, metrics analysis, alerting, service mesh observability and visualization.
24
24
25
-
Apache SkyWalking is lightweight, scalable, and supports alerting and visualization. It can be easily set up as a *self-managed* APM tool within an on-premises data center. This avoids leasing customer data to third party services and matches very well with the security restriction in HPE GreenLake for Private Cloud Enterprise environment.
25
+
Apache SkyWalking is lightweightand scalable. It can be easily set up as a *self-managed* APM tool within an on-premises data center. This avoids leasing customer data to third party services and matches well with the strict security restriction in HPE GreenLake for Private Cloud Enterprise environment.
26
26
27
27
## Set up Apache SkyWalking for Application Monitoring
28
28
29
-
We will take the approach to setting up the Apache SkyWalking as a *self-hosted* APM tool within the Kubernetes cluster created in HPE GreenLake for Private Cloud Enterprise. This mainly takes into account the security concerns in HPE GreenLake product environment.
29
+
We will take the approach to setting up the Apache SkyWalking as a *self-managed* APM tool within the Kubernetes cluster created in HPE GreenLake for Private Cloud Enterprise. This mainly takes into account the security concerns in HPE GreenLake product environment.
30
30
31
31
### Prerequisites
32
32
33
33
Before we start, make sure we meet the following requirements:
34
34
35
35
* A Kubernetes cluster, being provisioned in HPE GreenLake for Private Cloud Enterprise;
36
-
* The *kubectl* CLI tool, version 1.23.1 or later, together with the *kubeconfig* files for accessing the Kubernetes cluster;
36
+
* The *kubectl* CLI tool, version 1.23 or later, together with the *kubeconfig* files for accessing the Kubernetes cluster;
37
37
* The *[Helm](https://helm.sh/docs/intro/install/)* CLI tool, version 3.8.1 or later.
The Apache SkyWalking is installed to the Kubernetes cluster namespace *skywalking*. It creates the *elasticsearch* as the `StatefulSet`, running pod on each worker node. It runs the Apache SkyWalking OAP with replicas as 2 to provide high availability.
58
+
After running above commands, the Apache SkyWalking is installed to the Kubernetes cluster's namespace *skywalking*. It creates the *elasticsearch* as the `StatefulSet`, running a pod on each worker node. It runs the Apache SkyWalking OAP with replicas as 2 to provide high availability.
59
59
60
-
It should be noted that the last option *elasticsearch.sysctlInitContainer.enabled=false* is necessary. Otherwise, it will try to set up *vm.max_map_count* using a privileged container during *elasticsearch* installation. It will violate the existing *PodSecurityPolicy* deployed in the HPE GreenLake environment. Therefore, it will fail the Helm install.
60
+
It should be noted that the last option *elasticsearch.sysctlInitContainer.enabled=false* is necessary. Otherwise, it will try to set up *vm.max_map_count* using a privileged container during *elasticsearch* installation. It will violate the existing *PodSecurityPolicy* deployed in the HPE GreenLake environment. It therefore will fail the Helm install.
61
61
62
62
We can check the detailed Apache SkyWalking installation by typing the following *kubectl* command:
63
63
@@ -146,15 +146,15 @@ As the first demo application, create a *SpingBoot* Web app that provides a R
146
146
147
147
By building a *Docker* image using the generated *jar* file, this *SpringBoot* app can be easily deployed as a containerized application to the Kubernetes cluster.
148
148
149
-
Apache SkyWalking provides a list of agents per programming language that can be used for building into corresponding service which collects application data and exports them to the SkyWalking OAP server.
149
+
Apache SkyWalking provides a list of agents for instrumenting applications. A specific agent per programming language can be used for building into corresponding service which collects application data and exports them to the SkyWalking OAP server.
150
150
151
151

152
152
153
-
In order to monitor the sample *SpringBoot* app from Apache SkyWalking, we need to download the Java agent and rebuild the image.
153
+
In order to monitor the sample *SpringBoot*Web app from Apache SkyWalking, we need to download the Java agent and rebuild the image.
154
154
155
155

156
156
157
-
Here is the *Dockerfile* for building the new image:
157
+
Here is the *Dockerfile* for building the image with Java agent:
### Monitor SpringBoot Application from SkyWalking UI
172
172
173
-
After build the Docker image *guopingjia/springboot-k8s-demo:pce* and push it to the *DockerHub* registry, we deploy the *SpringBoot* app to the Kubernetes cluster:
173
+
After build the Docker image *guopingjia/springboot-k8s-demo:pce* and push it to the *DockerHub* registry, we deploy the *SpringBoot*Web app to the Kubernetes cluster:
174
174
175
175
```markdown
176
176
$ cat deployment.yaml
@@ -199,11 +199,11 @@ spec:
199
199
$ kubectl apply -f deployment.yaml
200
200
```
201
201
202
-
When the app gets deployed, the built-in Java agent will start collecting application data and post it to the SkyWalking OAP. All the application metrics will be available in the SkyWalking UI:
202
+
Upon the Web app gets deployed, the built-in Java agent will start collecting application data and post it to the SkyWalking OAP. All the application metrics will be available in the SkyWalking UI, under _General Service_ tab:
203
203
204
204

205
205
206
-
Here is the *SpingBoot* Web app topology map:
206
+
Below is the *SpingBoot* Web app topology map:
207
207
208
208

209
209
@@ -213,7 +213,7 @@ As the second demo application, we will deploy a multi-tier *music* applicati
213
213
214
214

215
215
216
-
In order to monitor the multi-tier application from Apache SkyWalking, we need to pickup the SkyWalking agent per programming language and rebuild corresponding service to instrument the application to the SkyWalking OAP server.
216
+
In order to monitor this multi-tier *music*application from Apache SkyWalking, we need to pick up the SkyWalking agent per programming language and rebuild corresponding service to instrument the application to the SkyWalking OAP server.
217
217
218
218
```markdown
219
219
├── app
@@ -254,7 +254,7 @@ In order to monitor the multi-tier application from Apache SkyWalking, we nee
254
254
└── src
255
255
```
256
256
257
-
After image files are rebuilt with the agents, the multi-tier application can be deployed to the K8s cluster:
257
+
After image files are rebuilt with the agents, the multi-tier *music*application can be deployed to the K8s cluster:
258
258
259
259
```markdown
260
260
$ envsubst < resources.yaml | kubectl create -f -
@@ -271,29 +271,29 @@ deployment.apps/loadgen-deployment created
271
271
272
272
### Monitor Multi-tier Application from SkyWalking UI
273
273
274
-
When the multi-tier app gets deployed, the agents built with each microservice will start collecting application data and post it to the SkyWalking OAP. The multi-tier music application metrics will be available in the SkyWalking UI, under _General Service_ tab:
274
+
When the multi-tier *music*app gets deployed, the agents built with each microservice will start collecting application data and post it to the SkyWalking OAP. The multi-tier *music* application metrics will be available in the SkyWalking UI, under _General Service_ tab:
275
275
276
276

277
277
278
-
Here is the multi-tier music application topology map:
278
+
Below is the multi-tier *music* application topology map:
279
279
280
280

281
281
282
-
You can also check the multi-tier music application trace page:
282
+
You can also check the following multi-tier *music* application trace page. It's very helpful when you debug any performance issue in the application.
283
283
284
284

285
285
286
286
### Application Alerting
287
287
288
288
Apache SkyWalking provides an alerting mechanism to measure application performance according to a list of pre-defined metrics, e.g., _service_resp_time_, _database_access_resp_time_, and _service_sla_. It will trigger alerting when some metrics reach its pre-defined thresholds. We can define new metrics or customize the existing metrics with new thresholds.
289
289
290
-
Here is the alarms page from SkyWalking UI showing all the triggered alerting for deployed multi-tier music app:
290
+
Here is the alarms page from SkyWalking UI showing all the triggered alerting for deployed multi-tier *music* app:
291
291
292
292

293
293
294
-
The alarms page shows *Successful rate of service agent::app is lower than 80% in 2 minutes of last 10 minutes*. It indicates issue from the frontend app server in multi-tier music application.
294
+
The alarms page shows *Successful rate of service agent::app is lower than 80% in 2 minutes of last 10 minutes*. It indicates issue from the frontend app server in multi-tier *music* application.
295
295
296
-
It's triggered by the following metric alerting rule _service_sla_:
296
+
The alerts are triggered by the following metric alerting rule _service_sla_:
297
297
298
298
```markdown
299
299
service_sla_rule:
@@ -309,17 +309,16 @@ It's triggered by the following metric alerting rule _service_sla_:
309
309
silence-period: 3
310
310
message: Successful rate of service {name} is lower than 80% in 2 minutes of last 10 minutes
311
311
```
312
-
313
-
From the below service `agent::app` overview page, it shows **Success Rate 66.66%**.
312
+
We can go to the frontend app by clicking the service `agent::app` from SkyWalking UI Service page. From the below service `agent::app` overview page, it shows **Success Rate 66.66%**.
314
313
315
314

316
315
317
-
You may check the service's trace page and try to figure out the root cause for this issue.
316
+
We may check further the service's trace page and try to figure out the root cause for this issue.
318
317
319
-

318
+

320
319
321
320
## Conclusion
322
321
323
-
This blog post took the Apache SkyWalking as the application performance monitoring (APM) tool and showed the detailed process to set it up, as a *self-managed* environment, in HPE GreenLake for Private Cloud Enterprise for monitoring and alerting applications. Using the instrumentation of multiple supported agents from Apache SkyWalking, the application workloads can be easily monitored through the integrated Apache SkyWalking UI, with nice application topology map, tracing details and real-time alarms for any application performance issues.
322
+
This blog post took the Apache SkyWalking as the application performance monitoring (APM) tool and showed the detailed process to set it up, as a *self-managed* environment in HPE GreenLake for Private Cloud Enterprise, for monitoring and alerting applications. Using the instrumentation of multiple supported agents from Apache SkyWalking, the application workloads can be easily monitored through the integrated Apache SkyWalking UI, with nice application topology map, tracing details and real-time alarms for any application performance issues.
324
323
325
-
In the next blog, we will show you how to use Apache SkyWalking for Kubernetes monitoing in HPE GreenLake for Private Cloud Enterprise.
324
+
In the next blog, we will show you how to use Apache SkyWalking for Kubernetes monitoring in HPE GreenLake for Private Cloud Enterprise.
0 commit comments