Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-team
HPCasCode
Commits
a288ef90
Commit
a288ef90
authored
7 years ago
by
Chris Hines
Browse files
Options
Downloads
Plain Diff
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
!132
nagios script for slurmctld
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/nagios_monitored/files/scripts/check_slurmctld
+23
-0
23 additions, 0 deletions
roles/nagios_monitored/files/scripts/check_slurmctld
with
23 additions
and
0 deletions
roles/nagios_monitored/files/scripts/check_slurmctld
0 → 100755
+
23
−
0
View file @
a288ef90
#!/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
)
This diff is collapsed.
Click to expand it.
Chris Hines
@chines
mentioned in commit
2e0c76fc
·
4 years ago
mentioned in commit
2e0c76fc
mentioned in commit 2e0c76fca4bacad17c1dfdb471d6bd50006ca9ee
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment