Package com.googlecode.jmxtrans.model

Examples of com.googlecode.jmxtrans.model.JmxProcess


      log.error("Error while clearing master server list: " + e.getMessage(), e);
      throw new LifecycleException(e);
    }

    for (File jsonFile : getJsonFiles()) {
      JmxProcess process;
      try {
        process = JsonUtils.getJmxProcess(jsonFile);
        if (log.isDebugEnabled()) {
          log.debug("Loaded file: " + jsonFile.getAbsolutePath());
        }
        this.masterServersList = mergeServerLists(this.masterServersList, process.getServers());
      } catch (Exception ex) {
        if (configuration.isContinueOnJsonError()) {
          throw new LifecycleException("Error parsing json: " + jsonFile, ex);
        } else {
          // error parsing one file should not prevent the startup of JMXTrans
View Full Code Here


        .setDebugEnabled(true)
        .setGenerate(true)
        .addTypeName("Destination")
        .build();

    JmxProcess process = new JmxProcess(Server.builder()
        .setHost("w2")
        .setPort("1105")
        .setAlias("w2_activemq_1105")
        .addQuery(Query.builder()
            .setObj("org.apache.activemq:BrokerName=localhost,Type=Queue,Destination=*")
 
View Full Code Here

public class Graphite {

  private static JsonPrinter printer = new JsonPrinter(System.out);

  public static void main(String[] args) throws Exception {
    printer.prettyPrint(new JmxProcess(Server.builder()
        .setHost("w2")
        .setPort("1099")
        .addQuery(Query.builder()
            .setObj("java.lang:type=GarbageCollector,name=ConcurrentMarkSweep")
            .addOutputWriter(GraphiteWriter.builder()
View Full Code Here

  private static final JsonPrinter printer = new JsonPrinter(System.out);

  /** */
  public static void main(String[] args) throws Exception {

    JmxProcess process = new JmxProcess(Server.builder()
        .setHost("w2")
        .setPort("1099")
        .setAlias("w2_ehcache_1099")
        .addQuery(Query.builder()
            .setObj("net.sf.ehcache:CacheManager=net.sf.ehcache.CacheManager@*,name=*,type=CacheStatistics")
 
View Full Code Here

   * tree representation of that json.
   */
  public static JmxProcess getJmxProcess(File file) throws IOException {
    ObjectMapper mapper = new ObjectMapper();
    mapper.registerModule(new GuavaModule());
    JmxProcess jmx = mapper.readValue(file, JmxProcess.class);
    jmx.setName(file.getName());
    return jmx;
  }
View Full Code Here

TOP

Related Classes of com.googlecode.jmxtrans.model.JmxProcess

Copyright © 2018 www.massapicom. 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.