-
Notifications
You must be signed in to change notification settings - Fork 37
Csv Writer
rylarson edited this page Sep 24, 2013
·
8 revisions
This output writer can ONLY be used on a per query basis, not in a global output writer configuration because this aggregates all of the different attributes returned by the query into a single line in a csv file, using the name from the QueryResult as the value of the header.
The query can contain multiple MBeans by pattern matched ObjectName
- Source: CsvWriter.java
- 'outputFile': The path to the csv file where the query result will be written to. Required.
"queries": [
{
"outputWriters": [
{
"@class": "org.jmxtrans.embedded.output.CsvWriter",
"settings": {
"outputFile": "log/jmxlog.csv"
}
}
],
"objectName": "java.lang:type=Memory",
"resultAlias": "jvm.memory",
"attributes": [
{
"name": "HeapMemoryUsage",
"keys": ["committed", "used"]
},
{
"name": "NonHeapMemoryUsage",
"keys": ["committed", "used"]
}
]
}
]
CSV, specifically SuperCSV's Excel Preference csv format.
Format:
time,result1.name,result2.name,result3.name,...,resultN.name
epoch-in-seconds,result1.value,result2.value,result3.value,...,resultN.value
Sample output:
time,jvm.memory.NonHeapMemoryUsage.committed,jvm.memory.NonHeapMemoryUsage.used,jvm.memory.HeapMemoryUsage.committed,jvm.memory.HeapMemoryUsage.used
1379970971,75628544,68513144,687734784,103791112
1379971001,75628544,68652896,687734784,161952032
1379971031,75628544,68992112,687734784,171161296
1379971061,75628544,68992112,687734784,173209120
1379971091,75628544,69045808,687734784,175256944
1379971105,75628544,69055536,687734784,195462800
1379971105,75694080,69118464,687734784,197508960
- Configuration
- ... Expression Language
- ... Configuration Sample
- Output Writers
- ... Graphite Writer
- ... StatsD Writer
- ... Graphite Pickle Writer
- ... Librato Writer
- ... SLF4J Writer
- ... Stackdriver Writer
- ... CopperEgg Writer
- ... Csv Writer
- ... Console Writer
- Integration
- ... Maven Setup
- ... Spring Integration
- ... Plain Java Servlet Integration
- Configuration Templates
- ... Tomcat
- ... JVM
- Internals
- ... Implementation Decisions
- ... Health Monitoring
- Latest javadocs
- Forum (Google Groups)
- Downloads
- Samples
- ... [Cocktail Web App] (https://github.com/jmxtrans/embedded-jmxtrans-samples/tree/master/embedded-jmxtrans-webapp-coktail)
- License
- Release Notes