jamesoff / simplemonitor

A Python-based network and host monitor
https://simplemonitor.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
404 stars 165 forks source link

Alerts are being sent to numbers after their removal from monitro.ini SMS77 #1407

Closed 3c2b2ff5 closed 3 months ago

3c2b2ff5 commented 3 months ago
# pip3 show simplemonitor
Name: simplemonitor
Version: 1.12.0
Summary: A simple network and host monitor
Home-page: https://github.com/jamesoff/simplemonitor
Author: James Seward
Author-email: james@jamesoff.net
License: BSD-3-Clause
Location: /usr/local/lib/python3.9/dist-packages
Requires: arrow, boto3, colorlog, importlib-metadata, Jinja2, paho-mqtt, paramiko, ping3, psutil, pyaarlo, requests, ring-doorbell, twilio
Required-by:
# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:    11
Codename:   bullseye

Hi James,

simplemonitor is sending Alerts to numbers even after removing them from monitor.ini, another number still in monitor.ini received only one Alert instead of all of them. Is there any cache that needs to be cleared? The Nr. still receiving the Alerts is not in my contacts at SMS77, I checkd the filesystem as well if there is anything related to this specific Nr. Nothing.

Here is the monitor.ini:

[monitor]
interval=120

[reporting]
loggers=logfile
alerters=email,sms77

[sms77]
type=sms77
api_key=my_api_key
target=phone1,phone2,phone3,phone4
limit=3
only_failures=1

[email]
type=email
host=localhost
port=25
from=root@host.domain.net
to=mail1@domain.net;mail2@domain.net
cc=mail3@domain.net
limit=3
only_failures=1

[logfile]
type=logfile
filename=monitor.log
buffered=0
only_failures=1
dateformat=iso8601

Thanks

jamesoff commented 3 months ago

Just making sure I understand right, you had phone5 in the list for the sms77 alerter, and then removed it, and it's still receiving alerts?

How did you reload the configuration after updating the file? SimpleMonitor doesn't automatically reload a modified config file, but will (should :) if you SIGHUP it.

3c2b2ff5 commented 3 months ago

Hi James,

I just removed the Nr. and restarted the systemd unit, but it didn't help. Today I made another test and rebootet the host and it worked. No idea what happend, now it looks fine again. Something was stuck.

Thanks James

jamesoff commented 3 months ago

How odd! Glad you got it resolved, and please let me know if you come across it again :)

3c2b2ff5 commented 3 months ago

Sure thing James. Thank you :)