Pay attention to settings.probe.failure parameter. When failure=1 (as default value), all goes well. But if I change this parameter to 2 (3, 4... or other) Notifications are not sent.
some example of logs
INFO[2024-05-21T17:18:45+03:00] Channel: __EaseProbe_Channel__
INFO[2024-05-21T17:18:45+03:00] Probers:
INFO[2024-05-21T17:18:45+03:00] - tcp: my python server
INFO[2024-05-21T17:18:45+03:00] Notifiers:
INFO[2024-05-21T17:18:45+03:00] - teams: Teams notify
INFO[2024-05-21T17:18:45+03:00] Ready to monitor(tcp): my python server - 127.0.0.1:8001
INFO[2024-05-21T17:18:45+03:00] Scheduling daily SLA reports at 00:00 UTC time...
INFO[2024-05-21T17:18:45+03:00] The SLA report will be schedule at 22000-05-05 00:00:00
ERRO[2024-05-21T17:18:45+03:00] [tcp / my python server] error: dial tcp 127.0.0.1:8001: connect: connection refused
INFO[2024-05-21T17:18:45+03:00] [tcp / my python server] - Status unchanged [init]! Threshold is not reached for failure [1/2].
ERRO[2024-05-21T17:19:00+03:00] [tcp / my python server] error: dial tcp 127.0.0.1:8001: connect: connection refused
INFO[2024-05-21T17:19:00+03:00] [tcp / my python server] - Status is DOWN! Threshold reached for failure [2/2]
ERRO[2024-05-21T17:19:15+03:00] [tcp / my python server] error: dial tcp 127.0.0.1:8001: connect: connection refused
and that's all, "Threshold reached for failure [2/2]", but notification not sent
To Reproduce
Steps to reproduce the behavior:
Go to 'easeprobe/cmd'
Create config.yaml like in my case
Run command go run ./easeprobe -f config.yaml
See error
Expected behavior
What I expect?
Change in the config.yaml settings.probe.failure: 1
Run prober
Get logs like this
INFO[2024-05-21T17:36:17+03:00] Channel: __EaseProbe_Channel__
INFO[2024-05-21T17:36:17+03:00] Probers:
INFO[2024-05-21T17:36:17+03:00] - tcp: my python server
INFO[2024-05-21T17:36:17+03:00] Notifiers:
INFO[2024-05-21T17:36:17+03:00] - teams: Teams notify
INFO[2024-05-21T17:36:17+03:00] Ready to monitor(tcp): my python server - 127.0.0.1:8001
INFO[2024-05-21T17:36:17+03:00] Scheduling daily SLA reports at 00:00 UTC time...
INFO[2024-05-21T17:36:17+03:00] The SLA report will be schedule at 22005-05-05 00:00:00
ERRO[2024-05-21T17:36:17+03:00] [tcp / my python server] error: dial tcp 127.0.0.1:8001: connect: connection refused
INFO[2024-05-21T17:36:17+03:00] [tcp / my python server] - Status is DOWN! Threshold reached for failure [1/1]
INFO[2024-05-21T17:36:17+03:00] [channel / __EaseProbe_Channel__]: my python server (127.0.0.1:8001) - Status changed [init] ==> [down], sending notification...
INFO[2024-05-21T17:36:17+03:00] [teams / Teams notify / Notification] - my python server Failure - successfully sent!
I want to get notification successfully sent! not only with failure = 1, but with other values too (for example 2, 3, 4...)
Environment (please complete the following information):
Describe the bug I have such config for my prober
Pay attention to
settings.probe.failure
parameter. Whenfailure=1
(as default value), all goes well. But if I change this parameter to 2 (3, 4... or other) Notifications are not sent. some example of logsand that's all, "Threshold reached for failure [2/2]", but notification not sent
To Reproduce Steps to reproduce the behavior:
config.yaml
like in my casego run ./easeprobe -f config.yaml
Expected behavior What I expect?
settings.probe.failure: 1
I want to get
notification successfully sent!
not only withfailure = 1
, but with other values too (for example 2, 3, 4...)