Skip to content

Commit 1f8eee6

Browse files
Matthew PerrinsSean Sundberg
andauthored
Monitoring updates for OpenShift monitoring (#257)
* Update Deploy first app content * Update monitoring page and some agenda content * Fixes spelling error * Fixes spelling error * Adds taillogs to skipped spelling words Co-authored-by: Sean Sundberg <[email protected]>
1 parent f639167 commit 1f8eee6

File tree

7 files changed

+58
-85
lines changed

7 files changed

+58
-85
lines changed

cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@
107107
"minikube",
108108
"Katacoda",
109109
"throughs",
110-
"devenvsetup"
110+
"devenvsetup",
111+
"taillogs"
111112
],
112113
// flagWords - list of words to be always considered incorrect
113114
// This is useful for offensive words and common spelling errors.

docs/developer-intermediate/deploy-app/index.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,7 @@ project.
4949
oc sync dev-{your intials}
5050
```
5151

52-
### 3. Grant required access to the service account of the namespace
53-
54-
Openshift Image registry is being used for storing docker images.Hence,permission needs to be given to the service account of the namespace to be able to pull images from registry.
55-
56-
```shell
57-
oc policy add-role-to-group system:image-puller system:serviceaccounts:${DEV_NAMESPACE}
58-
```
59-
60-
### 4. Open the Developer Dashboard
52+
### 3. Open the Developer Dashboard
6153

6254
The Developer Dashboard makes it easy for you to navigate to the tools, including a
6355
section that allows you to select a set of preconfigured [Starter Kits](https://develop.cloudnativetoolkit.dev/reference/starter-kit/starter-kit/) that make seeding your development project very easy.
@@ -207,14 +199,32 @@ below will walk through locating the installed application within the Web Consol
207199

208200
![Pods on OpenShift](../../images/deploy-app/topology.png)
209201

202+
### 10. Check how build is progressing
203+
204+
Now you have looked the pipeline running in the console, you can view the running tasks and view the logs from the Web Terminal.
205+
206+
At the end of the `oc pipeline` command you will see two `tkn` CLI commands output onto the console. Copy the values for this and run them in your web terminal.
207+
208+
```bash
209+
Next steps:
210+
Tekton cli:
211+
View PipelineRun info - tkn pr describe <app>-<id>
212+
View PipelineRun logs - tkn pr logs -f <ap>-<id>
213+
214+
```
215+
Once you have run these you can quick see what state the pipeline is at and you can tail the logs into the terminal as you watch the visual pipeline stages progress.
216+
217+
![Pods on OpenShift](../../images/deploy-app/taillogs.png)
218+
219+
210220
!!! success
211221

212222
**Success:** You now have your application running inside your development cluster and being delivered using a Tekton based CI pipeline. This is the beginning of the developer journey with IBM Cloud.
213223

214224
Having reached this point, we recommend you repeat the process a few more
215225
times using different **Code Patterns** templates and explore the **Developer** view in OpenShift to get familiar with it.
216226

217-
### 10. Run the application locally
227+
### 11. Run the application locally
218228

219229
Most developers like to run the code natively in local development environment. To do so, follow the instructions listed in the **README.md** file to run the code locally.
220230
You may be required to install a specific runtime like **Java**, **Node** or **Go**.
@@ -233,7 +243,7 @@ You may be required to install a specific runtime like **Java**, **Node** or **G
233243
npm run start
234244
```
235245

236-
### 11. Make a change to your code
246+
### 12. Make a change to your code
237247

238248
Within GitHub it is possible to open a full Visual Studio code web editor and make changes to you code.
239249

docs/developer-intermediate/index.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ The learning tasks help you understand the Developer Experience with IBM RedHat
8585
| Code Analysis | Code Quality with Sonarqube | [Code Analysis](code-analysis/) | 15 mins | |
8686
| Image Registry | Container Registry | [Image Registry](image-registry/) | 15 mins | |
8787
| Artifact Management | Artifact Management with Artifactory | [Artifact Management](artifact-management/) | 15 min | |
88-
| Monitoring | Sysdig Monitoring | [Monitoring](monitoring/) | 10 mins | |
89-
| Logging | Logging with LogDNA | [Logging](log-management/) | 10 mins | |
88+
| Monitoring | Monitoring with OpenShift | [Monitoring](monitoring/) | 10 mins | |
89+
| Logging | Logging with OpenShift | [Logging](log-management/) | 10 mins | |
9090
| **Q & A** | | | 10 mins | |
9191

9292
### Homework
@@ -97,8 +97,8 @@ The learning tasks help you understand the Developer Experience with IBM RedHat
9797
| [Deploy First App](deploy-app) | The very first experience of deploying an application via a Tekton pipeline in OpenShift or Kubernetes | | 25 mins | |
9898
| [SonarQube](code-analysis#give-it-a-try) | Creating a quality gate for Sonar Scan| | 20mins | |
9999
| [Image Registry](image-registry#give-it-a-try)| Accessing the image of your first app deployment| | 15 mins | |
100-
| [Monitoring](monitoring#give-it-a-try)| Sysdig Hands on Lab| | 15mins | |
101-
| [Logging](log-management#give-it-a-try)| LogDNA hands on Lab | | 15mins | |
100+
| [Monitoring](monitoring#give-it-a-try)| OpenShift Monitoring Hands on Lab| | 15mins | |
101+
| [Logging](log-management#give-it-a-try)| OpenShift Logging Hands on Lab | | 15mins | |
102102

103103
## Day 3 (2.5 Hours)
104104
| Task | Description | Link | Time | Presentations |
@@ -112,9 +112,8 @@ The learning tasks help you understand the Developer Experience with IBM RedHat
112112
| Inventory BFF | Creating the Inventory BFF with GraphQL | [Inventory BFF](inventory-bff/) | 25 mins | |
113113
| Inventory UI | Creating the UI microservice | [Inventory UI](inventory-ui/) | 25 mins | |
114114
| Inventory CD | CD with Argocd |[CD](../developer-advanced-1/inventory-cd/) |10 mins | |
115-
| TechZone Automation | Automated Provisioning of Environment | |15 mins | |
115+
| TechZone Automation | Automated Provisioning of Environment | |30 mins | |
116116
| **Q & A** | | | 10 mins | |
117-
| **Optional: inventory-app) | 60 mins | |
118117

119118
### Homework
120119

@@ -126,7 +125,6 @@ The learning tasks help you understand the Developer Experience with IBM RedHat
126125
| [Inventory BFF](inventory-bff/) | Creating the Inventory BFF with GraphQL | | 25 mins | |
127126
| [Inventory UI](inventory-ui/) | Creating the UI microservice | | 25 mins | |
128127
| [Inventory Backend with Cloudant](../developer-advanced-1/database-with-cloudant/)| Cloudant Database integration | | 30 mins | |
129-
| [Inventory UI with Appid](../developer-advanced-1/inventory-appid/) | Protecting Inventory UI with Appid integration | | 30 mins | |
130128

131129

132130
!!! success

docs/developer-intermediate/monitoring/index.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ description: Use Sysdig to monitor your running application
55
<!--- cSpell:ignore appview ICPA openshiftconsole Theia userid toolset crwexposeservice gradlew bluemix ocinstall Mico crwopenlink crwopenapp swaggerui gitpat gituser buildconfig yourproject wireframe devenvsetup viewapp crwopenlink atemplatized rtifactoryurlsetup Kata Koda configmap Katacoda checksetup cndp katacoda checksetup Linespace igccli regcred REPLACEME Tavis pipelinerun openshiftcluster invokecloudshell cloudnative sampleapp bwoolf hotspots multicloud pipelinerun Sricharan taskrun Vadapalli Rossel REPLACEME cloudnativesampleapp artifactoryuntar untar Hotspot devtoolsservices Piyum Zonooz Farr Kamal Arora Laszewski Roadmap roadmap Istio Packt buildpacks automatable ksonnet jsonnet targetport podsiks SIGTERM SIGKILL minikube apiserver multitenant kubelet multizone Burstable checksetup handson stockbffnode codepatterns devenvsetup newwindow preconfigured cloudantcredentials apikey Indexyaml classname errorcondition tektonpipeline gradlew gitsecret viewapp cloudantgitpodscreen crwopenlink cdply crwopenapp -->
66

77
!!! Warning
8-
*Note* Only study this section if you are development on an OpenShift Development environment that is managed on IBM Cloud. If you are on AWS or Azure go to the [OpenShift Monitoring](../ocp-monitoring/) content
8+
*Note* Only study this section if you are development on an OpenShift Development environment that is managed on IBM Cloud. If you are on AWS or Azure go to the [OpenShift Monitoring](../ocp-monitoring/) content
99

10-
In IBM Garage Method, one of the Operate practices is to [automate application monitoring](https://www.ibm.com/garage/method/practices/manage/practice_automated_monitoring/). Sysdig automates application monitoring, enabling an operator to view stats and collect metrics about a Kubernetes cluster and its deployments.
11-
The <Globals name="env" /> includes an IBM Cloud Monitoring with Sysdig service instance configured with a Sysdig agent installed in the environment's cluster. Simply by deploying your application into the <Globals name="env" />, Sysdig monitors it.
10+
In IBM Garage Method, one of the Operate practices is to [automate application monitoring](https://www.ibm.com/garage/method/practices/manage/practice_automated_monitoring/). Sysdig automates application monitoring, enabling an operator to view stats and collect metrics about a Kubernetes cluster and its deployments. OpenShift's development environment includes an IBM Cloud Monitoring with Sysdig service instance configured with a Sysdig agent installed in the environment's cluster. Simply by deploying your application into the OpenShift development environment, Sysdig monitors it.
1211

1312
- Open the Sysdig web UI by navigating to the OpenShift web console and click on 9 squares icon. It gives a list of the developer tools.
1413
- Select SysDig and navigate to SysDig UI.
1514

1615
## Sysdig Monitoring
1716

18-
[IBM Cloud Monitoring with Sysdig](https://cloud.ibm.com/docs/services/Monitoring-with-Sysdig) explains how to configure and use an instance of the Sysdig service, but the <Globals name="env" /> has already done most of this for you. You can skip steps 1-3 about user access, provisioning an instance, and installing an agent.
17+
[IBM Cloud Monitoring with Sysdig](https://cloud.ibm.com/docs/services/Monitoring-with-Sysdig) explains how to configure and use an instance of the Sysdig service, but the OpenShift development env has already done most of this for you. You can skip steps 1-3 about user access, provisioning an instance, and installing an agent.
1918

2019
### Sysdig dashboard
2120

@@ -35,7 +34,7 @@ By default, the Sysdig dashboard opens the **Explore** page on its **Deployments
3534
By default, Sysdig opens its **Overview by Process** dashboard, which has panels showing stats about CPU, memory, and networking.
3635
This is one of Sysdig's **Default Dashboards** (i.e. built-in dashboards).
3736

38-
These are the cumulative totals for all of the pods running in the cluster. Hover over a graph and a key pops up to list
37+
These are the cumulative totals for all the pods running in the cluster. Hover over a graph and a key pops up to list
3938
the pods and show each one's color.
4039

4140
- Expand your cluster and namespace, then select your deployment
291 KB
Loading
Lines changed: 26 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,48 @@
11
---
22
title: OpenShift Monitoring
3-
description: Use Sysdig to monitor your running application
3+
description: Use OpenShift monitoring to monitor your running application
44
---
55
<!--- cSpell:ignore appview ICPA openshiftconsole Theia userid toolset crwexposeservice gradlew bluemix ocinstall Mico crwopenlink crwopenapp swaggerui gitpat gituser buildconfig yourproject wireframe devenvsetup viewapp crwopenlink atemplatized rtifactoryurlsetup Kata Koda configmap Katacoda checksetup cndp katacoda checksetup Linespace igccli regcred REPLACEME Tavis pipelinerun openshiftcluster invokecloudshell cloudnative sampleapp bwoolf hotspots multicloud pipelinerun Sricharan taskrun Vadapalli Rossel REPLACEME cloudnativesampleapp artifactoryuntar untar Hotspot devtoolsservices Piyum Zonooz Farr Kamal Arora Laszewski Roadmap roadmap Istio Packt buildpacks automatable ksonnet jsonnet targetport podsiks SIGTERM SIGKILL minikube apiserver multitenant kubelet multizone Burstable checksetup handson stockbffnode codepatterns devenvsetup newwindow preconfigured cloudantcredentials apikey Indexyaml classname errorcondition tektonpipeline gradlew gitsecret viewapp cloudantgitpodscreen crwopenlink cdply crwopenapp -->
66

7-
In IBM Garage Method, one of the Operate practices is to [automate application monitoring](https://www.ibm.com/garage/method/practices/manage/practice_automated_monitoring/). Sysdig automates application monitoring, enabling an operator to view stats and collect metrics about a Kubernetes cluster and its deployments.
8-
The <Globals name="env" /> includes an IBM Cloud Monitoring with Sysdig service instance configured with a Sysdig agent installed in the environment's cluster. Simply by deploying your application into the <Globals name="env" />, Sysdig monitors it.
7+
In IBM Garage Method, one of the Operate practices is to [automate application monitoring](https://www.ibm.com/garage/method/practices/manage/practice_automated_monitoring/). OpenShift has embedded monitoring built in to help you view your application monitoring events, enabling an operator to view stats and collect metrics about a Kubernetes cluster and its deployments.
98

10-
- Open the Sysdig web UI by navigating to the OpenShift web console and click on 9 squares icon. It gives a list of the developer tools.
11-
- Select SysDig and navigate to SysDig UI.
9+
- Open the **Observe** console view by navigating to the **Developer View** in OpenShift web console and click on **Observe** menu.
1210

13-
## Sysdig Monitoring
11+
## Observing Apps in OpenShift
1412

15-
[IBM Cloud Monitoring with Sysdig](https://cloud.ibm.com/docs/services/Monitoring-with-Sysdig) explains how to configure and use an instance of the Sysdig service, but the <Globals name="env" /> has already done most of this for you. You can skip steps 1-3 about user access, provisioning an instance, and installing an agent.
13+
In the Observe view you are able to see the following views:
14+
- Dashboard, giving a summary view of the monitoring events for you namespace
15+
- Metrics , allows you to dig deeper into the various collected metrics for your namespace
16+
- Alerts, will allow you to see any generated alerts from your applications
17+
- Events, will allow you to see common events by kubernetes type
1618

17-
### Sysdig dashboard
19+
### Observe dashboard
1820

19-
Open the Sysdig web UI for your environment's cluster
20-
- [Step 4: Launch the web UI](https://cloud.ibm.com/docs/monitoring?topic=monitoring-getting-started#getting-started-step5) explains how to open the web UI
21-
- In the IBM Cloud dashboard, navigate to **Observability** > **Monitoring**
22-
- Find the monitoring instance named after your environment's cluster, such as `showcase-dev-iks-sysdig`
23-
![Sysdig Monitoring Instance](../../images/monitoring/sysdig-monitoring-instance.png)
24-
- In the monitoring instance, press the **View Sysdig** button to open the Sysdig web UI
21+
Open the **Observe** Dashboard in the OpenShift console.
22+
- Make sure you have select the project you are working in `dev-{mjp}`
23+
- Change the Time Range to _Last 12 Hours_ you should see your microservice metrics being displayed
24+
- Scroll down the Dashboard and you will see other important information like CPU Quota , Memory Usage and Current Network usage
25+
-
26+
![Dashboard](./dashboard.png)
2527

26-
### Explore your application
28+
### Explore metrics
2729

28-
By default, the Sysdig dashboard opens the **Explore** page on its **Deployments and Pods** grouping.
30+
You can drill into the detail behind the dashboard chats. You can look into the metrics for CPU, Memory and Network for the applications you have deployed in the namespace.
2931

30-
- Select your cluster
32+
- Click the drop-down to select CPU
33+
- Click the time drop-down to select 1h mins
34+
- Click Show PromSQL to show the underlying query being used to retrieve the data
3135

32-
By default, Sysdig opens its **Overview by Process** dashboard, which has panels showing stats about CPU, memory, and networking.
33-
This is one of Sysdig's **Default Dashboards** (i.e. built-in dashboards).
34-
35-
These are the cumulative totals for all of the pods running in the cluster. Hover over a graph and a key pops up to list
36-
the pods and show each one's color.
37-
38-
- Expand your cluster and namespace, then select your deployment
39-
40-
This shows the stats for just the pods in your deployment.
41-
42-
On the **Dashboard** page, you can create your own custom dashboards.
43-
44-
[Step 5: Monitor your environment](https://cloud.ibm.com/docs/monitoring?topic=monitoring-getting-started#getting-started-step6)
45-
of the Getting started tutorial gives some instructions on monitoring, managing, and what to do next.
46-
47-
48-
## Give it a try
49-
50-
Before you begin to monitor your application instances, make sure that you have [deployed an app](../deploy-app/) into your development cluster. This _Give it a Try_ uses [template-node-typescript](https://github.com/IBM/template-node-typescript) as an example.
51-
52-
The **SysDig** service is already created, bound and configured to listen to monitoring metrics and events for your development cluster. You can see this in the HTTP overview.
53-
54-
- Open the **SysDig** instance that is named the same as your development cluster.
55-
- Go to **Dashboards** > **Default Dashboards** > **Applications** > **HTTP**
56-
57-
The dashboard shows stats for all incoming HTTP requests for all apps in the cluster. Browse through these views to get a feel for what they're showing.
58-
59-
### View your app's metrics
60-
61-
Take a look at the metrics for your app.
62-
63-
- Select the **Explore** page in the left nav menu
64-
- On the Explore page, select the **Containerized Apps** grouping
65-
- Search for your app, e.g. `hello-world-mjp`
66-
- In the list of apps, select yours, e.g. `us.icr.io/mooc-team-one/hello-world-mjp:1.0.0-10`
67-
- With your app selected, select **Hosts & Containers** > **Overview by Container**
68-
69-
The Overview by Container dashboard shows metrics for the containers in your app. You will now see just the metrics for your app. You can view at different levels--from pod to namespace to node to cluster--giving you a fine grain access to your monitoring requirements.
70-
71-
![Metrics View](../../images/monitoring/appview.png)
36+
![Metrics](./metrics.png)
7237

7338
## Conclusion
7439

7540
It's important to be able to monitor your deployed applications.
76-
Here, the <Globals name="env" /> uses Sysdig Monitoring, but you never had to install or run Sysdig.
77-
Just deploy your application into the <Globals name="env" /> and it gets monitored automatically.
78-
After deploying your application, open the Sysdig web UI and browse the status, including the status
41+
Here, the OpenShift console includes an *Observe* view that helps you monitor your application metrics.
42+
Just deploy your application into your project namespace/project, and it gets monitored automatically.
43+
After deploying your application, open the *Observe* view from the OpenShift console and browse the status, including the status
7944
of your cluster as a whole and your deployment in particular.
8045

8146
### Learn more
8247

83-
Learn more about using SysDig Monitoring:
48+
Learn more about using [OpenShift Observe Monitoring](https://docs.openshift.com/container-platform/4.10/monitoring/monitoring-overview.html) click this link
110 KB
Loading

0 commit comments

Comments
 (0)