Skip to content

Commit

Permalink
varnish plugin bugfix (#4228)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyam8 authored and ktsaou committed Sep 19, 2018
1 parent 5271e5b commit e2097ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python.d/varnish.chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,9 @@ def get_data(self):

data.update(dict((param, value) for _, param, value in server_stats))

data['memory_allocated'] = data['s0.g_bytes']
data['memory_free'] = data['s0.g_space']
# varnish 5 uses default.g_bytes and default.g_space
data['memory_allocated'] = data.get('s0.g_bytes') or data.get('default.g_bytes')
data['memory_free'] = data.get('s0.g_space') or data.get('default.g_space')

return data

Expand Down

0 comments on commit e2097ea

Please sign in to comment.