BBlack has submitted this change and it was merged.

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 vhtcpd_inpkts_recvd_delta, vhtcpd_inpkts_sane_delta,
  vhtcpd_inpkts_enqueued_delta, vhtcpd_inpkts_dequeued_delta,
  vhtcpd_queue_overflows_delta, & vhtcpd_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(-)

Approvals:
  BBlack: Looks good to me, approved
  jenkins-bot: Verified



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..f0ca14e 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 = "vhtcpd_inpkts_recvd_delta"
+        title = "Multicast packets since last check"
+    }
+    metric {
+        name = "vhtcpd_inpkts_sane_delta"
+        title = "Sane packets since last check"
+    }
+    metric {
+        name = "vhtcpd_inpkts_enqueued_delta"
+        title = "Pakets enqueued since last check"
+    }
+    metric {
+        name = "vhtcpd_inpkts_dequeued_delta"
+        title = "Packets dequeued since last check"
+    }
+    metric {
+        name = "vhtcpd_queue_overflows_delta"
+        title = "Number of queue overflows since last check"
+    }
+    metric {
+        name = "vhtcpd_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: merged
Gerrit-Change-Id: I5b91a21751f1a40565645edeaf5456fb9a8e78e4
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to