我写了这篇 关于如何设置一个简单的 Cassandra 仪表板的帖子。它可能会有所帮助。
您要记录的所有指标都需要在 telegraf.conf 部分中定义[[input.cassandra]]
,例如:
[[inputs.cassandra]]
context = "/jolokia/read"
servers = [":8778"]
metrics = [
"/java.lang:type=Memory/HeapMemoryUsage",
"/java.lang:type=Memory/NonHeapMemoryUsage",
"/org.apache.cassandra.metrics:type=Storage,name=Load",
"/org.apache.cassandra.metrics:type=Storage,name=TotalHintsInProgress",
"/org.apache.cassandra.metrics:type=Storage,name=Exceptions",
"/org.apache.cassandra.metrics:type=ClientRequest,name=Latency,scope=*",
"/org.apache.cassandra.metrics:type=Client,name=connectedNativeClients",
"/org.apache.cassandra.metrics:type=CommitLog,name=PendingTasks",
"/org.apache.cassandra.metrics:type=CommitLog,name=TotalCommitLogSize",
"/org.apache.cassandra.metrics:type=ClientRequest,name=Timeouts,scope=*",
"/org.apache.cassandra.metrics:type=Compaction,name=BytesCompacted",
"/org.apache.cassandra.metrics:type=ColumnFamily,name=WriteLatency",
"/org.apache.cassandra.metrics:type=ColumnFamily,name=ReadLatency",
"/org.apache.cassandra.metrics:type=ColumnFamily,name=RangeLatency",
"/org.apache.cassandra.metrics:type=ColumnFamily,scope=*,name=AllMemtablesLiveDataSize,keyspace=*"
]
至于你的第二个问题:
- 定义一个面板来显示有关数据的信息(我不确定,在这种情况下,写入速率是什么意思)
- 转到警报配置部分中的警报选项卡并定义警报应该触发的条件
- 转到警报选项卡通知部分并添加您的电子邮件地址和消息。