summaryrefslogtreecommitdiffstats
path: root/collectors
diff options
context:
space:
mode:
authorErnesto J. Perez Garcia <ernestojpg@gmail.com>2020-12-04 00:24:21 +0100
committerGitHub <noreply@github.com>2020-12-04 02:24:21 +0300
commit9a52c6a71e996a31722c81a8d2ae882d490fe04e (patch)
tree4cb31871d29cf59926d72c344e84a133d2e813b0 /collectors
parentb3e2bb1b9bdfd27ae766d95a48857e1313c1f382 (diff)
Added support for MSE (Massive Storage Engine) in Varnish-Plus (#10317)
Diffstat (limited to 'collectors')
-rw-r--r--collectors/python.d.plugin/varnish/README.md7
-rw-r--r--collectors/python.d.plugin/varnish/varnish.chart.py18
2 files changed, 16 insertions, 9 deletions
diff --git a/collectors/python.d.plugin/varnish/README.md b/collectors/python.d.plugin/varnish/README.md
index 87c1c1e0f6..a052525cf2 100644
--- a/collectors/python.d.plugin/varnish/README.md
+++ b/collectors/python.d.plugin/varnish/README.md
@@ -6,8 +6,9 @@ sidebar_label: "Varnish Cache"
# Varnish Cache monitoring with Netdata
-Provides HTTP accelerator global, backends (VBE) and disks (SMF) statistics using `varnishstat` tool.
+Provides HTTP accelerator global, Backends (VBE) and Storages (SMF, SMA, MSE) statistics using `varnishstat` tool.
+Note that both, Varnish-Cache (free and open source) and Varnish-Plus (Commercial/Enterprise version), are supported.
## Requirements
@@ -36,9 +37,9 @@ For every backend (VBE):
- Backend Response Statistics in `kilobits/s`
-For every disk (SMF):
+For every storage (SMF, SMA, or MSE):
-- Disk Usage in `KiB`
+- Storage Usage in `KiB`
## Configuration
diff --git a/collectors/python.d.plugin/varnish/varnish.chart.py b/collectors/python.d.plugin/varnish/varnish.chart.py
index afc6010bc5..ce7e42c674 100644
--- a/collectors/python.d.plugin/varnish/varnish.chart.py
+++ b/collectors/python.d.plugin/varnish/varnish.chart.py
@@ -227,7 +227,7 @@ class Service(ExecutableService):
self.parser = Parser()
self.command = None
self.collected_vbe = set()
- self.collected_smf_sma = set()
+ self.collected_storages = set()
def create_command(self):
varnishstat = find_binary(VARNISHSTAT)
@@ -298,7 +298,7 @@ class Service(ExecutableService):
data.update(stats)
self.get_vbe_backends(data, raw)
- self.get_smf_sma_storages(server_stats)
+ self.get_storages(server_stats)
# varnish 5 uses default.g_bytes and default.g_space
data['memory_allocated'] = data.get('s0.g_bytes') or data.get('default.g_bytes')
@@ -320,7 +320,13 @@ class Service(ExecutableService):
self.collected_vbe.add(name)
self.add_backend_charts(name)
- def get_smf_sma_storages(self, server_stats):
+ def get_storages(self, server_stats):
+ # Storage types:
+ # - SMF: File Storage
+ # - SMA: Malloc Storage
+ # - MSE: Massive Storage Engine (Varnish-Plus only)
+ #
+ # Stats example:
# [('SMF.', 'ssdStorage.c_req', '47686'),
# ('SMF.', 'ssdStorage.c_fail', '0'),
# ('SMF.', 'ssdStorage.c_bytes', '668102656'),
@@ -331,14 +337,14 @@ class Service(ExecutableService):
# ('SMF.', 'ssdStorage.g_smf', '40130'),
# ('SMF.', 'ssdStorage.g_smf_frag', '311'),
# ('SMF.', 'ssdStorage.g_smf_large', '66')]
- storages = [name for typ, name, _ in server_stats if typ.startswith(('SMF', 'SMA')) and name.endswith('g_space')]
+ storages = [name for typ, name, _ in server_stats if typ.startswith(('SMF', 'SMA', 'MSE')) and name.endswith('g_space')]
if not storages:
return
for storage in storages:
storage = storage.split('.')[0]
- if storage in self.collected_smf_sma:
+ if storage in self.collected_storages:
continue
- self.collected_smf_sma.add(storage)
+ self.collected_storages.add(storage)
self.add_storage_charts(storage)
def add_backend_charts(self, backend_name):