Hello, I am working on a project where I can test our internet connection (a
few ping tests to various servers).  I welcome any suggestions someone might
have regarding the design of this project.

I have the results being written to variables currently (which is fine for
the local machine, but I would like to be able to write this information to
a mysql DB, as I have other hosts which need to get information from these
scripts.  I can scp or sftp in and pickup the results files, but I was
looking for a little more centralized way of posting the results for the
boss to be able to "watch" the results in real time via a local web page.

Currently, I have a script running to
count1=$(ping -c $count $pihostin | grep 'received' | awk -F',' '{ print $2
}' | awk '{ print $1 }' )

if [ $count1 -eq 0 ]; then
     echo  100% failure on $pihostin time-dns or time might be down
fi


Ultimately, I am trying to create a fail over system which I can still ping
out to the internet via the pf sense WAN interface but disable the internal
LAN so my failover will switch on the internal router to use the Failover
route (2nd pf sense system).  This way, I can switch it on my schedule.
WAN1 faster but less stable than WAN2. But, if WAN1 goes down, switch to
WAN2 until midnight then when everyone is off the system, switch back to
WAN1 (so as not to disturb users).

If I can't post the results to a DB, I will need to disable the local LAN
using Scott's php script from the archives.

<?php

require("functions.inc");
require("config.inc");

/* to get the wan interface, use this: */
$if = get_real_wan_interface();

/* *OR* to get the LAN interface, use this:
$if = convert_friendly_interface_to_real_interface_name("LAN");

/* echo out the interface that we found for this assignment */
echo $if;


/* or you could do something like this:
exec("/sbin/ifconfig {$if} down");
*/

?>

-- 
Heath Henderson
[EMAIL PROTECTED]
1800 288 7750
--



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to