From bd25bcf80cafbd1711c0239886e569b851c18fa8 Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Tue, 5 Apr 2016 13:54:02 -0600 Subject: [PATCH] Update jolokia plugin readme --- plugins/inputs/jolokia/README.md | 62 ++++++++++++-------------------- 1 file changed, 23 insertions(+), 39 deletions(-) diff --git a/plugins/inputs/jolokia/README.md b/plugins/inputs/jolokia/README.md index bda0c5f93..3a528b33f 100644 --- a/plugins/inputs/jolokia/README.md +++ b/plugins/inputs/jolokia/README.md @@ -1,16 +1,28 @@ # Telegraf plugin: Jolokia -#### Plugin arguments: -- **context** string: Context root used of jolokia url -- **servers** []Server: List of servers - + **name** string: Server's logical name - + **host** string: Server's ip address or hostname - + **port** string: Server's listening port -- **metrics** []Metric - + **name** string: Name of the measure - + **jmx** string: Jmx path that identifies mbeans attributes - + **pass** []string: Attributes to retain when collecting values - + **drop** []string: Attributes to drop when collecting values +#### Configuration + +```toml +[[inputs.jolokia]] + ## This is the context root used to compose the jolokia url + context = "/jolokia/read" + + ## List of servers exposing jolokia read service + [[inputs.jolokia.servers]] + name = "stable" + host = "192.168.103.2" + port = "8180" + # username = "myuser" + # password = "mypassword" + + ## List of metrics collected on above servers + ## Each metric consists in a name, a jmx path and either + ## a pass or drop slice attribute. + ## This collect all heap memory usage metrics. + [[inputs.jolokia.metrics]] + name = "heap_memory_usage" + jmx = "/java.lang:type=Memory/HeapMemoryUsage" +``` #### Description @@ -21,31 +33,3 @@ See: https://jolokia.org/ # Measurements: Jolokia plugin produces one measure for each metric configured, adding Server's `name`, `host` and `port` as tags. - -Given a configuration like: - -```ini -[jolokia] - -[[jolokia.servers]] - name = "as-service-1" - host = "127.0.0.1" - port = "8080" - -[[jolokia.servers]] - name = "as-service-2" - host = "127.0.0.1" - port = "8180" - -[[jolokia.metrics]] - name = "heap_memory_usage" - jmx = "/java.lang:type=Memory/HeapMemoryUsage" - pass = ["used", "max"] -``` - -The collected metrics will be: - -``` -jolokia_heap_memory_usage name=as-service-1,host=127.0.0.1,port=8080 used=xxx,max=yyy -jolokia_heap_memory_usage name=as-service-2,host=127.0.0.1,port=8180 used=vvv,max=zzz -```