Skip to content

Commit 1fa3719

Browse files
authoredNov 11, 2022
add console metrics to metrics.md (#158)
1 parent 9e22b28 commit 1fa3719

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed
 
Loading

‎content/docs/enterprise/metrics.md

+18-6
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,30 @@ sidebar_label: Metrics
44
description: Use Prometheus as a metrics data store.
55
---
66

7-
Pomerium Enterprise uses Prometheus as a metrics collection back-end. You can configure Pomerium and the Console to talk to an existing Prometheus server, or configure the embedded Prometheus backend.
7+
Pomerium Enterprise uses Prometheus as a metrics collection back-end. You can configure Pomerium and the Console to talk to an existing Prometheus server, or configure the embedded Prometheus backend. This guide assumes you're running both Pomerium and Pomerium Enterprise on localhost `127.0.0.1`.
88

99
:::tip
1010
For production deployments, we suggest using a dedicated Prometheus instance.
1111
:::
1212

1313
## Prepare Pomerium
1414

15-
1. In the Pomerium `config.yaml`, define the [`metrics_address`](/docs/reference/metrics-address) key to a network interface and/or port. For example:
15+
1. In the Pomerium `pomerium-config.yaml`, define the [`metrics_address`](/docs/reference/metrics-address) key to a network interface and/or port. For example:
1616

17-
```yaml title="config.yaml"
18-
metrics_address: 192.0.2.31:9999
17+
```yaml title="pomerium-config.yaml"
18+
metrics_address: 127.0.0.1:9091
1919
```
2020
2121
The example above has Pomerium providing metrics at port `9999` on an IP address reachable by the Pomerium Console service.
2222

2323
If you're running Pomerium Enterprise in a distributed environment where the IP address is not known at the time of deployment, you can use the resolvable FQDN of the Pomerium host (`pomerium0.internal.mycompany.com`, for example), or override this key with the environment variable `METRICS_ADDRESS`. We do not recommend exposing this endpoint to public traffic as it can contain potentially sensitive information.
2424

25+
1. In the Pomerium Enterprise `pomerium-enterprise-config.yaml`, define the `metrics_addr` key to a network interface and/or port. For example:
26+
27+
```yaml title="config.yaml"
28+
metrics_addr: 127.0.0.1:9092
29+
```
30+
2531
## External Prometheus
2632

2733
1. Add the listener to your Prometheus configuration, usually via `prometheus.yml`:
@@ -31,7 +37,12 @@ For production deployments, we suggest using a dedicated Prometheus instance.
3137
scrape_interval: 30s
3238
scrape_timeout: 5s
3339
static_configs:
34-
- targets: ['192.0.2.10:9999']
40+
- targets: ['127.0.0.1:9901']
41+
- job_name: 'Pomerium Enterprise'
42+
scrape_interval: 30s
43+
scrape_timeout: 5s
44+
static_configs:
45+
- targets: ['127.0.0.1:9902']
3546
3647
```
3748

@@ -47,9 +58,10 @@ For production deployments, we suggest using a dedicated Prometheus instance.
4758
prometheus_url: http://192.168.122.50:9090
4859
```
4960

50-
1. Restart the Pomerium and Pomerium Enterprise services. You should now see route traffic data in the Enterprise Console:
61+
2. Restart the Pomerium and Pomerium Enterprise services. You should now see route traffic and External Data Source monitoring data in the Enterprise Console:
5162

5263
![Traffic Data in Pomerium Enterprise](img/console-route-traffic.png)
64+
![External Data Source in Pomerium Enterprise](img/console-ext-datasource-monitoring.png)
5365

5466
## Embedded Prometheus
5567

0 commit comments

Comments
 (0)
Please sign in to comment.