@moix do you need the wsgi file? How were you using it? copying it to where you need it or were you referencing it where it was?
sorry missed that message, I'm using from service that runs uwsgi:
ExecStart=/alertaio/venv/bin/uwsgi --ini alerta.ini
and in alerta.ini:
## managed by puppet ## [uwsgi] chdir = /alertaio/app mount = /api=./app.wsgi callable = app manage-script-name = true
@satterly hey Nick! Hope you're doing great. I started on some project for an email to alerta integration. I've managed to send some alerts into alerta from email. But I'd like to start this script on startup right after my container comes alive. Do you have any suggestions to achieve tht? I've tried docker compose's command function but it breaks the container and webui doesn't start actually.
You can check out the forked repo of alerta on here if you'd like to:
Does someone know how to configure Heartbeats with prometheus
@FL3SH add the following two lines to alerta config:
PLUGINS=['prometheus','heartbeat'] HEARTBEAT_EVENTS=['Heartbeat', 'Watchdog']
you would probably want to set timeout label in alert relabel config
- source_labels: [alertname] target_label: timeout regex: 'Watchdog' replacement: '120'
and set repeat_interval in alertmanager config
- match: alertname: Watchdog group_wait: 0s group_interval: 1m repeat_interval: 50s receiver: alerta
that's what I did.
The only issue is that when heartbeat status is NOT ok, the alert's environment is set to default value of 'Production'. The environment label of Watchdog alert is not honored. Seems like a bug @satterly
OK I've found out how to autostart my application inside docker. I used supervisored.conf and added the command there. Also if anyone would like to contribute feel free to do so :
$ alerta delete Deleting all alerts. Do you want to continue? [y/N]:
$ alerta delete --help Usage: alerta delete [OPTIONS] Delete alerts. Options: -i, --ids UUID List of alert IDs (can use short 8-char id) -q, --query QUERY severity:"warning" AND resource:web -f, --filter FILTER KEY=VALUE eg. serverity=warning resource=web -h, --help Show this message and exit.