Skip to content

Commit f710a09

Browse files
committed
[federate_prometheus] Add remoteWrite configuration to Halm chart values
1 parent a9cb498 commit f710a09

File tree

1 file changed

+13
-24
lines changed

1 file changed

+13
-24
lines changed

docs/setup_installation/admin/monitoring/export-metrics.md

+13-24
Original file line numberDiff line numberDiff line change
@@ -104,31 +104,20 @@ To push metrics with this method we use the `remote_write` configuration.
104104
We will only give a sample configuration as `remote_write` is extensively documented in Prometheus [documentation](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write)
105105
In the example below we push metrics to a custom service listening on port 9096 which transforms the metrics and forwards them.
106106

107-
#### Step 1
108-
First we need to identify the name of the *ConfigMap* storing the Prometheus configuration. The guide assumes Hopsworks runs at
109-
`hopsworks` Namespace.
110-
111-
```bash
112-
export NAMESPACE=hopsworks
113-
configMapName=$(kubectl -n ${NAMESPACE} get configmap -l app.kubernetes.io/name=prometheus,app.kubernetes.io/component=server -ojsonpath='{.items[0].metadata.name}')
114-
```
115-
116-
#### Step 2
117-
Using the name of the ConfigMap from Step 1 edit the configuration
118-
119-
```bash
120-
kubectl -n ${NAMESPACE} edit configmap ${configMapName}
121-
```
122-
123-
Find the key `prometheus.yml` and add the following
107+
In order to configure Prometheus to push metrics to a remote HTTP service we need to customize our Helm chart values file with the following snippet after changing the *url* accordingly. You can also tweak other configuration parameters to your needs.
124108

125109
```yaml
126-
remote_write:
127-
- url: "http://localhost:9096"
128-
queue_config:
129-
capacity: 10000
130-
max_samples_per_send: 5000
131-
batch_send_deadline: 60s
110+
prometheus:
111+
prometheus:
112+
server:
113+
remoteWrite:
114+
- url: "http://localhost:9096"
115+
queue_config:
116+
capacity: 10000
117+
max_samples_per_send: 5000
118+
batch_send_deadline: 60s
132119
```
133120

134-
Save your changes, Prometheus will automatically reload the new configuration.
121+
If the section already exists, then append the `remoteWrite` section.
122+
123+
Run `helm install` or `helm upgrade` if it's the first time you install Hopsworks or you want to apply the change to an existing cluster respectively.

0 commit comments

Comments
 (0)