Skip to content

Commit

Permalink
add profile control
Browse files Browse the repository at this point in the history
  • Loading branch information
yunlzheng committed May 10, 2017
1 parent 9a61e41 commit 5ae9d8f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#!/usr/bin/env bash

/bin/prometheus_pusher $@
ACTIVE_PROFILE=${PROFILE:=default}
echo 'ACTIVE PROFILE :'${ACTIVE_PROFILE}

case ${ACTIVE_PROFILE} in
'rancher')

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

;;
*)

/bin/prometheus_pusher $@

esac

0 comments on commit 5ae9d8f

Please sign in to comment.