@Test public void testVelociteyRun() { Collection<Report> reports = jmxConfigReader.generateReportsByJmxDatacollectionConfig("src/test/resources/JVM-Basics.xml"); String snmpGraphConfig = graphConfigGenerator.generateSnmpGraph(reports, "src/main/resources/graphTemplate.vm"); System.out.println(snmpGraphConfig); }
public Collection<Report> generateReportsByJmxDatacollectionConfig(String jmxDatacollectionConfig) { Collection<Report> reports = new ArrayList<Report>(); JmxDatacollectionConfig inputConfig = JAXB.unmarshal(new File(jmxDatacollectionConfig), JmxDatacollectionConfig.class); for (JmxCollection jmxCollection : inputConfig.getJmxCollection()) { logger.debug("jmxCollection: '{}'", jmxCollection.getName()); Mbeans mbeans = jmxCollection.getMbeans(); for (Mbean mbean : mbeans.getMbean()) { reports.addAll(generateMbeanReportsByMBean(mbean)); reports.addAll(generateAttributeReporsByMBean(mbean)); reports.addAll(generateCompositeReportsByMBean(mbean)); reports.addAll(generateCompositeMemberReportsByMBean(mbean)); } } return reports; }
JmxConfigReader { public Collection<Report> generateReportsByJmxDatacollectionConfig(String jmxDatacollectionConfig) { Collection<Report> reports = new ArrayList<Report>(); JmxDatacollectionConfig inputConfig = JAXB.unmarshal(new File(jmxDatacollectionConfig), JmxDatacollectionConfig.class); for (JmxCollection jmxCollection : inputConfig.getJmxCollection()) { logger.debug("jmxCollection: '{}'", jmxCollection.getName()); Mbeans mbeans = jmxCollection.getMbeans(); for (Mbean mbean : mbeans.getMbean()) { reports.addAll(generateMbeanReportsByMBean(mbean)); reports.addAll(generateAttributeReporsByMBean(mbean)); reports.addAll(generateCompositeReportsByMBean(mbean)); reports.addAll(generateCompositeMemberReportsByMBean(mbean)); } } return reports; } }
JmxConfigReader { public Collection<Report> generateReportsByJmxDatacollectionConfig(String jmxDatacollectionConfig) { Collection<Report> reports = new ArrayList<Report>(); JmxDatacollectionConfig inputConfig = JAXB.unmarshal(new File(jmxDatacollectionConfig), JmxDatacollectionConfig.class); for (JmxCollection jmxCollection : inputConfig.getJmxCollection()) { logger.debug("jmxCollection: '{}'", jmxCollection.getName()); Mbeans mbeans = jmxCollection.getMbeans(); for (Mbean mbean : mbeans.getMbean()) { reports.addAll(generateMbeanReportsByMBean(mbean)); reports.addAll(generateAttributeReporsByMBean(mbean)); reports.addAll(generateCompositeReportsByMBean(mbean)); reports.addAll(generateCompositeMemberReportsByMBean(mbean)); } } return reports; }  }
JmxConfigReader { public Collection<Report> generateReportsByJmxDatacollectionConfig(String jmxDatacollectionConfig) { Collection<Report> reports = new ArrayList<Report>(); JmxDatacollectionConfig inputConfig = JAXB.unmarshal(new File(jmxDatacollectionConfig), JmxDatacollectionConfig.class); for (JmxCollection jmxCollection : inputConfig.getJmxCollection()) { logger.debug("jmxCollection: '{}'", jmxCollection.getName()); Mbeans mbeans = jmxCollection.getMbeans(); for (Mbean mbean : mbeans.getMbean()) { reports.addAll(generateMbeanReportsByMBean(mbean)); reports.addAll(generateAttributeReporsByMBean(mbean)); reports.addAll(generateCompositeReportsByMBean(mbean)); reports.addAll(generateCompositeMemberReportsByMBean(mbean)); } } return reports; }  Collection<Report> generateReportsByJmxDatacollectionConfig(String jmxDatacollectionConfig); }
JmxConfigReader { public Collection<Report> generateReportsByJmxDatacollectionConfig(String jmxDatacollectionConfig) { Collection<Report> reports = new ArrayList<Report>(); JmxDatacollectionConfig inputConfig = JAXB.unmarshal(new File(jmxDatacollectionConfig), JmxDatacollectionConfig.class); for (JmxCollection jmxCollection : inputConfig.getJmxCollection()) { logger.debug("jmxCollection: '{}'", jmxCollection.getName()); Mbeans mbeans = jmxCollection.getMbeans(); for (Mbean mbean : mbeans.getMbean()) { reports.addAll(generateMbeanReportsByMBean(mbean)); reports.addAll(generateAttributeReporsByMBean(mbean)); reports.addAll(generateCompositeReportsByMBean(mbean)); reports.addAll(generateCompositeMemberReportsByMBean(mbean)); } } return reports; }  Collection<Report> generateReportsByJmxDatacollectionConfig(String jmxDatacollectionConfig);  }