Update README.md

This commit is contained in:
Shahzheeb Khan 2016-04-13 22:09:08 -04:00
parent a5bceba9af
commit 94c6f1e34f
1 changed files with 13 additions and 28 deletions

View File

@ -1,37 +1,22 @@
# Telegraf plugin: Jolokia # Telegraf plugin: MongoDB
#### Configuration #### Configuration
```toml ```toml
[[inputs.jolokia]] [[inputs.mongodb]]
## This is the context root used to compose the jolokia url servers = ["127.0.0.1:27017"]
context = "/jolokia/read" ```
## List of servers exposing jolokia read service For authenticated mongodb istances use connection mongdb connection URI
[[inputs.jolokia.servers]]
name = "stable"
host = "192.168.103.2"
port = "8180"
# username = "myuser"
# password = "mypassword"
## List of metrics collected on above servers ```toml
## Each metric consists in a name, a jmx path and either [[inputs.mongodb]]
## a pass or drop slice attribute. servers = ["mongodb://myuser:mypassword@myinstance.telegraf.com:27601/mydatabasename?authMechanism=PLAIN&authSource=$external"]
## This collect all heap memory usage metrics. ```
[[inputs.jolokia.metrics]] This connection uri may be different based on your environement and mongodb setup. If the user doesn't have the required priviliges to execute serverStatus command the you will get this error on telegraf
name = "heap_memory_usage"
jmx = "/java.lang:type=Memory/HeapMemoryUsage" ```toml
Error in input [mongodb]: not authorized on admin to execute command { serverStatus: 1, recordStats: 0 }
## This collect thread counts metrics.
[[inputs.jolokia.metrics]]
name = "thread_count"
jmx = "/java.lang:type=Threading/TotalStartedThreadCount,ThreadCount,DaemonThreadCount,PeakThreadCount"
## This collect number of class loaded/unloaded counts metrics.
[[inputs.jolokia.metrics]]
name = "class_count"
jmx = "/java.lang:type=ClassLoading/LoadedClassCount,UnloadedClassCount,TotalLoadedClassCount"
``` ```
#### Description #### Description