diff -ruN nagiosplug-save/plugins-scripts/check_file_age.pl nagiosplug/plugins-scripts/check_file_age.pl
--- nagiosplug-save/plugins-scripts/check_file_age.pl	2003-10-21 16:56:35.000000000 +0100
+++ nagiosplug/plugins-scripts/check_file_age.pl	2004-03-27 22:04:14.000000000 +0000
@@ -1,4 +1,4 @@
-#!/bin/perl -w
+#! /usr/bin/perl -wT
 # $Id: check_file_age.pl,v 1.2 2003/10/21 15:56:35 tonvoon Exp $
 
 # check_file_age.pl Copyright (C) 2003 Steven Grimm <koreth-nagios@midwinter.com>
@@ -22,92 +22,80 @@
 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA
 
+use 5.004;
 use strict;
+use lib utils.pm ;
+use Plugin;
+use Plugin::Parameter qw($helpparameterlist $versionparameterlist $filenameparameter
+			 $verboseparameter);
+
 use English;
-use Getopt::Long;
+
 use File::stat;
-use vars qw($PROGNAME);
-use lib ".";
-use utils qw (%ERRORS &print_revision &support);
 
-sub print_help ();
-sub print_usage ();
+use vars qw($opt_c $opt_f $opt_w $opt_C $opt_W $PROGNAME);
 
-my ($opt_c, $opt_f, $opt_w, $opt_C, $opt_W, $opt_h, $opt_V);
-my ($result, $message, $age, $size, $st);
+use utils qw (%ERRORS &usage);
 
-$PROGNAME="check_file_age";
 
-$opt_w = 240;
-$opt_c = 600;
-$opt_W = 0;
-$opt_C = 0;
-$opt_f = "";
-
-Getopt::Long::Configure('bundling');
-GetOptions(
-	"V"   => \$opt_V, "version"	=> \$opt_V,
-	"h"   => \$opt_h, "help"	=> \$opt_h,
-	"f=s" => \$opt_f, "file"	=> \$opt_f,
-	"w=f" => \$opt_w, "warning-age=f" => \$opt_w,
-	"W=f" => \$opt_W, "warning-size=f" => \$opt_W,
-	"c=f" => \$opt_c, "critical-age=f" => \$opt_c,
-	"C=f" => \$opt_C, "critical-size=f" => \$opt_C);
-
-if ($opt_V) {
-	print_revision($PROGNAME, '$Id: check_file_age.pl,v 1.2 2003/10/21 15:56:35 tonvoon Exp $');
-	exit $ERRORS{'OK'};
-}
+$filenameparameter->name("file");
+$filenameparameter->flags([ 'f', 'file' ]);
+my $agewarningparameter = new Plugin::Parameter(-name => "agewarning", -flags => [ 'w', 'warning-age' ],
+						-optional => "yes", -valueoptional => "no", -type => "INTEGER",
+						-default => 240,
+						-checker => \&Plugin::Parameter::_check_integer,
+						-description => "Number of seconds beyond which the file is too old and a WARNING will be generated");
+my $sizewarningparameter = new Plugin::Parameter(-name => "sizewarning", -flags => [ 'W', 'warning-size' ],
+						 -optional => "yes", -valueoptional => "no", -type => "INTEGER",
+						 -default => 0,
+						 -checker => \&Plugin::Parameter::_check_integer,
+						 -description => "Number of bytes for minimum size of file otherwise a WARNING will be generated");
+my $agecriticalparameter = new Plugin::Parameter(-name => "agecritical", -flags => [ 'c', 'critical-age' ],
+						-optional => "yes", -valueoptional => "no", -type => "INTEGER",
+						-default => 600,
+						-checker => \&Plugin::Parameter::_check_integer,
+						-description => "Number of seconds beyond which the file is too old and a CRITICAL will be generated");
+my $sizecriticalparameter = new Plugin::Parameter(-name => "sizecritical", -flags => [ 'C', 'critical-size' ],
+						 -optional => "yes", -valueoptional => "no", -type => "INTEGER",
+						 -default => 0,
+						 -checker => \&Plugin::Parameter::_check_integer,
+						 -description => "Number of bytes for minimum size of file otherwise a CRITICAL will be generated");
+my @commandparameterlist = ( $filenameparameter,
+			     $agewarningparameter,
+			     $agecriticalparameter,
+			     $sizewarningparameter,
+			     $sizecriticalparameter,
+			     $verboseparameter );
+my $plugin = new Plugin(-revision => '$Revision: 1.2 $',
+			-copyright => "2003 Steven Grimm, 2004 Howard Wilkinson <howard\@cohtech.com>",
+			-shortcomment => "Plugin checks the age and size of a file",
+			-parameterlists => [ \@commandparameterlist, $helpparameterlist, $versionparameterlist ]);
 
-if ($opt_h) {
-	print_help();
-	exit $ERRORS{'OK'};
-}
 
-$opt_f = shift unless ($opt_f);
+$plugin->init();
 
-if (! $opt_f) {
-	print "No file specified\n";
-	exit $ERRORS{'UNKNOWN'};
-}
+my ($result, $message, $age, $size, $st);
+
+$PROGNAME="check_file_age";
 
 # Examine the file.
 unless (-f $opt_f) {
-	print "$opt_f: File not found\n";
-	exit $ERRORS{'UNKNOWN'};
+  print "$PROGNAME UNKNOWN: $opt_f: File not found\n";
+  exit $ERRORS{'UNKNOWN'};
 }
 
 $st = File::stat::stat($opt_f);
 $age = time - $st->mtime;
 $size = $st->size;
 
-
 $result = 'OK';
 
 if (($opt_c and $age > $opt_c) or ($opt_C and $size < $opt_C)) {
-	$result = 'CRITICAL';
+  $result = 'CRITICAL';
 }
 elsif (($opt_w and $age > $opt_w) or ($opt_W and $size < $opt_W)) {
-	$result = 'WARNING';
+  $result = 'WARNING';
 }
 
-print "$result - $opt_f is $age seconds old and $size bytes\n";
+print "$PROGNAME $result: $opt_f is $age seconds old and $size bytes\n";
 exit $ERRORS{$result};
-
-sub print_usage () {
-	print "Usage:\n";
-	print "  $PROGNAME [-w <secs>] [-c <secs>] [-W <size>] [-C <size>] -f <file>\n";
-	print "  $PROGNAME [-h | --help]\n";
-	print "  $PROGNAME [-V | --version]\n";
-}
-
-sub print_help () {
-	print_revision($PROGNAME, '$Id: check_file_age.pl,v 1.2 2003/10/21 15:56:35 tonvoon Exp $');
-	print "Copyright (c) 2003 Steven Grimm\n\n";
-	print_usage();
-	print "\n";
-	print "  <secs>  File must be no more than this many seconds old\n";
-	print "  <size>  File must be at least this many bytes long\n";
-	print "\n";
-	support();
-}
