-
I wanted to set up an alert triggered by a failed monitor. Thinking I understood the docs correctly I set up
# general
[monitor]
interval=60
remote=1
remote_port=9999
key=XX
[reporting]
loggers=db,file,status,json_full
alerters=ntfy.sh,ntfy.swtk.eu
; (...)
# alerters
[ntfy.swtk.eu]
type=ntfy
priority=default
token=X
server=https://ntfy.swtk.eu
topic=simplemonitor
icon_prefix=true
groups=ntfy.swtk.eu
[ntfy.sh]
type=ntfy
priority=default
token=X
server=https://ntfy.swtk.eu
topic=simplemonitor
icon_prefix=true
groups=ntfy.sh My understanding of the above was: the alerters that are defined are I then attached monitors to the alerts in [defaults]
tolerance=2
group=ntfy.swtk.eu
; via TCP
[PING router]
type=tcp
host=ext.swtk.eu
; this port is available
port=X
; external notified because mine is off if this is down
group=ntfy.sh
[APP → pihole]
type=http
url=https://pihole.swtk.eu?simplemonitor=X
depend=APP → authelia
# tests
[test-fail-ntfy.sh]
type=fail
group=ntfy.sh
[test-fail-ntfy.swtk.eu]
type=fail
group=ntfy.swtk.eu My understanding from this minimal
After running
I have a hard time parsing the reason for the failures (the message after "group mismatch") in the context of my configuration |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
It looks like |
Beta Was this translation helpful? Give feedback.
The logging isn't great here I think as it omits the name of the alerter, so the only way to tell the alerters apart in the log output is by their groups.
The alerting loop just runs each alerter in turn, and tries to alert each failed monitor with them.
What the log lines you have there are saying is that the first two monitors (in the log) are set to be in the
ntfy.sh
group, and the third is in thentfy.swtk.eu
group, which I think is right from your config snippet. Thealerter:
bit at the end of the line gives the groups the alerter is a member of, and the message appears when the former is not in the latter, so I think the logic is working right. (Although the format of the message is…