Changeset - a6296517aa0d
[Not reviewed]
0 1 0
HanzZ - 13 years ago 2013-02-01 11:38:39
hanzz.k@gmail.com
Fixed jids option in munin plugin
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
munin/spectrum2_
Show inline comments
 
@@ -88,25 +88,25 @@ def handle_field( string ):
 
	for regexp in [ '^[^A-Za-z_]', '[^A-Za-z0-9_]' ]:
 
		string = re.compile( regexp ).sub( '_', string )
 
	return string
 

	
 
# get runtime variables
 
suffix = sys.argv[0].partition('_')[2]
 
verbose = os.environ.get( 'verbose' )
 

	
 
jids = []
 

	
 
base = os.environ.get( 'base', '/etc/spectrum' )
 
if 'jids' in os.environ.keys():
 
	jids = os.environ.get( 'cfgs' ).split(',')
 
	jids = os.environ.get( 'jids' ).split(',')
 
else:
 
	proc = Popen(['spectrum2_manager', 'list'], stdout=PIPE, stderr=PIPE)
 
	out, err = proc.communicate()
 
	jids = out.split('\n')[:-1]
 

	
 
# set variables based on wildcard 
 
if suffix == 'uptime':
 
	stat = { 'uptime': None }
 
	title = "Uptime"
 
	vlabel = "days"
 
	info = ''
 
	transformer = lambda value: float(value)/60.0/60.0/24.0
0 comments (0 inline, 0 general)