Skip to content

Commit

Permalink
feat: add notification delay
Browse files Browse the repository at this point in the history
  • Loading branch information
sbgap committed Jun 24, 2024
1 parent 64c09f3 commit 9e8cb53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions config/templates/app/supervisord.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ autostart=true
autorestart=true
redirect_stderr=true

[program:delayNR]
command= bash -c "sleep 10 && alerta notfication_delay"
autostart=true
autorestart=true
redirect_stderr=true

{% if env.HEARTBEAT_SEVERITY -%}
[program:heartbeats]
command=sh -c "sleep 60 && alerta heartbeats --alert --severity {{ env.HEARTBEAT_SEVERITY }}"
Expand Down
5 changes: 2 additions & 3 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [ -n "${ADMIN_USERS}" ]; then
if [ $INIT_LOG = true ]; then echo "# Create admin users."; fi
if [ $INIT_LOG = true ]; then alertad user --all --password "${ADMIN_PASSWORD}" || true; else alertad user --all --password "${ADMIN_PASSWORD}" > /dev/null || true; fi
if [ $INIT_LOG = true ]; then echo "# Create admin API keys."; fi
if [ $INIT_LOG = true ]; then alertad key --all else alertad key --all > /dev/null; fi
if [ $INIT_LOG = true ]; then alertad key --all; else alertad key --all > /dev/null; fi

# Create user-defined API key, if required
if [ -n "${ADMIN_KEY}" ]; then
Expand All @@ -43,7 +43,7 @@ if [ ! -f "${ALERTA_CONF_FILE}" ]; then
# Add API key to client config, if required
if [ "${AUTH_REQUIRED,,}" == "true" ]; then
if [ $INIT_LOG = true ]; then echo "# Auth enabled; add admin API key to client configuration."; fi
HOUSEKEEPING_SCOPES="--scope read --scope write:alerts --scope admin:management"
HOUSEKEEPING_SCOPES="--scope read --scope write:alerts --scope admin:management --scope write:notification_rules"
if grep -qE 'CUSTOMER_VIEWS.*=.*True' ${ALERTA_SVR_CONF_FILE};then
HOUSEKEEPING_SCOPES="--scope admin:alerts ${HOUSEKEEPING_SCOPES}"
fi
Expand Down Expand Up @@ -91,7 +91,6 @@ if [ $INIT_LOG = true ]; then

nginx -v
echo uwsgi $(uwsgi --version)
mongo --version | grep MongoDB
psql --version
python3 --version
/venv/bin/pip list
Expand Down

0 comments on commit 9e8cb53

Please sign in to comment.