-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #337
- Loading branch information
Showing
4 changed files
with
77 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# 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 | ||
|
||
#### Description | ||
|
||
The Jolokia plugin collects JVM metrics exposed as MBean's attributes through jolokia REST endpoint. All metrics | ||
are collected for each server configured. | ||
|
||
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters