public class CsvWriter extends AbstractOutputWriter implements OutputWriter
QueryResult.getName() as the value of the
header.
The query can contain multiple MBeans by pattern matched ObjectName
Example query configuration:
"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"]
}
]
}
]
See embedded-jmxtrans configuration for more details.SETTING_HOST, SETTING_NAME_PREFIX, SETTING_PORT, SETTING_PROXY_HOST, SETTING_PROXY_PORT, SETTING_TOKEN, SETTING_URL, SETTING_USERNAME| Constructor and Description |
|---|
CsvWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
start()
No-op implementation
|
void |
stop()
No-op implementation
|
void |
write(Iterable<QueryResult> results)
Write all the given QueryResult to the target system.
|
equals, getBooleanSetting, getIntSetting, getIntSetting, getLongSetting, getSettings, getStrategy, getStringSetting, getStringSetting, hashCode, isEnabled, setEnabled, setSettings, setStrategy, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetSettings, isEnabled, setEnabled, setSettingspublic void start()
AbstractOutputWriterstart in interface OutputWriterstart in class AbstractOutputWriterpublic void stop()
throws IOException
AbstractOutputWriterstop in interface OutputWriterstop in class AbstractOutputWriterIOExceptionpublic void write(Iterable<QueryResult> results)
OutputWriterwrite in interface OutputWriterwrite in class AbstractOutputWriterCopyright © 2013. All Rights Reserved.