Thread Nagios Plugin: check_mozybackup
(3 answers)
Opened by
hund
at 2010-08-26 10:47
User since 2003-08-04
2036
Artikel
BenutzerIn
2010-08-26T08:47:54
hund
sub checkSizeType {
if ( $type ne 'MB' ) {
if ( $type ne 'mb' ) {
if ( $type ne 'GB' ) {
if ( $type ne 'gb' ) {
$np->nagios_die('size can only mb,Mb,gb,GB');
}
}
}
}
}
sub checkSizeType {
if ($type !~ m/^mb$|^gb$/i) {
$np->nagios_die('size can only mb,Mb,gb,GB');
}
}
2010-08-26T08:47:54
hund
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
if ( $type eq 'gb' ) {
$size = ( $size / $GB );
$size = sprintf( "%.2f", $size );
}
if ( $type eq 'GB' ) {
$size = ( $size / $GB );
$size = sprintf( "%.2f", $size );
}
if ( $type eq 'MB' ) {
$size = ( $size / $MB );
$size = sprintf( "%.2f", $size );
}
if ( $type eq $MB ) {
$size = ( $size / $MB );
$size = sprintf( "%.2f", $size );
}
if ( $type =~ m/^gb$/i ) {
$size = sprintf( "%.2f", $size / $GB );
}
if ( $type =~ m/^mb$/i ) {
$size = sprintf( "%.2f", $size / $MB );
}
Last edited: 2010-08-31 15:32:57 +0200 (CEST)
View full thread Nagios Plugin: check_mozybackup
|