usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [39/50] [abbrv] git commit: add graphite
Date Mon, 20 Oct 2014 13:47:07 GMT
add graphite


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

Branch: refs/heads/two-dot-o-events
Commit: c522a93d842ef4b519b4c7656b6b16e0e0a2f88d
Parents: 955b587
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Fri Oct 17 17:37:05 2014 -0600
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Fri Oct 17 17:37:05 2014 -0600

----------------------------------------------------------------------
 .../apache/usergrid/metrics/MetricsFactory.java | 21 ++++++++++----------
 1 file changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c522a93d/stack/core/src/main/java/org/apache/usergrid/metrics/MetricsFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/metrics/MetricsFactory.java b/stack/core/src/main/java/org/apache/usergrid/metrics/MetricsFactory.java
index 7209b02..bad07ad 100644
--- a/stack/core/src/main/java/org/apache/usergrid/metrics/MetricsFactory.java
+++ b/stack/core/src/main/java/org/apache/usergrid/metrics/MetricsFactory.java
@@ -49,18 +49,17 @@ public class MetricsFactory {
     @PostConstruct
     void init() {
         registry = new MetricRegistry();
-        String badHost = "badhost";
+        String badHost = "false";
         String metricsHost = properties.getProperty("usergrid.metrics.graphite.host", badHost);
-
-        if(metricsHost!=badHost) {
-//            Graphite graphite = new Graphite(new InetSocketAddress(metricsHost, 2003));
-//            graphiteReporter = GraphiteReporter.forRegistry(registry)
-//                    .prefixedWith("notifications")
-//                    .convertRatesTo(TimeUnit.SECONDS)
-//                    .convertDurationsTo(TimeUnit.MILLISECONDS)
-//                    .filter(MetricFilter.ALL)
-//                    .build(graphite);
-//            graphiteReporter.start(30, TimeUnit.SECONDS);
+        if(!metricsHost.equals(badHost)) {
+            Graphite graphite = new Graphite(new InetSocketAddress(metricsHost, 2003));
+            graphiteReporter = GraphiteReporter.forRegistry(registry)
+                    .prefixedWith("notifications")
+                    .convertRatesTo(TimeUnit.SECONDS)
+                    .convertDurationsTo(TimeUnit.MILLISECONDS)
+                    .filter(MetricFilter.ALL)
+                    .build(graphite);
+            graphiteReporter.start(30, TimeUnit.SECONDS);
         }else {
             LOG.warn("MetricsService:Logger not started.");
         }


Mime
View raw message