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

Benoit Grégoire bock at step.polymtl.ca
Dim 30 Avr 23:12:10 EDT 2006

On April 30, 2006 01:33 pm, Rob Janes wrote:
> 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

A patch to send all status messages for the entire network to one or more 
monitoring emails configured in network properties would be great.  This 
would off course be in adition to each node's technical officer(s). 

> * not to rely on the node tech officer (since we don't seem to be using
> that field)

That's the main reason that field exists, and is the start of a much more 
extensive system of monitoring/tech support.  It's not going away anytime 

> * not to send repititious email
> * send an email once when a threshold is crossed and then a reminder
> once a day.

That's already the system works, it's just that the tresholds are not long 
enough for your liking.

> * send an email when the node comes back up.

That's a good idea.

> 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.

The system already uses such a treshold system, but they are not easily 
configurable.  They should go in the network (ideally) or server (much less 
desreable) configuration page.  These should not go in config.php (Just about 
nothing should go in config.php now that we have network and server database 

> 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)

You don't need any of that.  All the math to do it directly is already in 

> 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 it does not.

> what do you guys think?  is this a friendly change, or not?  As usual,
> silence is golden.
> fyi, i did try getting on the irc channel but nobody was listening.
> lights on, nobody home.

Everyone from Montreal were at an ISF training meeting.

Benoit Grégoire, http://benoitg.coeus.ca/
-------------- section suivante --------------
Une pièce jointe non texte a été nettoyée...
Nom: non disponible
Type: application/pgp-signature
Taille: 191 octets
Desc: non disponible
Url: http://listes.ilesansfil.org/pipermail/wifidog/attachments/20060430/3efab43b/attachment.pgp

More information about the WiFiDog mailing list