Skip to content

Commit 3c517f2

Browse files
Merge pull request #4375 from ovh/spt-add-choice-prometheus-operator
doc: 📝 add some precision on parameters
2 parents e45cafd + 714faab commit 3c517f2

File tree

15 files changed

+511
-631
lines changed

15 files changed

+511
-631
lines changed

pages/platform/kubernetes-k8s/monitoring-apps-grafana-prometheus/guide.de-de.md

Lines changed: 34 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ section: Monitoring & Observability
66
order: 00
77
routes:
88
canonical: 'https://docs.ovh.com/gb/en/kubernetes/monitoring-apps-prometheus-grafana/'
9-
updated: 2022-03-16
9+
updated: 2023-03-17
1010
---
1111

1212
<style>
@@ -31,7 +31,7 @@ updated: 2022-03-16
3131
}
3232
</style>
3333

34-
**Last updated March 16, 2022.**
34+
**Last updated March 17, 2023.**
3535

3636
## Objective
3737

@@ -85,36 +85,28 @@ Hang tight while we grab the latest from your chart repositories...
8585
Update Complete. ⎈Happy Helming!⎈
8686
</code></pre>
8787

88-
You need to modify some settings. To do this, inspect the chart to retrieve these values ​​in a file:
88+
To install the Prometheus Operator Helm chart in your OVHcloud Managed Kubernetes cluster, you need to customize some values.
89+
To do this, you can set parameters on the command line (`--set param.name=value`) or create a local file based on the values from the chart and pass it on the command line (`--values /tmp/kube-prometheus-stack.values`).
8990

90-
```bash
91-
helm inspect values prometheus-community/kube-prometheus-stack > /tmp/kube-prometheus-stack.values
92-
```
93-
94-
Open the `/tmp/kube-prometheus-stack.values` file in your favorite editor.
91+
For this tutorial we choose the first method.
9592

96-
Then search into it for `adminPassword` and replace it with the password you want to use for Grafana.
97-
98-
By default, the Grafana password should be like this:
99-
100-
```yaml
101-
adminPassword: prom-operator
102-
```
103-
104-
Copy and save the Grafana admin password, you will use it later in this tutorial.
105-
106-
You are now ready to install Prometheus and Grafana.
93+
To install Prometheus and Grafana:
10794

10895
```bash
10996
helm install prometheus-community/kube-prometheus-stack \
11097
--create-namespace --namespace prometheus \
11198
--generate-name \
112-
--values /tmp/kube-prometheus-stack.values \
11399
--set prometheus.service.type=LoadBalancer \
114100
--set prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false \
115-
--set grafana.service.type=LoadBalancer
101+
--set grafana.service.type=LoadBalancer \
102+
--set grafana.adminpassword=<my cool password>
116103
```
117104

105+
> [!primary]
106+
>
107+
> You can install only Prometheus without Grafana by setting the following property to false: `--set grafana.enabled=false`
108+
>
109+
118110
As you can see, a new `prometheus` namespace will be created and we specified that we want to deploy a LoadBalancer in order to access externally to Prometheus and Grafana easily.
119111

120112
You should have a behavior like this:
@@ -125,44 +117,44 @@ You should have a behavior like this:
125117
--values /tmp/kube-prometheus-stack.values \
126118
--set prometheus.service.type=LoadBalancer \
127119
--set prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false \
128-
--set grafana.service.type=LoadBalancer
129-
NAME: kube-prometheus-stack-1647417678
130-
LAST DEPLOYED: Wed Mar 16 09:01:23 2022
120+
--set grafana.service.type=LoadBalancer \
121+
--set grafana.adminpassword=myawesomepassword
122+
123+
NAME: kube-prometheus-stack-1679042344
124+
LAST DEPLOYED: Fri Mar 17 09:39:16 2023
131125
NAMESPACE: prometheus
132126
STATUS: deployed
133127
REVISION: 1
134128
NOTES:
135129
kube-prometheus-stack has been installed. Check its status by running:
136-
kubectl --namespace prometheus get pods -l "release=kube-prometheus-stack-1647417678"
130+
kubectl --namespace prometheus get pods -l "release=kube-prometheus-stack-1679042344"
137131

138132
Visit https://github.com/prometheus-operator/kube-prometheus for instructions on how to create & configure Alertmanager and Prometheus instances using the Operator.
139133
</code></pre>
140134

141135
You can also verify by checking the Pods in the new `prometheus` namespace:
142136

143137
<pre class="console"><code>$ kubectl get pods -n prometheus
144-
NAME READY STATUS RESTARTS AGE
145-
alertmanager-kube-prometheus-stack-1647-alertmanager-0 2/2 Running 0 14m
146-
kube-prometheus-stack-1647-operator-57b69b9667-d92sc 1/1 Running 0 14m
147-
kube-prometheus-stack-1647417678-grafana-695574b948-znqsd 3/3 Running 0 14m
148-
kube-prometheus-stack-1647417678-kube-state-metrics-6d4bc49pqlc 1/1 Running 0 14m
149-
kube-prometheus-stack-1647417678-prometheus-node-exporter-gxphr 1/1 Running 0 14m
150-
kube-prometheus-stack-1647417678-prometheus-node-exporter-jdtr6 1/1 Running 0 14m
151-
kube-prometheus-stack-1647417678-prometheus-node-exporter-xkqt2 1/1 Running 0 14m
152-
prometheus-kube-prometheus-stack-1647-prometheus-0 2/2 Running 0 14m
138+
NAME READY STATUS RESTARTS AGE
139+
alertmanager-kube-prometheus-stack-1679-alertmanager-0 2/2 Running 0 3m3s
140+
kube-prometheus-stack-1679-operator-9fdc894c9-frqc6 1/1 Running 0 3m12s
141+
kube-prometheus-stack-1679042344-grafana-86c64879cf-gqqkh 3/3 Running 0 3m12s
142+
kube-prometheus-stack-1679042344-kube-state-metrics-754cc98m2gh 1/1 Running 0 3m12s
143+
kube-prometheus-stack-1679042344-prometheus-node-exporter-2r8mc 1/1 Running 0 3m12s
144+
prometheus-kube-prometheus-stack-1679-prometheus-0 2/2 Running 0 3m2s
153145
</code></pre>
154146

155147
You can also check that `Prometheus` and `Grafana` have an external IP:
156148

157149
<pre class="console"><code>$ kubectl get svc -n prometheus
158150
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
159151
alertmanager-operated ClusterIP None <none> 9093/TCP,9094/TCP,9094/UDP 15m
160-
kube-prometheus-stack-1647-alertmanager ClusterIP 10.3.14.89 <none> 9093/TCP 15m
161-
kube-prometheus-stack-1647-operator ClusterIP 10.3.176.201 <none> 443/TCP 15m
162-
kube-prometheus-stack-1647-prometheus LoadBalancer 10.3.105.242 51.210.210.213 9090:31819/TCP 15m
163-
kube-prometheus-stack-1647417678-grafana LoadBalancer 10.3.28.111 51.210.253.47 80:32481/TCP 15m
164-
kube-prometheus-stack-1647417678-kube-state-metrics ClusterIP 10.3.235.254 <none> 8080/TCP 15m
165-
kube-prometheus-stack-1647417678-prometheus-node-exporter ClusterIP 10.3.237.94 <none> 9100/TCP 15m
152+
kube-prometheus-stack-1647-alertmanager ClusterIP ZZ.Z.ZZ.ZZ <none> 9093/TCP 15m
153+
kube-prometheus-stack-1647-operator ClusterIP ZZ.Z.ZZZ.ZZZ <none> 443/TCP 15m
154+
kube-prometheus-stack-1647-prometheus LoadBalancer ZZ.Z.ZZZ.ZZZ XX.XXX.XXX.XXX 9090:31819/TCP 15m
155+
kube-prometheus-stack-1647417678-grafana LoadBalancer ZZ.Z.ZZ.ZZZ YY.YYY.YYY.YY 80:32481/TCP 15m
156+
kube-prometheus-stack-1647417678-kube-state-metrics ClusterIP ZZ.Z.ZZZ.ZZZ <none> 8080/TCP 15m
157+
kube-prometheus-stack-1647417678-prometheus-node-exporter ClusterIP ZZ.Z.ZZZ.ZZ <none> 9100/TCP 15m
166158
prometheus-operated ClusterIP None <none> 9090/TCP 14m
167159
</code></pre>
168160

@@ -187,12 +179,12 @@ You should obtain the following result:
187179
<pre class="console"><code>$ export PROMETHEUS_URL=$(kubectl get svc -n prometheus -l app=kube-prometheus-stack-prometheus -o jsonpath='{.items[].status.loadBalancer.ingress[].ip}')
188180

189181
$ echo Prometheus URL: http://$PROMETHEUS_URL:9090
190-
Prometheus URL: http://152.228.168.191:9090
182+
Prometheus URL: http://XX.XXX.XXX.XXX:9090
191183

192184
$ export GRAFANA_URL=$(kubectl get svc -n prometheus -l app.kubernetes.io/name=grafana -o jsonpath='{.items[].status.loadBalancer.ingress[].ip}')
193185

194186
$ echo Grafana URL: http://$GRAFANA_URL
195-
Grafana URL: http://51.178.69.167
187+
Grafana URL: http://YY.YYY.YYY.YY
196188
</code></pre>
197189

198190
Open your browser and go to the Prometheus interface.

pages/platform/kubernetes-k8s/monitoring-apps-grafana-prometheus/guide.en-asia.md

Lines changed: 34 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ slug: monitoring-apps-prometheus-grafana
44
excerpt: 'Find out how to monitor and visualize metrics with Prometheus and Grafana on an OVHcloud Managed Kubernetes Service'
55
section: Monitoring & Observability
66
order: 00
7-
updated: 2022-03-16
7+
updated: 2023-03-17
88
---
99

1010
<style>
@@ -29,7 +29,7 @@ updated: 2022-03-16
2929
}
3030
</style>
3131

32-
**Last updated March 16, 2022.**
32+
**Last updated March 17, 2023.**
3333

3434
## Objective
3535

@@ -83,36 +83,28 @@ Hang tight while we grab the latest from your chart repositories...
8383
Update Complete. ⎈Happy Helming!⎈
8484
</code></pre>
8585

86-
You need to modify some settings. To do this, inspect the chart to retrieve these values ​​in a file:
86+
To install the Prometheus Operator Helm chart in your OVHcloud Managed Kubernetes cluster, you need to customize some values.
87+
To do this, you can set parameters on the command line (`--set param.name=value`) or create a local file based on the values from the chart and pass it on the command line (`--values /tmp/kube-prometheus-stack.values`).
8788

88-
```bash
89-
helm inspect values prometheus-community/kube-prometheus-stack > /tmp/kube-prometheus-stack.values
90-
```
91-
92-
Open the `/tmp/kube-prometheus-stack.values` file in your favorite editor.
89+
For this tutorial we choose the first method.
9390

94-
Then search into it for `adminPassword` and replace it with the password you want to use for Grafana.
95-
96-
By default, the Grafana password should be like this:
97-
98-
```yaml
99-
adminPassword: prom-operator
100-
```
101-
102-
Copy and save the Grafana admin password, you will use it later in this tutorial.
103-
104-
You are now ready to install Prometheus and Grafana.
91+
To install Prometheus and Grafana:
10592

10693
```bash
10794
helm install prometheus-community/kube-prometheus-stack \
10895
--create-namespace --namespace prometheus \
10996
--generate-name \
110-
--values /tmp/kube-prometheus-stack.values \
11197
--set prometheus.service.type=LoadBalancer \
11298
--set prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false \
113-
--set grafana.service.type=LoadBalancer
99+
--set grafana.service.type=LoadBalancer \
100+
--set grafana.adminpassword=<my cool password>
114101
```
115102

103+
> [!primary]
104+
>
105+
> You can install only Prometheus without Grafana by setting the following property to false: `--set grafana.enabled=false`
106+
>
107+
116108
As you can see, a new `prometheus` namespace will be created and we specified that we want to deploy a LoadBalancer in order to access externally to Prometheus and Grafana easily.
117109

118110
You should have a behavior like this:
@@ -123,44 +115,44 @@ You should have a behavior like this:
123115
--values /tmp/kube-prometheus-stack.values \
124116
--set prometheus.service.type=LoadBalancer \
125117
--set prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false \
126-
--set grafana.service.type=LoadBalancer
127-
NAME: kube-prometheus-stack-1647417678
128-
LAST DEPLOYED: Wed Mar 16 09:01:23 2022
118+
--set grafana.service.type=LoadBalancer \
119+
--set grafana.adminpassword=myawesomepassword
120+
121+
NAME: kube-prometheus-stack-1679042344
122+
LAST DEPLOYED: Fri Mar 17 09:39:16 2023
129123
NAMESPACE: prometheus
130124
STATUS: deployed
131125
REVISION: 1
132126
NOTES:
133127
kube-prometheus-stack has been installed. Check its status by running:
134-
kubectl --namespace prometheus get pods -l "release=kube-prometheus-stack-1647417678"
128+
kubectl --namespace prometheus get pods -l "release=kube-prometheus-stack-1679042344"
135129

136130
Visit https://github.com/prometheus-operator/kube-prometheus for instructions on how to create & configure Alertmanager and Prometheus instances using the Operator.
137131
</code></pre>
138132

139133
You can also verify by checking the Pods in the new `prometheus` namespace:
140134

141135
<pre class="console"><code>$ kubectl get pods -n prometheus
142-
NAME READY STATUS RESTARTS AGE
143-
alertmanager-kube-prometheus-stack-1647-alertmanager-0 2/2 Running 0 14m
144-
kube-prometheus-stack-1647-operator-57b69b9667-d92sc 1/1 Running 0 14m
145-
kube-prometheus-stack-1647417678-grafana-695574b948-znqsd 3/3 Running 0 14m
146-
kube-prometheus-stack-1647417678-kube-state-metrics-6d4bc49pqlc 1/1 Running 0 14m
147-
kube-prometheus-stack-1647417678-prometheus-node-exporter-gxphr 1/1 Running 0 14m
148-
kube-prometheus-stack-1647417678-prometheus-node-exporter-jdtr6 1/1 Running 0 14m
149-
kube-prometheus-stack-1647417678-prometheus-node-exporter-xkqt2 1/1 Running 0 14m
150-
prometheus-kube-prometheus-stack-1647-prometheus-0 2/2 Running 0 14m
136+
NAME READY STATUS RESTARTS AGE
137+
alertmanager-kube-prometheus-stack-1679-alertmanager-0 2/2 Running 0 3m3s
138+
kube-prometheus-stack-1679-operator-9fdc894c9-frqc6 1/1 Running 0 3m12s
139+
kube-prometheus-stack-1679042344-grafana-86c64879cf-gqqkh 3/3 Running 0 3m12s
140+
kube-prometheus-stack-1679042344-kube-state-metrics-754cc98m2gh 1/1 Running 0 3m12s
141+
kube-prometheus-stack-1679042344-prometheus-node-exporter-2r8mc 1/1 Running 0 3m12s
142+
prometheus-kube-prometheus-stack-1679-prometheus-0 2/2 Running 0 3m2s
151143
</code></pre>
152144

153145
You can also check that `Prometheus` and `Grafana` have an external IP:
154146

155147
<pre class="console"><code>$ kubectl get svc -n prometheus
156148
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
157149
alertmanager-operated ClusterIP None <none> 9093/TCP,9094/TCP,9094/UDP 15m
158-
kube-prometheus-stack-1647-alertmanager ClusterIP 10.3.14.89 <none> 9093/TCP 15m
159-
kube-prometheus-stack-1647-operator ClusterIP 10.3.176.201 <none> 443/TCP 15m
160-
kube-prometheus-stack-1647-prometheus LoadBalancer 10.3.105.242 51.210.210.213 9090:31819/TCP 15m
161-
kube-prometheus-stack-1647417678-grafana LoadBalancer 10.3.28.111 51.210.253.47 80:32481/TCP 15m
162-
kube-prometheus-stack-1647417678-kube-state-metrics ClusterIP 10.3.235.254 <none> 8080/TCP 15m
163-
kube-prometheus-stack-1647417678-prometheus-node-exporter ClusterIP 10.3.237.94 <none> 9100/TCP 15m
150+
kube-prometheus-stack-1647-alertmanager ClusterIP ZZ.Z.ZZ.ZZ <none> 9093/TCP 15m
151+
kube-prometheus-stack-1647-operator ClusterIP ZZ.Z.ZZZ.ZZZ <none> 443/TCP 15m
152+
kube-prometheus-stack-1647-prometheus LoadBalancer ZZ.Z.ZZZ.ZZZ XX.XXX.XXX.XXX 9090:31819/TCP 15m
153+
kube-prometheus-stack-1647417678-grafana LoadBalancer ZZ.Z.ZZ.ZZZ YY.YYY.YYY.YY 80:32481/TCP 15m
154+
kube-prometheus-stack-1647417678-kube-state-metrics ClusterIP ZZ.Z.ZZZ.ZZZ <none> 8080/TCP 15m
155+
kube-prometheus-stack-1647417678-prometheus-node-exporter ClusterIP ZZ.Z.ZZZ.ZZ <none> 9100/TCP 15m
164156
prometheus-operated ClusterIP None <none> 9090/TCP 14m
165157
</code></pre>
166158

@@ -185,12 +177,12 @@ You should obtain the following result:
185177
<pre class="console"><code>$ export PROMETHEUS_URL=$(kubectl get svc -n prometheus -l app=kube-prometheus-stack-prometheus -o jsonpath='{.items[].status.loadBalancer.ingress[].ip}')
186178

187179
$ echo Prometheus URL: http://$PROMETHEUS_URL:9090
188-
Prometheus URL: http://152.228.168.191:9090
180+
Prometheus URL: http://XX.XXX.XXX.XXX:9090
189181

190182
$ export GRAFANA_URL=$(kubectl get svc -n prometheus -l app.kubernetes.io/name=grafana -o jsonpath='{.items[].status.loadBalancer.ingress[].ip}')
191183

192184
$ echo Grafana URL: http://$GRAFANA_URL
193-
Grafana URL: http://51.178.69.167
185+
Grafana URL: http://YY.YYY.YYY.YY
194186
</code></pre>
195187

196188
Open your browser and go to the Prometheus interface.

0 commit comments

Comments
 (0)