Skip to content

Commit

Permalink
removed restriction to allow alertmanager to work in all federation l…
Browse files Browse the repository at this point in the history
…evels
  • Loading branch information
KarineValenca authored and eabili0 committed May 6, 2020
1 parent 409b019 commit 4fb621a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ services:
# - SCRAPE_PATHS=/your-custom-metrics-path
# - SCHEME="https"
- ALERT_MANAGER_URLS=alertmanager:9093
- ALERT_MANAGER_SCHEME=http

bb-promster-2-l2:
image: labbsr0x/bb-promster:latest
Expand Down
4 changes: 1 addition & 3 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,13 @@ if [[ "$CLEAR_RR" == "true" ]]; then
rm /etc/prometheus/rules-ln.yml
fi


sed -i -e 's;$REMOTE_WRITE_URL;'"${REMOTE_WRITE_URL}"';g' "/prometheus.yml.tmpl";

# the user can configure an alertmanager to manage alerts only on level 1 of the federation
if [[ "$ALERT_RULES_FILE" == "" ]]; then
export ALERT_RULES_FILE="/etc/prometheus/alert-rules.yml"
fi

if [[ "$ALERT_MANAGER_URLS" != "" -a "$BB_PROMSTER_LEVEL" == "1" ]]; then
if [[ "$ALERT_MANAGER_URLS" != "" ]]; then
sed -i -e 's;$ALERT_RULES_FILE;'"- $ALERT_RULES_FILE"';g' "/prometheus.yml.tmpl"

cat >> "/prometheus.yml.tmpl" <<- EOM
Expand Down

0 comments on commit 4fb621a

Please sign in to comment.