third-party-ci-tools/monitoring/nagios/checks/utils.py
Patrick East 1bb3df6c6e Add some Nagios check scripts for some services involved with CI systems
These can be set up for nrpe or ssh checks on jenkins master nodes and
cover a few basic checks like:

- Ensuring a nodepool image age is not greater than some threshold
- Checking a specific job is registered in gearman
- Checking the health score for a specific jenkins job

All of these have tons of room for improvement and are just barebones
check scripts (closer to idiot checks) but can help detect some
common problems with 3rd party ci systems.

Change-Id: Ic6fbcfbdbf577646ebebf133b492f35535f37b00
2015-05-11 13:46:52 -07:00

8 lines
196 B
Python

import subprocess
def run_command_local(command):
try:
return subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT)
except Exception, e:
return e.message