I am trying to upgrade telegraf from 0.12 to 1.1.2. I am using telegraf to read metrics from jolokia to store it in influxdb. Earlier version used jmx with different format to write data. Newer version uses mbean and attribute combination. When I try to store the metric in the same name as before like the below one, it is not working. Please advise as how to preserve the metric so that it is not affecting our graphs.
[[inputs.jolokia.metrics]]
name = "HeapMemoryUsage_committed"
mbean = “java.lang:type=Memory/HeapMemoryUsage/committed”
or
[[inputs.jolokia.metrics]]
name = "HeapMemoryUsage_committed"
mbean = "java.lang:type=Memory/HeapMemoryUsage"
attribute = “committed”
Let me try to explain. For example, In the earlier version I used HeapMemoryUsage_committed to capture HeapMemoryUsage Committed metric. But in the newer version, it uses the combination of Name, HeapMemoryUsage/attribute and path like heap_memory_usage_HeapMemoryUsage_committed. If I do not use the name then it stores as _HeapMemoryUsage_committed. If I use the below configuration, it is not even storing the metric:
I understand init, used, max, committed are path but I tried it.
[[inputs.jolokia.metrics]]
name = "HeapMemoryUsage_committed"
mbean = “java.lang:type=Memory/HeapMemoryUsage/committed”
or
[[inputs.jolokia.metrics]]
name = "HeapMemoryUsage_committed"
mbean = "java.lang:type=Memory/HeapMemoryUsage"
attribute = “committed”