Deprecate the cassandra input plugin (#4050)

This commit is contained in:
Daniel Nelson
2018-04-23 15:06:26 -07:00
committed by GitHub
parent 86a3b8cad4
commit 911f0e4b57
7 changed files with 131 additions and 11 deletions

View File

@@ -2,7 +2,9 @@
The [Jolokia](http://jolokia.org) _agent_ and _proxy_ input plugins collect JMX metrics from an HTTP endpoint using Jolokia's [JSON-over-HTTP protocol](https://jolokia.org/reference/html/protocol.html).
## Jolokia Agent Configuration
### Configuration:
#### Jolokia Agent Configuration
The `jolokia2_agent` input plugin reads JMX metrics from one or more [Jolokia agent](https://jolokia.org/agent/jvm.html) REST endpoints.
@@ -32,7 +34,7 @@ Optionally, specify SSL options for communicating with agents:
paths = ["Uptime"]
```
## Jolokia Proxy Configuration
#### Jolokia Proxy Configuration
The `jolokia2_proxy` input plugin reads JMX metrics from one or more _targets_ by interacting with a [Jolokia proxy](https://jolokia.org/features/proxy.html) REST endpoint.
@@ -77,7 +79,7 @@ Optionally, specify SSL options for communicating with proxies:
paths = ["Uptime"]
```
## Jolokia Metric Configuration
#### Jolokia Metric Configuration
Each `metric` declaration generates a Jolokia request to fetch telemetry from a JMX MBean.
@@ -167,3 +169,11 @@ Both `jolokia2_agent` and `jolokia2_proxy` plugins support default configuration
| `default_field_separator` | `.` | A character to use to join Mbean attributes when creating fields. |
| `default_field_prefix` | _None_ | A string to prepend to the field names produced by all `metric` declarations. |
| `default_tag_prefix` | _None_ | A string to prepend to the tag names produced by all `metric` declarations. |
### Example Configurations:
- [Java JVM](/influxdata/telegraf/blob/master/plugins/inputs/jolokia2/examples/java.conf)
- [Kafka](/influxdata/telegraf/blob/master/plugins/inputs/jolokia2/examples/kafka.conf)
- [Cassandra](/influxdata/telegraf/blob/master/plugins/inputs/jolokia2/examples/cassandra.conf)
Please help improve this list and contribute new configuration files by opening an issue or pull request.

View File

@@ -0,0 +1,85 @@
[[inputs.jolokia2_agent]]
urls = ["http://localhost:8778/jolokia"]
name_prefix = "java_"
[[inputs.jolokia2_agent.metrics]]
name = "Memory"
mbean = "java.lang:type=Memory"
[[inputs.jolokia2_agent.metric]]
name = "GarbageCollector"
mbean = "java.lang:name=*,type=GarbageCollector"
tag_keys = ["name"]
[[inputs.jolokia2_agent]]
urls = ["http://localhost:8778/jolokia"]
name_prefix = "cassandra_"
[[inputs.jolokia2_agent.metric]]
name = "Cache"
mbean = "org.apache.cassandra.metrics:name=*,scope=*,type=Cache"
tag_keys = ["name", "scope"]
[[inputs.jolokia2_agent.metric]]
name = "Client"
mbean = "org.apache.cassandra.metrics:name=*,type=Client"
tag_keys = ["name"]
[[inputs.jolokia2_agent.metric]]
name = "ClientRequestMetrics"
mbean = "org.apache.cassandra.metrics:name=*,type=ClientRequestMetrics"
tag_keys = ["name"]
[[inputs.jolokia2_agent.metric]]
name = "ClientRequest"
mbean = "org.apache.cassandra.metrics:name=*,scope=*,type=ClientRequest"
tag_keys = ["name", "scope"]
[[inputs.jolokia2_agent.metric]]
name = "ColumnFamily"
mbean = "org.apache.cassandra.metrics:keyspace=*,name=*,scope=*,type=ColumnFamily"
tag_keys = ["keyspace", "name", "scope"]
[[inputs.jolokia2_agent.metric]]
name = "CommitLog"
mbean = "org.apache.cassandra.metrics:name=*,type=CommitLog"
tag_keys = ["name"]
[[inputs.jolokia2_agent.metric]]
name = "Compaction"
mbean = "org.apache.cassandra.metrics:name=*,type=Compaction"
tag_keys = ["name"]
[[inputs.jolokia2_agent.metric]]
name = "CQL"
mbean = "org.apache.cassandra.metrics:name=*,type=CQL"
tag_keys = ["name"]
[[inputs.jolokia2_agent.metric]]
name = "DroppedMessage"
mbean = "org.apache.cassandra.metrics:name=*,scope=*,type=DroppedMessage"
tag_keys = ["name", "scope"]
[[inputs.jolokia2_agent.metric]]
name = "FileCache"
mbean = "org.apache.cassandra.metrics:name=*,type=FileCache"
tag_keys = ["name"]
[[inputs.jolokia2_agent.metric]]
name = "ReadRepair"
mbean = "org.apache.cassandra.metrics:name=*,type=ReadRepair"
tag_keys = ["name"]
[[inputs.jolokia2_agent.metric]]
name = "HintedHandoffManager"
mbean = "org.apache.cassandra.metrics:type=HintedHandoffManager"
[[inputs.jolokia2_agent.metric]]
name = "Storage"
mbean = "org.apache.cassandra.metrics:name=*,type=Storage"
tag_keys = ["name"]
[[inputs.jolokia2_agent.metric]]
name = "ThreadPools"
mbean = "org.apache.cassandra.metrics:name=*,path=*,scope=*,type=ThreadPools"
tag_keys = ["name", "path", "scope"]

View File

@@ -56,13 +56,13 @@ func (jp *JolokiaProxy) SampleConfig() string {
## Add proxy targets to query
# default_target_username = ""
# default_target_password = ""
[[inputs.jolokia_proxy.target]]
[[inputs.jolokia2_proxy.target]]
url = "service:jmx:rmi:///jndi/rmi://targethost:9999/jmxrmi"
# username = ""
# password = ""
# username = ""
# password = ""
## Add metrics to read
[[inputs.jolokia_proxy.metric]]
[[inputs.jolokia2_proxy.metric]]
name = "java_runtime"
mbean = "java.lang:type=Runtime"
paths = ["Uptime"]