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: docs/content/tutorial/monitoring.md
+19-6Lines changed: 19 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,23 @@ draft: false
5
5
weight: 90
6
6
---
7
7
8
-
While having [high availability]({{< relref "tutorial/high-availability.md" >}}) and [disaster recovery]({{< relref "tutorial/disaster-recovery.md" >}}) systems in place helps in the event of something going wrong with your PostgreSQL cluster, monitoring helps you anticipate problems before they happen. Additionally, monitoring can help you diagnose and resolve issues that may cause degraded performance rather than downtime.
8
+
While having [high availability]({{< relref "tutorial/high-availability.md" >}}) and
9
+
[disaster recovery]({{< relref "tutorial/disaster-recovery.md" >}}) systems in place helps in the
10
+
event of something going wrong with your PostgreSQL cluster, monitoring helps you anticipate
11
+
problems before they happen. Additionally, monitoring can help you diagnose and resolve issues that
12
+
may cause degraded performance rather than downtime.
9
13
10
14
Let's look at how PGO allows you to enable monitoring in your cluster.
11
15
12
16
## Adding the Exporter Sidecar
13
17
14
-
Let's look at how we can add the Crunchy PostgreSQL Exporter sidecar to your cluster using the `kustomize/postgres` example in the [Postgres Operator examples](https://github.com/CrunchyData/postgres-operator-examples/fork) repository.
18
+
Let's look at how we can add the Crunchy PostgreSQL Exporter sidecar to your cluster using the
19
+
`kustomize/postgres` example in the [Postgres Operator examples] repository.
15
20
16
-
Monitoring tools are added using the `spec.monitoring` section of the custom resource. Currently, the only monitoring tool supported is the Crunchy PostgreSQL Exporter configured with [pgMonitor].
21
+
Monitoring tools are added using the `spec.monitoring` section of the custom resource. Currently,
22
+
the only monitoring tool supported is the Crunchy PostgreSQL Exporter configured with [pgMonitor].
17
23
18
-
The only required attribute for adding the Exporter sidecar is to set `spec.monitoring.pgmonitor.exporter.image`. In the `kustomize/postgres/postgres.yaml` file, add the following YAML to the spec:
24
+
In the `kustomize/postgres/postgres.yaml` file, add the following YAML to the spec:
19
25
20
26
```
21
27
monitoring:
@@ -30,11 +36,17 @@ Save your changes and run:
30
36
kubectl apply -k kustomize/postgres
31
37
```
32
38
33
-
PGO will detect the change and add the Exporter sidecar to all Postgres Pods that exist in your cluster. PGO will also do the work to allow the Exporter to connect to the database and gather metrics that can be accessed using the [PGO Monitoring] stack.
39
+
PGO will detect the change and add the Exporter sidecar to all Postgres Pods that exist in your
40
+
cluster. PGO will also do the work to allow the Exporter to connect to the database and gather
41
+
metrics that can be accessed using the [PGO Monitoring] stack.
42
+
34
43
35
44
## Accessing the Metrics
36
45
37
-
Once the Crunchy PostgreSQL Exporter has been enabled in your cluster, follow the steps outlined in [PGO Monitoring] to install the monitoring stack. This will allow you to deploy a [pgMonitor] configuration of [Prometheus], [Grafana], and [Alertmanager] monitoring tools in Kubernetes. These tools will be set up by default to connect to the Exporter containers on your Postgres Pods.
46
+
Once the Crunchy PostgreSQL Exporter has been enabled in your cluster, follow the steps outlined in
47
+
[PGO Monitoring] to install the monitoring stack. This will allow you to deploy a [pgMonitor]
48
+
configuration of [Prometheus], [Grafana], and [Alertmanager] monitoring tools in Kubernetes. These
49
+
tools will be set up by default to connect to the Exporter containers on your Postgres Pods.
38
50
39
51
## Next Steps
40
52
@@ -45,3 +57,4 @@ Now that we can monitor our cluster, let's explore how [connection pooling]({{<
0 commit comments