2020-08-12 04:10:41 +08:00
|
|
|
# Cassandra Input Plugin
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2022-06-08 05:10:18 +08:00
|
|
|
**Deprecated in version 1.7**: Please use the [jolokia2](../jolokia2/README.md)
|
|
|
|
|
plugin with the [cassandra.conf](../jolokia2/examples/cassandra.conf) example
|
|
|
|
|
configuration.
|
2021-11-25 02:55:55 +08:00
|
|
|
|
|
|
|
|
## Plugin arguments
|
2018-04-24 06:06:26 +08:00
|
|
|
|
2016-04-02 07:13:21 +08:00
|
|
|
- **context** string: Context root used for jolokia url
|
2021-11-25 02:55:55 +08:00
|
|
|
- **servers** []string: List of servers with the format `<user:passwd@><host>:port`"
|
2016-04-02 07:13:21 +08:00
|
|
|
- **metrics** []string: List of Jmx paths that identify mbeans attributes
|
|
|
|
|
|
2021-11-25 02:55:55 +08:00
|
|
|
## Description
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2022-06-08 05:10:18 +08:00
|
|
|
The Cassandra plugin collects Cassandra 3 / JVM metrics exposed as MBean's
|
|
|
|
|
attributes through jolokia REST endpoint. All metrics are collected for each
|
|
|
|
|
server configured.
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2022-06-08 05:10:18 +08:00
|
|
|
See: [https://jolokia.org/](https://jolokia.org/) and [Cassandra
|
|
|
|
|
Documentation][1]
|
2021-11-25 02:55:55 +08:00
|
|
|
|
2022-06-08 05:10:18 +08:00
|
|
|
[1]: http://docs.datastax.com/en/cassandra/3.x/cassandra/operations/monitoringCassandraTOC.html
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2022-06-08 05:10:18 +08:00
|
|
|
## Metrics
|
|
|
|
|
|
|
|
|
|
Cassandra plugin produces one or more measurements for each metric configured,
|
|
|
|
|
adding Server's name as `host` tag. More than one measurement is generated when
|
|
|
|
|
querying table metrics with a wildcard for the keyspace or table name.
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2022-04-08 06:01:21 +08:00
|
|
|
## Configuration
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2022-05-24 21:49:47 +08:00
|
|
|
```toml @sample.conf
|
2021-04-28 09:41:52 +08:00
|
|
|
# Read Cassandra metrics through Jolokia
|
2016-04-02 07:13:21 +08:00
|
|
|
[[inputs.cassandra]]
|
|
|
|
|
context = "/jolokia/read"
|
2021-04-28 09:41:52 +08:00
|
|
|
## List of cassandra servers exposing jolokia read service
|
|
|
|
|
servers = ["myuser:mypassword@10.10.10.1:8778","10.10.10.2:8778",":8778"]
|
|
|
|
|
## List of metrics collected on above servers
|
|
|
|
|
## Each metric consists of a jmx path.
|
|
|
|
|
## This will collect all heap memory usage metrics from the jvm and
|
|
|
|
|
## ReadLatency metrics for all keyspaces and tables.
|
|
|
|
|
## "type=Table" in the query works with Cassandra3.0. Older versions might
|
|
|
|
|
## need to use "type=ColumnFamily"
|
|
|
|
|
metrics = [
|
|
|
|
|
"/java.lang:type=Memory/HeapMemoryUsage",
|
|
|
|
|
"/org.apache.cassandra.metrics:type=Table,keyspace=*,scope=*,name=ReadLatency"
|
|
|
|
|
]
|
2016-04-02 07:13:21 +08:00
|
|
|
```
|
|
|
|
|
|
2022-06-08 05:10:18 +08:00
|
|
|
## Example Output
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2021-11-25 02:55:55 +08:00
|
|
|
```shell
|
2016-04-02 07:13:21 +08:00
|
|
|
javaMemory,host=myHost,mname=HeapMemoryUsage HeapMemoryUsage_committed=1040187392,HeapMemoryUsage_init=1050673152,HeapMemoryUsage_max=1040187392,HeapMemoryUsage_used=368155000 1459551767230567084
|
|
|
|
|
```
|
|
|
|
|
|
2021-11-25 02:55:55 +08:00
|
|
|
## Useful Metrics
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2022-06-08 05:10:18 +08:00
|
|
|
Here is a list of metrics that might be useful to monitor your cassandra
|
|
|
|
|
cluster. This was put together from multiple sources on the web.
|
2016-04-02 07:13:21 +08:00
|
|
|
|
|
|
|
|
- [How to monitor Cassandra performance metrics](https://www.datadoghq.com/blog/how-to-monitor-cassandra-performance-metrics)
|
|
|
|
|
- [Cassandra Documentation](http://docs.datastax.com/en/cassandra/3.x/cassandra/operations/monitoringCassandraTOC.html)
|
|
|
|
|
|
2021-11-25 02:55:55 +08:00
|
|
|
### measurement = javaGarbageCollector
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2016-10-27 18:45:17 +08:00
|
|
|
- /java.lang:type=GarbageCollector,name=ConcurrentMarkSweep/CollectionTime
|
2016-04-02 07:13:21 +08:00
|
|
|
- /java.lang:type=GarbageCollector,name=ConcurrentMarkSweep/CollectionCount
|
2016-10-27 18:45:17 +08:00
|
|
|
- /java.lang:type=GarbageCollector,name=ParNew/CollectionTime
|
2016-04-02 07:13:21 +08:00
|
|
|
- /java.lang:type=GarbageCollector,name=ParNew/CollectionCount
|
|
|
|
|
|
2021-11-25 02:55:55 +08:00
|
|
|
### measurement = javaMemory
|
2016-04-02 07:13:21 +08:00
|
|
|
|
|
|
|
|
- /java.lang:type=Memory/HeapMemoryUsage
|
|
|
|
|
- /java.lang:type=Memory/NonHeapMemoryUsage
|
|
|
|
|
|
2021-11-25 02:55:55 +08:00
|
|
|
### measurement = cassandraCache
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2016-10-27 18:45:17 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=Cache,scope=KeyCache,name=Hits
|
2016-04-02 07:13:21 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=Cache,scope=KeyCache,name=Requests
|
|
|
|
|
- /org.apache.cassandra.metrics:type=Cache,scope=KeyCache,name=Entries
|
2016-10-27 18:45:17 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=Cache,scope=KeyCache,name=Size
|
|
|
|
|
- /org.apache.cassandra.metrics:type=Cache,scope=KeyCache,name=Capacity
|
|
|
|
|
- /org.apache.cassandra.metrics:type=Cache,scope=RowCache,name=Hits
|
|
|
|
|
- /org.apache.cassandra.metrics:type=Cache,scope=RowCache,name=Requests
|
2016-04-02 07:13:21 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=Cache,scope=RowCache,name=Entries
|
|
|
|
|
- /org.apache.cassandra.metrics:type=Cache,scope=RowCache,name=Size
|
|
|
|
|
- /org.apache.cassandra.metrics:type=Cache,scope=RowCache,name=Capacity
|
|
|
|
|
|
2021-11-25 02:55:55 +08:00
|
|
|
### measurement = cassandraClient
|
2016-04-02 07:13:21 +08:00
|
|
|
|
|
|
|
|
- /org.apache.cassandra.metrics:type=Client,name=connectedNativeClients
|
|
|
|
|
|
2021-11-25 02:55:55 +08:00
|
|
|
### measurement = cassandraClientRequest
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2016-10-27 18:45:17 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=TotalLatency
|
|
|
|
|
- /org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=TotalLatency
|
|
|
|
|
- /org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Latency
|
|
|
|
|
- /org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Latency
|
|
|
|
|
- /org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Timeouts
|
2016-04-02 07:13:21 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Timeouts
|
2016-10-27 18:45:17 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Unavailables
|
|
|
|
|
- /org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Unavailables
|
|
|
|
|
- /org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Failures
|
|
|
|
|
- /org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Failures
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2021-11-25 02:55:55 +08:00
|
|
|
### measurement = cassandraCommitLog
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2016-10-27 18:45:17 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=CommitLog,name=PendingTasks
|
2016-04-02 07:13:21 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=CommitLog,name=TotalCommitLogSize
|
|
|
|
|
|
2021-11-25 02:55:55 +08:00
|
|
|
### measurement = cassandraCompaction
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2016-10-27 18:45:17 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=Compaction,name=CompletedTasks
|
|
|
|
|
- /org.apache.cassandra.metrics:type=Compaction,name=PendingTasks
|
2016-04-02 07:13:21 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=Compaction,name=TotalCompactionsCompleted
|
|
|
|
|
- /org.apache.cassandra.metrics:type=Compaction,name=BytesCompacted
|
|
|
|
|
|
2021-11-25 02:55:55 +08:00
|
|
|
### measurement = cassandraStorage
|
2016-04-02 07:13:21 +08:00
|
|
|
|
|
|
|
|
- /org.apache.cassandra.metrics:type=Storage,name=Load
|
2019-08-06 04:57:15 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=Storage,name=Exceptions
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2021-11-25 02:55:55 +08:00
|
|
|
### measurement = cassandraTable
|
|
|
|
|
|
2022-06-08 05:10:18 +08:00
|
|
|
Using wildcards for "keyspace" and "scope" can create a lot of series as metrics
|
|
|
|
|
will be reported for every table and keyspace including internal system
|
|
|
|
|
tables. Specify a keyspace name and/or a table name to limit them.
|
2016-04-02 07:13:21 +08:00
|
|
|
|
|
|
|
|
- /org.apache.cassandra.metrics:type=Table,keyspace=\*,scope=\*,name=LiveDiskSpaceUsed
|
|
|
|
|
- /org.apache.cassandra.metrics:type=Table,keyspace=\*,scope=\*,name=TotalDiskSpaceUsed
|
|
|
|
|
- /org.apache.cassandra.metrics:type=Table,keyspace=\*,scope=\*,name=ReadLatency
|
2016-10-27 18:45:17 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=Table,keyspace=\*,scope=\*,name=CoordinatorReadLatency
|
|
|
|
|
- /org.apache.cassandra.metrics:type=Table,keyspace=\*,scope=\*,name=WriteLatency
|
|
|
|
|
- /org.apache.cassandra.metrics:type=Table,keyspace=\*,scope=\*,name=ReadTotalLatency
|
|
|
|
|
- /org.apache.cassandra.metrics:type=Table,keyspace=\*,scope=\*,name=WriteTotalLatency
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2021-11-25 02:55:55 +08:00
|
|
|
### measurement = cassandraThreadPools
|
2016-04-02 07:13:21 +08:00
|
|
|
|
2016-10-27 18:45:17 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=CompactionExecutor,name=ActiveTasks
|
|
|
|
|
- /org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=AntiEntropyStage,name=ActiveTasks
|
2021-11-25 02:55:55 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=CounterMutationStage,name=PendingTasks
|
|
|
|
|
- /org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=CounterMutationStage,name=CurrentlyBlockedTasks
|
2016-04-02 07:13:21 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=MutationStage,name=PendingTasks
|
2016-10-27 18:45:17 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=MutationStage,name=CurrentlyBlockedTasks
|
2016-04-02 07:13:21 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=ReadRepairStage,name=PendingTasks
|
2016-10-27 18:45:17 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=ReadRepairStage,name=CurrentlyBlockedTasks
|
2016-04-02 07:13:21 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=ReadStage,name=PendingTasks
|
2016-10-27 18:45:17 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=ReadStage,name=CurrentlyBlockedTasks
|
2021-11-25 02:55:55 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=RequestResponseStage,name=PendingTasks
|
2016-10-27 18:45:17 +08:00
|
|
|
- /org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=RequestResponseStage,name=CurrentlyBlockedTasks
|