Skip to content
Snippets Groups Projects
Commit a288ef90 authored by Chris Hines's avatar Chris Hines
Browse files

Merge branch 'nagios_slurmctld' into 'master'

nagios script for slurmctld

See merge request !132
parents 7f2582b8 bf7146ab
No related branches found
No related tags found
1 merge request!132nagios script for slurmctld
#!/usr/bin/python
import sys, os, pwd
import getopt
import commands
import subprocess
STATE_OK=0
STATE_WARNING=1
check_slurmctld=subprocess.Popen(["/sbin/service","slurmctld","status"], shell=False, stdout=subprocess.PIPE)
slurmctld_status=check_slurmctld.communicate()[0]
if "run" in slurmctld_status:
print "Slurmctld is Running"
sys.exit(STATE_OK)
else:
print "Slurmctld is NOT Running !!"
sys.exit(STATE_WARNING)
sys.exit(STATE_OK)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment