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/logging-and-monitoring/prometheus.md
+20-2Lines changed: 20 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@ title: Prometheus
3
3
4
4
description: "The Ingress Controller exposes a number of metrics in the Prometheus format."
5
5
weight: 2000
6
-
doctypes: [""]
6
+
doctypes: ["concept"]
7
7
aliases:
8
-
- /prometheus/
8
+
- /prometheus/
9
9
toc: true
10
10
docs: "DOCS-614"
11
11
---
@@ -15,6 +15,8 @@ The Ingress Controller exposes a number of metrics in the [Prometheus](https://p
15
15
16
16
## Enabling Metrics
17
17
18
+
### Using Manifest
19
+
18
20
If you're using *Kubernetes manifests* (Deployment or DaemonSet) to install the Ingress Controller, to enable Prometheus metrics:
19
21
20
22
1. Run the Ingress Controller with the `-enable-prometheus-metrics`[command-line argument](/nginx-ingress-controller/configuration/global-configuration/command-line-arguments). As a result, the Ingress Controller will expose NGINX or NGINX Plus metrics in the Prometheus format via the path `/metrics` on port `9113` (customizable via the `-prometheus-metrics-listen-port` command-line argument).
@@ -35,8 +37,24 @@ If you're using *Kubernetes manifests* (Deployment or DaemonSet) to install the
35
37
prometheus.io/scheme: http
36
38
```
37
39
40
+
### Using Helm
41
+
38
42
If you're using *Helm* to install the Ingress Controller, to enable Prometheus metrics, configure the `prometheus.*` parameters of the Helm chart. See the [Installation with Helm](/nginx-ingress-controller/installation/installation-with-helm) doc.
39
43
44
+
### Using ServiceMonitor
45
+
46
+
When deploying with *Helm*, you can deploy a `Service` and `ServiceMonitor` resource using the `prometheus.service.*` and `prometheus.serviceMonitor.*` parameters.
47
+
When these resources are deployed, Prometheus metrics exposed by the NGINX Ingress Controller can be captured and enumerated using a `Prometheus` resource alongside a Prometheus Operator deployment.
48
+
49
+
To view metrics captured this way, the following is required:
50
+
* The latest ServiceMonitor CRD from the [prometheus-operator](https://github.com/prometheus-operator/prometheus-operator) repository:
0 commit comments