Koozali.org: home of the SME Server

SmeAdmin - Improvement

Offline nicolatiana

  • *
  • 710
  • +0/-0
SmeAdmin - Improvement
« 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.
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia.

Offline bunkobugsy

  • *
  • 194
  • +0/-0
Re: SmeAdmin - Improvement
« Reply #1 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

Offline ReetP

  • *
  • 3,328
  • +5/-0
Re: SmeAdmin - Improvement
« Reply #2 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.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Jean-Philippe Pialasse

  • *
  • 2,274
  • +8/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: SmeAdmin - Improvement
« Reply #3 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
« Last Edit: May 21, 2022, 04:14:30 PM by Jean-Philippe Pialasse »

Offline nicolatiana

  • *
  • 710
  • +0/-0
Re: SmeAdmin - Improvement
« Reply #4 on: May 27, 2022, 03:50:33 PM »
Ok !
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia.