Feature request: System alert to all Admins more than once per day

sansak

Verified User
Joined
Jun 23, 2007
Messages
51
Feature request: System alert to all Admins more than once per day

Please kindly add the feature to enable Admins to receive system alert messages
(e.g. load check, partition check) more than just once a day. Because sometimes,
we need real time alert which will happen mostly more than once per day.

Thank you.
 
Hello,

Every time a high load is noticed an alert is sent, so alerts about high load can be sent several times during a day, if a High Load is found, that is true at least in my case with the default directadmin. Do you have it the other way?
 
For me, high load alert is sent only once per day except when the high load insists for more than 1 minute (dataskq for the next minute finds
that the load is still more than specified number). Moreover, if on particular day the alert is sent already for example check_partition, there
will be no more alerts during that day. Just like in this forum http://www.directadmin.com/features.php?id=1088
saying that "...Every minute, this feature will check the system load to see if the 1 minute load average is greater than the value set in this option. The default is 10.0.

If the load is greater than 10 when the dataskq runs, an email will be sent to all Admins, at most once per day..."
 
Well maybe, I did not check how much time passed between alerts unfortunately, but really think that I had several alert within one day. Anyway if it's time limited, then it's possible I guess to set load_limit_last_sent to zero:


Code:
# grep load_limit_last_sent /usr/local/directadmin/data/admin/admin.conf
load_limit_last_sent=1364285166

every time after the notification is sent in a script:

/usr/local/directadmin/scripts/custom/load_spike_notice_post.sh

Something like this:

Code:
#!/bin/bash

cat /usr/local/directadmin/data/admin/admin.conf | grep -v ^load_limit_last_sent= > /usr/local/directadmin/data/admin/admin.conf.tmp
cat /usr/local/directadmin/data/admin/admin.conf.tmp > /usr/local/directadmin/data/admin/admin.conf
rm -f /usr/local/directadmin/data/admin/admin.conf.tmp

exit 0;

Note, this possible solution should be checked. Thought the script works if to execute it manually, we should make sure, that it is executed after DA notices a load spike.

Related:
http://www.directadmin.com/features.php?id=1354
 
If you have no /usr/local/directadmin/scripts/custom/load_spike_notice_pre.sh and /usr/local/directadmin/scripts/custom/load_spike_notice_post.sh you should create them if you are going to use.

Please note for the purposes you stated here, you should use /usr/local/directadmin/scripts/custom/load_spike_notice_post.sh

The load_spike_notice_post.sh is called after the message has been sent.
The return value of load_spike_notice_pre.sh will not affect the code.

The question is as the following. Is the script load_spike_notice_post.sh called after the file /usr/local/directadmin/data/admin/admin.conf was modified with a time of last sent or prior to it? So you (we) should check it or wait for John's answer here.
 
Back
Top