You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eagle.apache.org by ha...@apache.org on 2016/02/22 07:51:08 UTC

incubator-eagle git commit: Auto fill site from configuration if not set

Repository: incubator-eagle
Updated Branches:
  refs/heads/master 86f2f8f0e -> f9a921157


Auto fill site from configuration if not set


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/f9a92115
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/f9a92115
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/f9a92115

Branch: refs/heads/master
Commit: f9a921157c6104fda91251fa5bf01e5f2c3dcdc5
Parents: 86f2f8f
Author: Hao Chen <ha...@apache.org>
Authored: Mon Feb 22 14:42:23 2016 +0800
Committer: Hao Chen <ha...@apache.org>
Committed: Mon Feb 22 14:42:23 2016 +0800

----------------------------------------------------------------------
 eagle-external/hadoop_jmx_collector/base.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f9a92115/eagle-external/hadoop_jmx_collector/base.py
----------------------------------------------------------------------
diff --git a/eagle-external/hadoop_jmx_collector/base.py b/eagle-external/hadoop_jmx_collector/base.py
index 6024a8e..bbb2344 100644
--- a/eagle-external/hadoop_jmx_collector/base.py
+++ b/eagle-external/hadoop_jmx_collector/base.py
@@ -229,6 +229,8 @@ class MetricCollector(threading.Thread):
             msg["value"] = float(str(msg["value"]))
         if not msg.has_key("host") or len(msg["host"]) == 0:
             msg["host"] = socket.getfqdn()
+        if not msg.has_key("site"):
+            msg["site"] = self.config["env"]["site"]
 
         self.sender.send(msg)