Skip to content

Commit f272e30

Browse files
authored
Add support for prometheus for Plus (#249)
1 parent a19fcc7 commit f272e30

File tree

4 files changed

+106
-1
lines changed

4 files changed

+106
-1
lines changed

docs/installation.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,20 @@ For NGINX Plus, you can access the live activity monitoring dashboard:
149149
```
150150
1. Open your browser at http://127.0.0.1:8080/dashboard.html to access the dashboard.
151151
152+
## Support For Prometheus Monitoring
153+
154+
If you are using [Prometheus](https://prometheus.io/), you can deploy the NGINX Plus Ingress controller with the prometheus exporter for NGINX Plus. The exporter will export NGINX Plus metrics into your Prometheus. To deploy the Ingress controller with the exporter, use the modified manifests:
155+
* For a deployment, run:
156+
```
157+
$ kubectl apply -f deployment/nginx-plus-ingress-with-prometheus.yaml
158+
```
159+
* For a daemon set, run:
160+
```
161+
$ kubectl apply -f daemon-set/nginx-plus-ingress-with-prometheus.yaml
162+
```
163+
164+
**Note**: this is a preview version of the prometheus exporter for NGINX Plus. It is not suitable for using in production environments.
165+
152166
## Uninstall the Ingress Controller
153167
154168
Delete the `nginx-ingress` namespace to uninstall the Ingress controller along with all the auxiliary resources that were created:

docs/nginx-ingress-controllers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The table below summarizes the key difference between nginxinc/kubernetes-ingres
3333
| **Operational** |
3434
| Reporting the IP address(es) of the Ingress controller into Ingress resources | Supported | Coming soon | Coming soon |
3535
| Extended Status | Supported via a third-party module | Not supported | Supported |
36-
| Prometheus Integration | Supported | Not supported | Coming soon |
36+
| Prometheus Integration | Supported | Not supported | Supported |
3737
| Dynamic reconfiguration of endpoints (no configuration reloading) | Not supported | Not supported | Supported |
3838

3939
Notes:
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
apiVersion: extensions/v1beta1
2+
kind: DaemonSet
3+
metadata:
4+
name: nginx-ingress
5+
namespace: nginx-ingress
6+
spec:
7+
selector:
8+
matchLabels:
9+
app: nginx-ingress
10+
template:
11+
metadata:
12+
labels:
13+
app: nginx-ingress
14+
annotations:
15+
prometheus.io/scrape: "true"
16+
prometheus.io/port: "8090"
17+
spec:
18+
serviceAccountName: nginx-ingress
19+
containers:
20+
- image: nginx-plus-ingress:1.1.1
21+
name: nginx-plus-ingress
22+
ports:
23+
- name: http
24+
containerPort: 80
25+
hostPort: 80
26+
- name: https
27+
containerPort: 443
28+
hostPort: 443
29+
env:
30+
- name: POD_NAMESPACE
31+
valueFrom:
32+
fieldRef:
33+
fieldPath: metadata.namespace
34+
args:
35+
- -nginx-plus
36+
- -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
37+
- -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret
38+
#- -v=3 # Enables extensive logging. Useful for trooublshooting.
39+
- image: nginxdemos/nginxplus-prometheus-exporter:0.1.0
40+
name: nginxplus-prometheus-exporter
41+
args:
42+
- -listen-address
43+
- :8090
44+
- -plus
45+
- -metric-endpoint
46+
- http://127.0.0.1:8080/api
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Deployment
3+
metadata:
4+
name: nginx-ingress
5+
namespace: nginx-ingress
6+
spec:
7+
replicas: 1
8+
selector:
9+
matchLabels:
10+
app: nginx-ingress
11+
template:
12+
metadata:
13+
labels:
14+
app: nginx-ingress
15+
annotations:
16+
prometheus.io/scrape: "true"
17+
prometheus.io/port: "8090"
18+
spec:
19+
serviceAccountName: nginx-ingress
20+
containers:
21+
- image: nginx-plus-ingress:1.1.1
22+
name: nginx-plus-ingress
23+
ports:
24+
- name: http
25+
containerPort: 80
26+
- name: https
27+
containerPort: 443
28+
env:
29+
- name: POD_NAMESPACE
30+
valueFrom:
31+
fieldRef:
32+
fieldPath: metadata.namespace
33+
args:
34+
- -nginx-plus
35+
- -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
36+
- -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret
37+
#- -v=3 # Enables extensive logging. Useful for trooublshooting.
38+
- image: nginxdemos/nginxplus-prometheus-exporter:0.1.0
39+
name: nginxplus-prometheus-exporter
40+
args:
41+
- -listen-address
42+
- :8090
43+
- -plus
44+
- -metric-endpoint
45+
- http://127.0.0.1:8080/api

0 commit comments

Comments
 (0)