BryanDavis has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/80151


Change subject: Add *_delta stats for vhtcpd ganglia.
......................................................................

Add *_delta stats for vhtcpd ganglia.

Augment vhtcpd data collected by ganglia with "delta" metrics which record the
difference between the current sample and the prior sample. This should help
make spotting the time rate of change differences easier for human eyes.

- increase gmond script internal cache time to 30s.
- add inpkts_recvd_delta, inpkts_sane_delta, inpkts_enqueued_delta,
  inpkts_dequeued_delta, queue_overflows_delta, & queue_max_size_delta stats.

Change-Id: I5b91a21751f1a40565645edeaf5456fb9a8e78e4
---
M modules/varnish/files/ganglia/ganglia-vhtcpd.py
M modules/varnish/templates/ganglia/vhtcpd.pyconf.erb
2 files changed, 64 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/51/80151/1

diff --git a/modules/varnish/files/ganglia/ganglia-vhtcpd.py 
b/modules/varnish/files/ganglia/ganglia-vhtcpd.py
index 0994037..6c31566 100644
--- a/modules/varnish/files/ganglia/ganglia-vhtcpd.py
+++ b/modules/varnish/files/ganglia/ganglia-vhtcpd.py
@@ -25,7 +25,7 @@
 CONF = {
     'log': '/tmp/vhtcpd.stats',
     'prefix': 'vhtcpd_',
-    'cache_secs': 5,
+    'cache_secs': 30,
     'groups': 'vhtcpd',
 }
 METRICS = {
@@ -192,6 +192,45 @@
         'units': 'count',
         'description': 'Maximum number of packets in queue since 
startup/overflow',
         }))
+
+    # *_delta metrics compute diff from prior sample using internal cache
+    descriptors.append(build_desc(skel, {
+        'name': CONF['prefix'] + 'inpkts_recvd_delta',
+        'call_back': get_delta,
+        'units': 'pkts',
+        'description': 'Multicast packets since last check',
+        }))
+    descriptors.append(build_desc(skel, {
+        'name': CONF['prefix'] + 'inpkts_sane_delta',
+        'call_back': get_delta,
+        'units': 'pkts',
+        'description': 'Sane packets since last check',
+        }))
+    descriptors.append(build_desc(skel, {
+        'name': CONF['prefix'] + 'inpkts_enqueued_delta',
+        'call_back': get_delta,
+        'units': 'pkts',
+        'description': 'Pakets enqueued since last check',
+        }))
+    descriptors.append(build_desc(skel, {
+        'name': CONF['prefix'] + 'inpkts_dequeued_delta',
+        'call_back': get_delta,
+        'units': 'pkts',
+        'description': 'Packets dequeued since last check',
+        }))
+    descriptors.append(build_desc(skel, {
+        'name': CONF['prefix'] + 'queue_overflows_delta',
+        'call_back': get_delta,
+        'units': 'count',
+        'description': 'Number of queue overflows since last check',
+        }))
+    descriptors.append(build_desc(skel, {
+        'name': CONF['prefix'] + 'queue_max_size_delta',
+        'call_back': get_delta,
+        'units': 'count',
+        'description': 'Maximum number of packets in queue since last 
check/overflow',
+        }))
+
     return descriptors
 #end metric_init
 
diff --git a/modules/varnish/templates/ganglia/vhtcpd.pyconf.erb 
b/modules/varnish/templates/ganglia/vhtcpd.pyconf.erb
index 5d26129..3abccb5 100644
--- a/modules/varnish/templates/ganglia/vhtcpd.pyconf.erb
+++ b/modules/varnish/templates/ganglia/vhtcpd.pyconf.erb
@@ -47,4 +47,28 @@
         name = "vhtcpd_queue_max_size"
         title = "Maximum number of packets in queue since startup/overflow 
(count)"
     }
+    metric {
+        name = "inpkts_recvd_delta"
+        title = "Multicast packets since last check"
+    }
+    metric {
+        name = "inpkts_sane_delta"
+        title = "Sane packets since last check"
+    }
+    metric {
+        name = "inpkts_enqueued_delta"
+        title = "Pakets enqueued since last check"
+    }
+    metric {
+        name = "inpkts_dequeued_delta"
+        title = "Packets dequeued since last check"
+    }
+    metric {
+        name = "queue_overflows_delta"
+        title = "Number of queue overflows since last check"
+    }
+    metric {
+        name = "queue_max_size_delta"
+        title = "Maximum number of packets in queue since last check/overflow"
+    }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/80151
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b91a21751f1a40565645edeaf5456fb9a8e78e4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to