[isf-wifidog] gotta change cron/page.php

Max Horváth max.horvath at maxspot.de
Dim 30 Avr 14:28:34 EDT 2006

Hash: SHA1

Sorry for my long absense ...

> the problem is that we're getting of emails from this cron monitor  
> that throws messages every five minutes it seems until the downage  
> is fixed.
> i'd like to use cron/page.php, but i need to make some changes.
> * to send emails to a list
> * not to rely on the node tech officer (since we don't seem to be  
> using that field)
> * not to send repititious email
> * send an email once when a threshold is crossed and then a  
> reminder once a day.
> * send an email when the node comes back up.

We should either add a email-field, where to send emails to - or we  
should use the tech officers email address.

Emails should be sent to the networks administrator and to the  
hotspot owner. The email sent, when a node comes up again should only  
be sent to the networks admin.

> The thresholds I'd define would be
> - down for 5 minutes
> - down for 20 minutes
> - down for 1 hour
> - down for 2 hours
> - down for 12 hours
> then a message after midnight if the node has been down for more  
> than 24 hours.  I'd put the thresholds in config.php.

Why don't we just add a flag where the servers admin can define the  
threshold in minutes? What do we need multiple thresholds for?

> To support this i would need to add some fields to the nodes table,  
> and some functions to nodes.php to support these fields.
> last_paging_event: the threshold that was crossed when the last  
> page/email was sent.  (this field is necessary)
> downtime_start: start of current downtime - copy of last_heartbeat  
> at that time.  (this field is necessary)
> downtime_counter: count of downtimes since downtime_counter_start  
> was set.  (this field is not necessary)
> downtime_counter_start: timestamp of start of downtime_counter.   
> (this field is not necessary)
> Looks like Max wrote cron/page.php.  Am I missing something, or does
>>         } else if ($lastPaged - $last_heartbeat < 60*$minutes) {
> not send an email practically everytime the cron runs, up to 120  
> minutes?

No, I didn't write any of those files inside the cron folder ...

> what do you guys think?  is this a friendly change, or not?  As  
> usual, silence is golden.

It is nice for sure.

I'd even be very happy if we'd have a cron section in the admin area.  
WiFiDog doesn't need to rely on cron as is, cause the routers call  
the WiFiDog auth server all the time (heartbeat signal) ... so we  
could add a very nice cron-like system to the auth server ...

Cheers, Max!

Version: GnuPG v1.4.1 (Darwin)


More information about the WiFiDog mailing list