Skip to content

Commit

Permalink
update entrypoint and README
Browse files Browse the repository at this point in the history
  • Loading branch information
yunlzheng committed May 10, 2017
1 parent 6592b00 commit 9a61e41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ In some case, if you want add external metrics key for the origin metrics data.
In our case, we collection container data from mutil rancher environment with cadvistor.
We want the prometheus query express can precise positioning the container from different environment. So we add rancher environment uuid as the custom label.

```
-config.customLabels=environmentUUID -config.customLabelValues=$(curl http://rancher-metadata/latest/self/host/environment_uuid)
```

> Note. customLabel will overwrite the origin metrics label
```
Expand Down
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
ENVIRONMENT_UUID=$(curl http://rancher-metadata/latest/self/host/environment_uuid)
/bin/prometheus_pusher -config.customLabels=environmentUUID -config.customLabelValues=${ENVIRONMENT_UUID} $@

/bin/prometheus_pusher $@

0 comments on commit 9a61e41

Please sign in to comment.