Re: Monitor a wireless network
Doesn't matter I worked it out.. I think. Testing the attached now. If anyone wants to glance it over it feel free to give feedback. Please excuse my rusty Perl. Regards, Lee #!/usr/bin/perl # # Scan wireless interfaces for available networks. # Requires SSID broadcast is turned on in the AP # # Version 1.00 (10 March 2006) # # Copyright 2002, Lee Sanders <[EMAIL PROTECTED]> # # License: GNU GPL v2, see http://www.gnu.org/copyleft/gpl.html # # Some inspiration is taked from other mon monitors, specifically: # bgp.monitor by Marc Hauswirth, Safe Host SA <[EMAIL PROTECTED]> # fping.monitor by Jim Trocki, [EMAIL PROTECTED] use strict; use warnings; use Getopt::Std; my %opt; getopts ("h:s:T", \%opt); sub usage { print <= 0) { if (!$found) { print "- Scan for SSID $network ---\n"; print "@scan\n"; print "--\n"; exit 1; } } exit 0; ## On Sat, 11 Mar 2006 10:44 pm, Jim Trocki wrote: > On Sat, 11 Mar 2006, Lee Sanders wrote: > > Is that all there is to it, any hints/tips ? > > very close. > > the first line of output from the monitor script is the summary of all > the failures, usually a list of hosts from the hostgroup that failed, > or alternatively some text that would be suitable to be put into the > subject of an email, or something sent to an alphanumeric pager. > > have a look at the slides from the mon talk for some examples: > > ftp://ftp.kernel.org/pub/software/admin/mon/mon-talk-0.4.tar.gz ___ mon mailing list mon@linux.kernel.org http://linux.kernel.org/mailman/listinfo/mon
Re: Monitor a wireless network
On Sat, 11 Mar 2006, Lee Sanders wrote: Is that all there is to it, any hints/tips ? very close. the first line of output from the monitor script is the summary of all the failures, usually a list of hosts from the hostgroup that failed, or alternatively some text that would be suitable to be put into the subject of an email, or something sent to an alphanumeric pager. have a look at the slides from the mon talk for some examples: ftp://ftp.kernel.org/pub/software/admin/mon/mon-talk-0.4.tar.gz ___ mon mailing list mon@linux.kernel.org http://linux.kernel.org/mailman/listinfo/mon
Monitor a wireless network
Hi All, I'm new to mon but its working great monitoring several servers for me already with fping. In the past I have noticed my wireless network stops broadcasting the SSID at times and I would like to detect when this happends (so I can reboot the AP). What I need your help with is with writing a mon monitor script. I haven't seen any information on the input/output required to interact with mon. I believe its as simple as the below but any pointers would be appreciated. If your script exits with state 1 = error If your script exits with state 0 = ok/normal Any information printed before exit is printed in the mon report. So something along the lines of foreach $interface (@ARGV) { do my testing here for each interface passed to the mon script } if (@failures) { print @failures exit 1; } exit 0; Is that all there is to it, any hints/tips ? Regards, Lee p.s. Sorry about the bad pseudo code :) ___ mon mailing list mon@linux.kernel.org http://linux.kernel.org/mailman/listinfo/mon