CHARTS = {
'cache': {
- 'options': [None, 'Cache Size', 'kilobytes', 'Cache', 'memcached.cache', 'line'],
+ 'options': [None, 'Cache Size', 'kilobytes', 'Cache', 'memcached.cache', 'stacked'],
'lines': [
- ['bytes', 'used', 'absolute', 1, 1024],
- ['limit_maxbytes', 'total', 'absolute', 1, 1024]
+ ['bytes', 'used', 'absolute', 1, 1048576],
+ ['available', 'available', 'absolute', 1, 1048576]
]},
'net': {
'options': [None, 'Network', 'kilobytes/s', 'Network', 'memcached.net', 'line'],
except:
data['hit_rate'] = 0
+ try:
+ data['available'] = int(data['limit_maxbytes']) - int(data['bytes'])
+ except:
+ pass
+
if len(data) == 0:
self.error("received data doesn't have needed records")
return None