#!/usr/bin/perl use strict; my $moebius = "/home/jsipek/Copy/linrel_x86_64-superlowmem/moebius.admin"; my $output = `$moebius -s /var/run/moebius/moebius.sock df -c | tail -1`; if ( ($? >> 8) == 0 ) { print "CRITICAL: moebius.admin failed to run.\n"; exit(2); } my @info = split(/,/, $output); my $status = $info[6]; my $usedspace = $info[3]; if ( $status != "ONLINE" ) { print "WARNING: moebius file system status: $status\n"; exit(1); } if ( $usedspace >= 90 ) { print "CRITICAL: moebius $usedspace% full.\n"; exit(2); } elsif ( $usedspace >= 80 ) { print "WARNING: moebius $usedspace% full.\n"; exit(1); } print "OK: Moebius checks passed.\n"; exit(0);