Skip to content

Commit

Permalink
Update jolokia plugin readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrc committed Apr 5, 2016
1 parent 73bd98d commit 03f2a35
Showing 1 changed file with 23 additions and 39 deletions.
62 changes: 23 additions & 39 deletions plugins/inputs/jolokia/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
```

0 comments on commit 03f2a35

Please sign in to comment.