Examples of GMetric


Examples of info.ganglia.gmetric4j.gmetric.GMetric

      LOG.warn("No " + metricsPropertyKey + "port property in tajo-metrics.properties");
      return;
    }

    try {
      ganglia = new GMetric(server, Integer.parseInt(port), GMetric.UDPAddressingMode.MULTICAST, 1);
    } catch (Exception e) {
      LOG.warn(e.getMessage(), e);
    }
  }
View Full Code Here

Examples of info.ganglia.gmetric4j.gmetric.GMetric

    }

    @Override
    public ScheduledReporter build(MetricRegistry registry) {
        try {
            GMetric ganglia = new GMetric(host,
                                          port,
                                          mode,
                                          ttl,
                                          uuid != null || spoof != null,
                                          uuid,
View Full Code Here

Examples of info.ganglia.gmetric4j.gmetric.GMetric

    if (hasProperty(TMAX)) {
      reporter.withTMax(getProperty(TMAX, Integer.TYPE));
    }

    final GMetric gMetric = new GMetric(getProperty(GROUP), getProperty(PORT, Integer.TYPE), getProperty(UDP_MODE, UDPAddressingMode.class), getProperty(
        TTL, Integer.TYPE), !hasProperty(PROTOCOL) || getProperty(PROTOCOL).contains("3.1"),
        hasProperty(UUID) ? java.util.UUID.fromString(getProperty(UUID)) : null, getProperty(SPOOF));

    return reporter.build(gMetric);
  }
View Full Code Here

Examples of info.ganglia.gmetric4j.gmetric.GMetric

            final String period = ninjaProperties.getWithDefault(
                    "metrics.ganglia.period", "60s");
            final int delay = TimeUtil.parseDuration(period);

            try {
                GMetric ganglia = new GMetric(address, port,
                        UDPAddressingMode.MULTICAST, 1);
                reporter = GangliaReporter
                        .forRegistry(metricsService.getMetricRegistry())
                        .convertRatesTo(TimeUnit.SECONDS)
                        .convertDurationsTo(TimeUnit.MILLISECONDS)
View Full Code Here

Examples of info.ganglia.gmetric4j.gmetric.GMetric

        }

        try
        {
            for (HostPort hostPort : hosts) {
                final GMetric ganglia = new GMetric(hostPort.getHost(), hostPort.getPort(), GMetric.UDPAddressingMode.MULTICAST, 1);
                final GangliaReporter reporter = GangliaReporter.forRegistry(this.metricRegistry)
                            .convertDurationsTo(this.getRealDurationTimeUnitConversion())
                            .convertRatesTo(this.getRealRateTimeUnitConversion())
                            .filter(new RegexMetricFilter(this.inclusion, this.exclusion))
                            .build(ganglia);
View Full Code Here

Examples of info.ganglia.gmetric4j.gmetric.GMetric

    // default values?
    ganglia = getXmlNode("/jmxetric-config/ganglia", inputSource);
    // Gets the config for ganglia
    // Note that the ganglia config needs to be found before the samplers
    // are created.
    GMetric gmetric = makeGMetricFromXml();
    return gmetric;
  }
View Full Code Here

Examples of info.ganglia.gmetric4j.gmetric.GMetric

    buf.append(" mode=").append(addressingMode);
    buf.append(" v31x=").append(v31x);
    buf.append(" spoof=").append(spoof);
    log.fine(buf.toString());
    System.out.println(buf.toString());
    return new GMetric(hostname, port, addressingMode, DEFAULT_TTL, v31x,
        null, spoof);
  }
View Full Code Here

Examples of info.ganglia.gmetric4j.gmetric.GMetric

  private static void configureGanglia(JMXetricAgent agent,
      InputSource inputSource, CommandLineArgs args) throws IOException,
      XPathExpressionException {
    GangliaXmlConfigurationService gangliaConfigService = new GangliaXmlConfigurationService(
        inputSource, args);
    GMetric gmetric = gangliaConfigService.getConfig();
    agent.setGmetric(gmetric);
  }
View Full Code Here

Examples of info.ganglia.gmetric4j.gmetric.GMetric

      // Only publish on Ganglia for summary.
      ArgumentChecker.notNull(getGangliaAddress(), "gangliaAddress");
      ArgumentChecker.notNull(getGangliaPort(), "gangliaPort");
      ArgumentChecker.notNull(getGangliaAddressingMode(), "gangliaAddressingMode");
      ArgumentChecker.notNull(getGangliaTtl(), "gangliaTtl");
      GMetric ganglia = new GMetric(getGangliaAddress(), getGangliaPort(), UDPAddressingMode.valueOf(getGangliaAddressingMode()), getGangliaTtl(), true);
      GangliaReporter gangliaReporter = GangliaReporter.forRegistry(summaryRegistry)
          .convertRatesTo(TimeUnit.SECONDS)
          .convertDurationsTo(TimeUnit.MILLISECONDS)
          .build(ganglia);
      gangliaReporter.start(1, TimeUnit.MINUTES);
View Full Code Here

Examples of info.ganglia.gmetric4j.gmetric.GMetric

        for (final Map.Entry<String, Object> resultValue : result.getValues().entrySet()) {
          final String name = KeyUtils.getKeyString(query, result, resultValue, getTypeNames());
          final String value = resultValue.getValue().toString();
          GMetricType dataType = getType(resultValue.getValue());
          log.debug("Sending Ganglia metric {}={} [type={}]", name, value, dataType);
          new GMetric(host, port, addressingMode, ttl, v31, null, spoofedHostName)
              .announce(name, value, dataType, units, slope, tmax, dmax, groupName);
        }
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.