Skip to content

Commit

Permalink
removing alerting part before adding
Browse files Browse the repository at this point in the history
  • Loading branch information
KarineValenca authored and eabili0 committed Sep 15, 2020
1 parent e748134 commit 7d77181
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fi

if [[ "$ALERT_MANAGER_URLS" != "" ]]; then
sed -i -e 's;$ALERT_RULES_FILE;'"- $ALERT_RULES_FILE"';g' "/prometheus.yml.tmpl"
if ! grep -q alerting: "/prometheus.yml.tmpl"; then
sed -i "/alerting/,/ - targets: ['$ALERT_MANAGER_URLS']/d" "/prometheus.yml.tmpl"
cat >> "/prometheus.yml.tmpl" <<- EOM
alerting:
Expand All @@ -95,7 +95,7 @@ alerting:
static_configs:
- targets: ['$ALERT_MANAGER_URLS']
EOM
fi

else
sed -i -e 's/$ALERT_RULES_FILE/'""'/g' "/prometheus.yml.tmpl"
fi
Expand Down

0 comments on commit 7d77181

Please sign in to comment.