Skip to content

Commit bcc2560

Browse files
committed
Update Blog “set-up-apache-skywalking-for-k8s-and-vm-monitoring-in-hpe-greenlake-private-cloud”
1 parent 8bd0442 commit bcc2560

File tree

1 file changed

+27
-28
lines changed

1 file changed

+27
-28
lines changed

content/blog/set-up-apache-skywalking-for-k8s-and-vm-monitoring-in-hpe-greenlake-private-cloud.md

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,28 @@ tags:
1212

1313
[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.
1414

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.
1616

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.
1818

1919
## Apache SkyWalking
2020

2121
[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.
2222

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.
2424

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 lightweight and 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.
2626

2727
## Set up Apache SkyWalking for Application Monitoring
2828

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.
3030

3131
### Prerequisites
3232

3333
Before we start, make sure we meet the following requirements:
3434

3535
* 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;
3737
* The *[Helm](https://helm.sh/docs/intro/install/)* CLI tool, version 3.8.1 or later.
3838

3939
### Deploy Apache SkyWalking
@@ -55,9 +55,9 @@ $ helm install skywalking skywalking –n skywalking \
5555
--set elasticsearch.sysctlInitContainer.enabled=false
5656
```
5757

58-
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.
5959

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.
6161

6262
We can check the detailed Apache SkyWalking installation by typing the following *kubectl* command:
6363

@@ -146,15 +146,15 @@ As the first demo application, create a *SpingBoot* Web app that provides a R
146146

147147
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.
148148

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.
150150

151151
![](/img/sw-agents.png)
152152

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.
154154

155155
![](/img/java-agent.png)
156156

157-
Here is the *Dockerfile* for building the new image:
157+
Here is the *Dockerfile* for building the image with Java agent:
158158

159159
```markdown
160160
$ cat Dockerfile
@@ -170,7 +170,7 @@ ENTRYPOINT ["java","-javaagent:/opt/agent/skywalking-agent.jar=agent.namespace=d
170170

171171
### Monitor SpringBoot Application from SkyWalking UI
172172

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:
174174

175175
```markdown
176176
$ cat deployment.yaml
@@ -199,11 +199,11 @@ spec:
199199
$ kubectl apply -f deployment.yaml
200200
```
201201

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:
203203

204204
![](/img/java-app.png)
205205

206-
Here is the *SpingBoot* Web app topology map:
206+
Below is the *SpingBoot* Web app topology map:
207207

208208
![](/img/java-app-map.png)
209209

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

214214
![](/img/multl-tier-app-music.png)
215215

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.
217217

218218
```markdown
219219
├── app
@@ -254,7 +254,7 @@ In order to monitor the multi-tier application from Apache SkyWalking, we nee
254254
└── src
255255
```
256256

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:
258258

259259
```markdown
260260
$ envsubst < resources.yaml | kubectl create -f -
@@ -271,29 +271,29 @@ deployment.apps/loadgen-deployment created
271271

272272
### Monitor Multi-tier Application from SkyWalking UI
273273

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:
275275

276276
![](/img/multl-tier-app.png)
277277

278-
Here is the multi-tier music application topology map:
278+
Below is the multi-tier *music* application topology map:
279279

280280
![](/img/multl-tier-app-map.png)
281281

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.
283283

284284
![](/img/sw-app-trace.png)
285285

286286
### Application Alerting
287287

288288
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.
289289

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:
291291

292292
![](/img/sw-app-alarms.png)
293293

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.
295295

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_:
297297

298298
```markdown
299299
service_sla_rule:
@@ -309,17 +309,16 @@ It's triggered by the following metric alerting rule _service_sla_:
309309
silence-period: 3
310310
message: Successful rate of service {name} is lower than 80% in 2 minutes of last 10 minutes
311311
```
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%**.
314313

315314
![](/img/sw-svc-app-overview.png)
316315

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.
318317

319-
![](/img/sw-svc-app-trace.png)
318+
![](/img/sw-svc-app-trace.png)
320319

321320
## Conclusion
322321

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.
324323

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

Comments
 (0)