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/kubernetes-monitoring-using-prometheus-and-grafana-in-hpe-greenlake-for-private-cloud-enterprise.md
@@ -169,123 +169,12 @@ With above main.tf file, the working directory can be initialized by running the
169
169
commands will detect it and remind you to do so if necessary.
170
170
```
171
171
172
-
#### Initialize working directoryDeploy
172
+
#### Deploy Prometheus and Grafana
173
173
174
-
Apply the Terraform configuration and deploy Prometheus and Grafana to the K8s cluster by responingd _yes_ at the prompt to confirm the operation.
174
+
Apply the Terraform configuration and deploy Prometheus and Grafana to the K8s cluster by responding _yes_ at the prompt to confirm the operation. You may start first a dry run, by running *terraform plan*, to preview the changes to your infrastructure based on the data you provide in your Terraform file.
175
175
176
176
```markdown
177
-
$ terraform plan --var-file=../tfvar_files/variables.tfvars
178
-
179
-
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
Type _helm list_ command, both Prometheus and Grafana helm charts are deployed to the _monitoring_ namespace:
349
+
Type _helm list_ command, it shows both Prometheus and Grafana helm charts are deployed to the _monitoring_ namespace:
461
350
462
351
```markdown
463
352
$ helm list -n monitoring
@@ -466,35 +355,43 @@ grafana-dashboard monitoring 1 2023-11-22 15:28:07.986364628 +0100 CET de
466
355
prometheus-stack monitoring 1 2023-11-22 15:28:13.290386574 +0100 CET deployed prometheus-23.0.0 v2.45.0
467
356
```
468
357
358
+
### Set up Prometheus and Grafana for K8s monitoring
359
+
360
+
#### Access Prometheus
361
+
362
+
The Prometheus application can be accessed by pointing the browser to the URL *gl-tor-upc-cp-gw-node1.customer.yyz.gl-hpe.local:10015*, extracted by the following command:
363
+
469
364
```markdown
470
365
$ kubectl get service/prometheus-stack-server -n monitoring -o jsonpath='{.metadata.annotations.hpecp-internal-gateway/80}'
The Grafana dashboard can be accessed by pointing the browser to the URL *gl-tor-upc-cp-gw-node1.customer.yyz.gl-hpe.local:10016*. The URL and the admin password can be extracted by the following commands:
374
+
476
375
```markdown
477
376
$ kubectl get service/grafana-dashboard -n monitoring -o jsonpath='{.metadata.annotations.hpecp-internal-gateway/80}'
The Grafana dashboard can be accessed by typing the URL *gl-tor-upc-cp-gw-node1.customer.yyz.gl-hpe.local:10016*. Its admin password can be extracted by the following command
The Prometheus can be configured as the data sources to the Grafana dashboard, by specifying the HTTP URL as *http://gl-tor-upc-cp-gw-node1.customer.yyz.gl-hpe.local:10015/*.
385
+
#### Configure Grafana dashboard
386
+
387
+
The Prometheus can be configured as the data sources from the Grafana dashboard, by specifying the HTTP URL as *http://gl-tor-upc-cp-gw-node1.customer.yyz.gl-hpe.local:10015/*:
491
388
492
389

493
390
494
-
From [Grafana Labs](https://grafana.com/grafana/dashboards/), there is a list of dashboard templates you can download and imported them as monitoring dashboards to the Grafana.
391
+
From [Grafana Labs](https://grafana.com/grafana/dashboards/), there is a list of Grafana dashboard templates you can download and then import them as monitoring dashboards to the Grafana.
495
392
496
393

497
394
498
-
Here is the imported dashboard for K8s cluster monitoring (via Prometheus):
395
+
Here is the imported dashboard for _K8s cluster monitoring (via Prometheus)_:
0 commit comments