Update jolokia plugin readme

This commit is contained in:
Cameron Sparr 2016-04-05 13:54:02 -06:00 committed by Michele Fadda
parent 91647d4282
commit bd25bcf80c
1 changed files with 23 additions and 39 deletions

View File

@ -1,16 +1,28 @@
# Telegraf plugin: Jolokia # Telegraf plugin: Jolokia
#### Plugin arguments: #### Configuration
- **context** string: Context root used of jolokia url
- **servers** []Server: List of servers ```toml
+ **name** string: Server's logical name [[inputs.jolokia]]
+ **host** string: Server's ip address or hostname ## This is the context root used to compose the jolokia url
+ **port** string: Server's listening port context = "/jolokia/read"
- **metrics** []Metric
+ **name** string: Name of the measure ## List of servers exposing jolokia read service
+ **jmx** string: Jmx path that identifies mbeans attributes [[inputs.jolokia.servers]]
+ **pass** []string: Attributes to retain when collecting values name = "stable"
+ **drop** []string: Attributes to drop when collecting values 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 #### Description
@ -21,31 +33,3 @@ See: https://jolokia.org/
# Measurements: # Measurements:
Jolokia plugin produces one measure for each metric configured, adding Server's `name`, `host` and `port` as tags. 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
```