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.
Successfully installed alerta-urlmon-3.3.0 alerta@a0a27ce0f1b2:/urlmon$ alerta-urlmon Traceback (most recent call last): File "/venv/bin/alerta-urlmon", line 11, in <module> load_entry_point('alerta-urlmon==3.3.0', 'console_scripts', 'alerta-urlmon')() File "/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 490, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2853, in load_entry_point return ep.load() File "/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2453, in load return self.resolve() File "/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2459, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/venv/lib/python3.7/site-packages/urlmon.py", line 54, in <module> import settings
Hi, quick question: I'm running docker 7.5.5 set up with Prometheus / Alertmanager, all working, all good!
I noticed that there are some nightly incoming alerts that make it all the way through to Alerta and after a while get cleared automatically by alertmanager so all good.
I can't seem to find them anymore using the alerta frontend after a while? Is this the housekeeping that removes them? Checking the About page I do see count alerts etc but there's nothing anymore.
If so, how can I increase the housekeeping parameter to, let's say, keep everything for 1 month?