equal
deleted
inserted
replaced
41 DEPENDENT => 4 |
41 DEPENDENT => 4 |
42 ); |
42 ); |
43 |
43 |
44 my $ME = basename $0; |
44 my $ME = basename $0; |
45 my $NAME = "Z-PUSH"; |
45 my $NAME = "Z-PUSH"; |
46 my $VERSION = "0.2"; |
46 my $VERSION = "0.3"; |
47 |
47 |
48 my %opt = ( |
48 my %opt = ( |
49 url => "http://developer.berlios.de/project/showfiles.php?group_id=8963", |
49 url => "http://z-push.sourceforge.net/soswp/index.php?pages_id=39&t=Download", |
50 file => "/var/www/z-push/version.php" |
50 file => "/var/www/z-push/version.php" |
51 ); |
51 ); |
52 |
52 |
53 MAIN: { |
53 MAIN: { |
54 Getopt::Long::Configure('bundling'); |
54 Getopt::Long::Configure('bundling'); |
107 return "can't get $url" if ( !$side ); |
107 return "can't get $url" if ( !$side ); |
108 |
108 |
109 push @webside, split( "\n", $side ); |
109 push @webside, split( "\n", $side ); |
110 my $zpb = undef; |
110 my $zpb = undef; |
111 foreach (@webside) { |
111 foreach (@webside) { |
112 if ( $zpb || m|<h3>Z-Push Backend</h3>| ) { |
112 /z-push-(?<version>[\d.-]+).tar.gz"/ and return $+{version}; |
113 $zpb = 1; |
|
114 m|<h3>Z-Push Backend/older releases</h3>| and last; |
|
115 m|>z-push-(?<version>[\d.-]+).tar.gz<| and return $+{version}; |
|
116 } |
|
117 } |
113 } |
118 |
114 |
119 say "$NAME CRITICAL: Can't find last version." and exit $ERRORS{CRITICAL}; |
115 say "$NAME CRITICAL: Can't find last version." and exit $ERRORS{CRITICAL}; |
120 } |
116 } |
121 |
117 |
154 |
150 |
155 =over |
151 =over |
156 |
152 |
157 =item B<-u>|B<--url> |
153 =item B<-u>|B<--url> |
158 |
154 |
159 Download I<url> with z-push release information. (default: http://developer.berlios.de/project/showfiles.php?group_id=8963) |
155 Download I<url> with z-push release information. (default: http://z-push.sourceforge.net/soswp/index.php?pages_id=39&t=Download) |
160 |
156 |
161 =item B<-f>|B<--file> |
157 =item B<-f>|B<--file> |
162 |
158 |
163 Local z-push version file. (default: /var/www/z-push/version.php) |
159 Local z-push version file. (default: /var/www/z-push/version.php) |
164 |
160 |
180 |
176 |
181 This nagios plugin search on a specified I<url> for a new version of z-push and compare the search result with an installed version. |
177 This nagios plugin search on a specified I<url> for a new version of z-push and compare the search result with an installed version. |
182 |
178 |
183 =head1 VERSION |
179 =head1 VERSION |
184 |
180 |
185 This man page is current for version 0.2 of B<check_zpush>. |
181 This man page is current for version 0.3 of B<check_zpush>. |
186 |
182 |
187 =head1 AUTHOR |
183 =head1 AUTHOR |
188 |
184 |
189 Written by Christian Arnold L<arnold@schlittermann.de> |
185 Written by Christian Arnold L<arnold@schlittermann.de> |
190 |
186 |