Skip to content

Instantly share code, notes, and snippets.

@ali-mosavian
Created September 5, 2013 12:15
Show Gist options
  • Save ali-mosavian/6449363 to your computer and use it in GitHub Desktop.
Save ali-mosavian/6449363 to your computer and use it in GitHub Desktop.
After patch
----------------- YAML -----------------
global_host_alias:
query_port: 2099
outputWriters:
- "@class": "com.googlecode.jmxtrans.model.output.GraphiteWriter"
settings:
host: "localhost"
port: 8080
rootPrefix: jmxtrans
queries:
- name: heapMemory
obj: "java.lang:type=Memory"
resultAlias: "heapMemory"
attr:
- "HeapMemoryUsage"
- "NonHeapMemoryUsage"
sets:
- setname: test
query_names:
- heapMemory
urlTemplate: 'service:jmx:remoting-jmx://$hostname:$query_port'
username: user
password: pass
hosts:
- host2.somedomain.com:4711;some.alias.$hostname
----------------- YAML -----------------
Becomes ->
----------------- JSON -----------------
{
"servers": [
{
"username": "user",
"url": "service:jmx:remoting-jmx://host2.somedomain.com:4711",
"numQueryThreads": 1,
"alias": "some.alias.host2.somedomain.com",
"host": "host2.somedomain.com",
"queries": [
{
"outputWriters": [
{
"@class": "com.googlecode.jmxtrans.model.output.GraphiteWriter",
"settings": {
"typeNames": [
"name"
],
"host": "localhost",
"port": 8080,
"rootPrefix": "jmxtrans"
}
}
],
"resultAlias": "heapMemory",
"obj": "java.lang:type=Memory",
"attr": [
"HeapMemoryUsage",
"NonHeapMemoryUsage"
]
}
],
"password": "pass",
"port": "4711"
}
]
}
----------------- JSON -----------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment