Ori.livneh has submitted this change and it was merged.

Change subject: hhvm: fix ganglia memory reporter
......................................................................


hhvm: fix ganglia memory reporter

Change-Id: I6c55cf24f6cae2961eaf7581407d167e21eb69a7
---
A modules/admin/files/home/ori/.binned/mw
M modules/hhvm/files/monitoring/hhvm_mem.py
M modules/hhvm/files/monitoring/hhvm_mem.pyconf
3 files changed, 65 insertions(+), 7 deletions(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/modules/admin/files/home/ori/.binned/mw 
b/modules/admin/files/home/ori/.binned/mw
new file mode 100755
index 0000000..b6aced6
--- /dev/null
+++ b/modules/admin/files/home/ori/.binned/mw
@@ -0,0 +1,14 @@
+#!/usr/bin/env php
+<?php
+
+list( $__script, $__wiki ) = array_slice( $argv, 1 );
+if ( strpos( $__script, '.php' ) === false ) {
+       list( $__wiki, $__script ) = array( $__script, $__wiki );
+}
+
+require_once '/srv/mediawiki/multiversion/MWVersion.php';
+require_once getMediaWiki( 'maintenance/commandLine.inc', $__wiki ?: 'enwiki' 
);
+require_once $__script ?: $IP . '/maintenance/eval.php';
+
+unset( $__script );
+unset( $__wiki );
diff --git a/modules/hhvm/files/monitoring/hhvm_mem.py 
b/modules/hhvm/files/monitoring/hhvm_mem.py
index 93f28e7..f63ccf4 100644
--- a/modules/hhvm/files/monitoring/hhvm_mem.py
+++ b/modules/hhvm/files/monitoring/hhvm_mem.py
@@ -45,7 +45,7 @@
     url = params.get('url', 'http://localhost:9002/memory.json')
     stats = MemoryStats(url)
     return [{
-        'name': key,
+        'name': str(key),
         'value_type': 'uint',
         'format': '%u',
         'units': 'count' if 'count' in key.lower() else 'bytes',
diff --git a/modules/hhvm/files/monitoring/hhvm_mem.pyconf 
b/modules/hhvm/files/monitoring/hhvm_mem.pyconf
index 32f8cd9..2856f02 100644
--- a/modules/hhvm/files/monitoring/hhvm_mem.pyconf
+++ b/modules/hhvm/files/monitoring/hhvm_mem.pyconf
@@ -4,10 +4,6 @@
     module {
         name     = "hhvm_mem"
         language = "python"
-
-        param url {
-            value = 'http://localhost:9002/memory.json'
-        }
     }
 }
 
@@ -16,8 +12,56 @@
     time_threshold = 60
 
     metric {
-        name_match      = "HHVM.(.+)"
-        title           = "\\1"
+        name            = "HHVM.Process_Stats_bytes.Shared"
+        title           = "Memory - Process - Shared"
+        value_threshold = 1.0
+    }
+
+    metric {
+        name            = "HHVM.Process_Stats_bytes.TextCode"
+        title           = "Memory - Process - TextCode"
+        value_threshold = 1.0
+    }
+
+    metric {
+        name            = "HHVM.Process_Stats_bytes.Data"
+        title           = "Memory - Process - Data"
+        value_threshold = 1.0
+    }
+
+    metric {
+        name            = "HHVM.Process_Stats_bytes.VmRss"
+        title           = "Memory - Process - VmRss"
+        value_threshold = 1.0
+    }
+
+    metric {
+        name            = "HHVM.Breakdown.Static_Strings.Bytes"
+        title           = "Memory - Static Strings"
+        value_threshold = 1.0
+    }
+
+    metric {
+        name            = "HHVM.Process_Stats_bytes.VmSize"
+        title           = "Memory - VmSize"
+        value_threshold = 1.0
+    }
+
+    metric {
+        name            = "HHVM.Breakdown.Unknown"
+        title           = "Memory - Unknown"
+        value_threshold = 1.0
+    }
+
+    metric {
+        name            = "HHVM.Breakdown.Code.Bytes"
+        title           = "Memory - Code"
+        value_threshold = 1.0
+    }
+
+    metric {
+        name            = "HHVM.Breakdown.Static_Strings.Count"
+        title           = "Memory - Static Strings Count"
         value_threshold = 1.0
     }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c55cf24f6cae2961eaf7581407d167e21eb69a7
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <o...@wikimedia.org>
Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to