use of com.googlecode.jmxtrans.util.JsonUtils in project jmxtrans by jmxtrans.
the class HeapMemory method main.
public static void main(String[] args) throws Exception {
Injector injector = JmxTransModule.createInjector(new JmxTransConfiguration());
JsonUtils jsonUtils = injector.getInstance(JsonUtils.class);
JmxProcess process = jsonUtils.parseProcess(new File("heapmemory.json"));
new JsonPrinter(System.out).print(process);
JmxTransformer transformer = injector.getInstance(JmxTransformer.class);
transformer.executeStandalone(process);
}
use of com.googlecode.jmxtrans.util.JsonUtils in project jmxtrans by jmxtrans.
the class CloudWatchWriterIT method loadingFromFile.
@Test
public void loadingFromFile() throws URISyntaxException, IOException {
JsonUtils jsonUtils = createInjector(new JmxTransConfiguration()).getInstance(JsonUtils.class);
File input = new File(CloudWatchWriterIT.class.getResource("/cloud-watch.json").toURI());
JmxProcess process = jsonUtils.parseProcess(input);
assertThat(process.getName()).isEqualTo("cloud-watch.json");
}
use of com.googlecode.jmxtrans.util.JsonUtils in project jmxtrans by jmxtrans.
the class InfluxDbWriterTests method loadingFromFile.
@Test
public void loadingFromFile() throws URISyntaxException, IOException {
File input = new File(InfluxDbWriterTests.class.getResource("/influxDB.json").toURI());
Injector injector = JmxTransModule.createInjector(new JmxTransConfiguration());
JsonUtils jsonUtils = injector.getInstance(JsonUtils.class);
JmxProcess process = jsonUtils.parseProcess(input);
assertThat(process.getName()).isEqualTo("influxDB.json");
}
use of com.googlecode.jmxtrans.util.JsonUtils in project jmxtrans by jmxtrans.
the class Local method main.
public static void main(String[] args) throws Exception {
Injector injector = JmxTransModule.createInjector(new JmxTransConfiguration());
JsonUtils jsonUtils = injector.getInstance(JsonUtils.class);
JmxProcess process = jsonUtils.parseProcess(new File("local.json"));
new JsonPrinter(System.out).print(process);
JmxTransformer transformer = injector.getInstance(JmxTransformer.class);
transformer.executeStandalone(process);
}
use of com.googlecode.jmxtrans.util.JsonUtils in project jmxtrans by jmxtrans.
the class MemoryPool method main.
public static void main(String[] args) throws Exception {
Injector injector = JmxTransModule.createInjector(new JmxTransConfiguration());
JsonUtils jsonUtils = injector.getInstance(JsonUtils.class);
JmxProcess process = jsonUtils.parseProcess(new File("memorypool.json"));
new JsonPrinter(System.out).print(process);
JmxTransformer transformer = injector.getInstance(JmxTransformer.class);
transformer.executeStandalone(process);
}
Aggregations