Koozali.org: home of the SME Server

Contribs.org Forums => Koozali SME Server 10.x Contribs => Topic started by: nicolatiana on May 16, 2022, 04:13:27 PM

Title: SmeAdmin - Improvement
Post by: nicolatiana on May 16, 2022, 04:13:27 PM
Hard disk (% of utilization) and CPU sensor (load %) and other have a % limit to set or 0 to disable sensor.
When limit is exceeded you receive a message every 5 minutes and there's no way to configure it (or at aleast I've not found a way to do it): this sometimes resolve in a sort of alert mail-bombing.
Title: Re: SmeAdmin - Improvement
Post by: bunkobugsy on May 17, 2022, 07:52:29 PM
and then you go and increase limit value or set 0 to disable specific trigger
status emails default to 5 minutes, but I keep those disabled via 0 setting
but you're right, alert emails don't have a frequency setting
Title: Re: SmeAdmin - Improvement
Post by: ReetP on May 21, 2022, 02:15:35 PM
Once people stop springing surprise visits  on me and taking me sailing & to watch F1, this probably isn't hard to fix?

Probably just a cron job somewhere.
Title: Re: SmeAdmin - Improvement
Post by: Jean-Philippe Pialasse on May 21, 2022, 04:12:48 PM
no cron

the script /usr/bin/smeadmin runs every 5 minutes

there are two kinds of emails

- email status which frequency can be changed

- email alert, sent on every run (every 5 minutes) if triggered.


        # etape 4 : envoi des eventuels mails d'alertes
        mail_alerte();
        mail_status() if ($params{'StatusInterval'} && !($cont % $params{'StatusInterval'}));


probably something like that for the easy way
        # etape 4 : envoi des eventuels mails d'alertes
        mail_alerte()  if ($params{'AlertInterval'} && !($cont % $params{'AlertInterval'}));
        mail_status() if ($params{'StatusInterval'} && !($cont % $params{'StatusInterval'}));

then add the setting StatusInterval to the gui

the better way would be a take a counter of every alert and start the modulus on the time of last alert of this type ( you might want to have the alert at the beginning of the problem, not 1,5 hours latter because you asked to mute for 2 hours
Title: Re: SmeAdmin - Improvement
Post by: nicolatiana on May 27, 2022, 03:50:33 PM
Ok !