projects
/
mirror
/
dsa-nagios.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ftc -> ftcollins
[mirror/dsa-nagios.git]
/
dsa-nagios-checks
/
checks
/
dsa-check-raid-megaraid
diff --git
a/dsa-nagios-checks/checks/dsa-check-raid-megaraid
b/dsa-nagios-checks/checks/dsa-check-raid-megaraid
index
b7e69a2
..
e09f7b8
100755
(executable)
--- a/
dsa-nagios-checks/checks/dsa-check-raid-megaraid
+++ b/
dsa-nagios-checks/checks/dsa-check-raid-megaraid
@@
-38,7
+38,7
@@
CRITICAL = 2
UNKNOWN = 3
SRCDIR = os.path.dirname(sys.argv[0])
UNKNOWN = 3
SRCDIR = os.path.dirname(sys.argv[0])
-BIN =
SRCDIR + "/megarc.bin
"
+BIN =
"/usr/local/bin/megarc
"
MEGADEV = "/dev/megadev0"
MEGADEV = "/dev/megadev0"
@@
-97,9
+97,6
@@
def make_megadev(devicenode):
end(UNKNOWN, "Error making '%s' device node - %s" % (devicenode, error))
end(UNKNOWN, "Error making '%s' device node - %s" % (devicenode, error))
-if os.geteuid() != 0:
- end(UNKNOWN, "You must be root to run this plugin")
-
if not os.path.exists(BIN):
end(UNKNOWN, "Lsi MegaRaid utility '%s' was not found" % BIN)
if not os.path.exists(BIN):
end(UNKNOWN, "Lsi MegaRaid utility '%s' was not found" % BIN)
@@
-118,7
+115,7
@@
def run(args):
print "UNKNOWN: internal python error",
print "- no cmd supplied for Lsi MegaRaid utility"
sys.exit(UNKNOWN)
print "UNKNOWN: internal python error",
print "- no cmd supplied for Lsi MegaRaid utility"
sys.exit(UNKNOWN)
- cmd = "%s %s -nolog" % (BIN, args)
+ cmd = "
sudo
%s %s -nolog" % (BIN, args)
result, output = commands.getstatusoutput(cmd)
lines = output.split("\n")
if result != 0:
result, output = commands.getstatusoutput(cmd)
lines = output.split("\n")
if result != 0: