Rj1
Rj1

Reputation: 469

Why am I not getting all cassandra metrics in grafana?

We are using Apache Cassandra(not datastax version) db. And for monitoring purpose , we are using jolokia's REST APIs to retrieve cassandra metrics.

All the jolokia APIs are working fine, means I can get all the metrics by using jolokia's rest APIs. We are also using telegraf, telegraf collects the metrics from jolokia and forwards them into InfluxDB.

But when I add influxdb connection in grafana with 'telegraf' db then grafana is not showing me all the metrics(showing only 5-6 metrics).

I am able to call all the jolokia APIs through rest client which returns JSON response of cassandra metrics but through grafana I can see only few metrics.

What changes I need to make in telegraf's config to get all the metrics in grafana? And I also need to set alerts like if per second write rate in cassandra exceeds to 1k then it should notify me through mail. So how can I do this ?

Thanks in advance?

Upvotes: 0

Views: 776

Answers (1)

Andrea Nagy
Andrea Nagy

Reputation: 1231

I wrote this post on how to setup a simple Cassandra dashboard. It might help.

All metrics you would like to record needs to be defined in the telegraf.conf in the [[input.cassandra]] section˙, e.g:

  [[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=*" 
]

As for your second question:

  • define a panel for displaying information regarding the data (I am not sure, what do you mean by write rate in this case)
  • go to the Alert tab in the Alert config section and define your condition when the alert supposed to trigger
  • go to the Alert tab Notification section and add your email address and message.

Upvotes: 1

Related Questions