Skip to content

Instantly share code, notes, and snippets.

@maplebed
Created February 6, 2013 22:14
Show Gist options
  • Save maplebed/4726399 to your computer and use it in GitHub Desktop.
Save maplebed/4726399 to your computer and use it in GitHub Desktop.
def Init_Metric (line, name, tmax, type, units, slope, fmt, desc, handler):
'''Create a metric definition dictionary object for a device.'''
metric_name = line[0] + '-' + name
d = {'name': metric_name.replace('/', '-').lstrip('-'),
'call_back': handler,
'time_max': tmax,
'value_type': type,
'units': units,
'slope': slope,
'format': fmt,
'description': desc,
'groups': 'disk',
'mount': line[1]}
return d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment