summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3d3d53f)
raw | patch | inline | side by side (parent: 3d3d53f)
author | Stanley Hopcroft <stanleyhopcroft@users.sourceforge.net> | |
Thu, 25 Nov 2004 04:46:16 +0000 (04:46 +0000) | ||
committer | Stanley Hopcroft <stanleyhopcroft@users.sourceforge.net> | |
Thu, 25 Nov 2004 04:46:16 +0000 (04:46 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@940 f882894a-f735-0410-b71e-b25c423dba1c
contrib/check_wins.pl | patch | blob | history |
diff --git a/contrib/check_wins.pl b/contrib/check_wins.pl
index 9ea7c45dd9286dd1798155817985fea6fab02a1a..0d11737f3054efdd9d03c74a98530760d18538ca 100755 (executable)
--- a/contrib/check_wins.pl
+++ b/contrib/check_wins.pl
# $Id$
# $Log$
+# Revision 1.3 2004/11/25 04:46:16 stanleyhopcroft
+# Non functional tidy ups to check_wins
+#
# Revision 1.2 2003/08/20 08:31:49 tonvoon
# Changed netsaint to nagios in use lib
#
use constant SAMBA_DEBUG_LVL => 2 ;
use constant MY_DCS => ('dc1','dc2') ;
-# use constant MY_DCS => qw(ipa01 ipa02 ipa03) ;
my $NMBLOOKUP_PATH = '/usr/bin/nmblookup' ;
my $NMBLOOKUP = sub { return `$NMBLOOKUP_PATH $_[2] -R -U $_[0] $_[1]` } ;
my (@dc_query) ;
# tsitc> /usr/local/samba/bin/nmblookup -R -U wins ipa01
-# Sending queries to 10.0.100.29
-# 10.0.100.16 ipa01<00>
+# Sending queries to 192.168.1.29
+# 192.168.1.16 ipa01<00>
eval {
alarm($TIMEOUT) ;
exit $ERRORS{"CRITICAL"} ;
}
-# the results of looking up the DCs (by their name) in the WINS
+=begin comment
+
+the results of looking up the DCs (by their name) in the WINS
+
+192.168.1.16 ipa01<20>
+192.168.1.1 ipa02<20>
+192.168.1.104 ipa03<20>
+
+=end comment
-# 10.0.100.16 ipa01<20>
-# 10.0.100.1 ipa02<20>
-# 10.0.100.104 ipa03<20>
+=cut
@dc_addresses = () ;
foreach (@dc_query) {
chomp @dcs_of_domain ;
@addr_dcs_of_domain = map /^(\S+)/, @dcs_of_domain ;
-# tsitc> /usr/local/samba/bin/nmblookup -R -U wins ipaustralia#1c
-# Sending queries to 10.0.100.29
-# 10.0.100.114 ipaustralia<1c>
-# 168.168.102.129 ipaustralia<1c>
-# 192.168.101.221 ipaustralia<1c>
-# 10.0.100.61 ipaustralia<1c>
-# 192.168.108.129 ipaustralia<1c>
-# 192.168.102.128 ipaustralia<1c>
-# 10.0.4.126 ipaustralia<1c>
-# 192.168.106.214 ipaustralia<1c>
-# 10.0.3.165 ipaustralia<1c>
-# 192.168.105.214 ipaustralia<1c>
-# 10.0.6.145 ipaustralia<1c>
-# 192.168.104.128 ipaustralia<1c>
-# 10.0.4.59 ipaustralia<1c>
-# 10.9.99.99 ipaustralia<1c>
-# 10.99.99.99 ipaustralia<1c>
-# 10.9.99.254 ipaustralia<1c>
-# 10.0.3.15 ipaustralia<1c>
-# 192.168.102.129 ipaustralia<1c>
-# 192.168.103.129 ipaustralia<1c>
-# 192.168.105.129 ipaustralia<1c>
-# 192.168.106.129 ipaustralia<1c>
-# 192.168.101.129 ipaustralia<1c>
-# 192.168.104.129 ipaustralia<1c>
-# 10.0.3.123 ipaustralia<1c>
-# 10.0.100.67 ipaustralia<1c>
-# tsitc>
+=begin comment
+
+tsitc> /usr/local/samba/bin/nmblookup -R -U wins ipaustralia#1c
+Sending queries to 192.168.1.29
+192.168.1.114 ipaustralia<1c>
+192.168.1.221 ipaustralia<1c>
+192.168.1.61 ipaustralia<1c>
+192.168.1.129 ipaustralia<1c>
+192.168.1.128 ipaustralia<1c>
+192.168.1.214 ipaustralia<1c>
+192.168.1.67 ipaustralia<1c>
+tsitc>
+
+=end comment
+
+=cut
+
my %x ;
@found_dcs = grep { ! $x{$_}++ } @address2dc{ grep exists $address2dc{$_}, @addr_dcs_of_domain} ;