Thread Nagios Plugin: check_mozybackup (3 answers)
Opened by hund at 2010-08-26 10:47

renee
 2010-08-31 16:22
#141074 #141074
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Oder:
Code (perl): (dl )
1
2
3
4
5
6
sub checkSizeType {
   my $check = lc $type;
   if ( $check ne 'gb' and $check ne 'mb' ) {
      $np->nagios_die('size can only mb,Mb,gb,GB');
   }
}


und

Code (perl): (dl )
1
2
3
4
5
6
my $check = lc $type;

my $div = $MB;
$div    = $GB if $check eq 'gb';

$size = sprintf "%.2f", $size / $div;

Last edited: 2010-08-31 16:25:17 +0200 (CEST)
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread Nagios Plugin: check_mozybackup