You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Jun Wu <wu...@hotmail.com> on 2016/06/13 21:17:58 UTC
How to print out the metrics information, like compaction and
garbage collection?
Hi there,
I've deployed 6 node in Amazon EC2. I'm trying to monitor some metrics for each node and print them out when I write/read data into Cassandra. Specifically I want to print out the information about garbage collection and compaction.
I do notice that there's metrics for compaction in o.a.c.metrics. CompactionMetrics.java. But I don't know how to get them, I've tried method below: CompactionMetrics metrics = new CompactionMetrics(); System.out.println(metrics.pendingtasks);
But it doesn't work.
************* Another/same question is about the garbage collection, any idea on where should I refer to and get the information about garbage collection, like garbage collection count, collection time, etc.
Any hint will be appreciated.
Thanks!
Jun
Re: How to print out the metrics information, like compaction and
garbage collection?
Posted by Alain RODRIGUEZ <ar...@gmail.com>.
Hi Jun,
In case you did not solved your issue yet:
Metrics are exposed through JMX. Any jmx tool will allow you to read those
metrics.
For a more automated and interesting usage (creating dashboards etc), you
can use a metric reporter as described for graphite there:
http://www.datastax.com/dev/blog/pluggable-metrics-reporting-in-cassandra-2-0-2
.
Also as Otis mentioned, some "agents" from monitoring as a service
platforms take care of this.
It depends on what you have in mind :-).
C*heers,
-----------------------
Alain Rodriguez - alain@thelastpickle.com
France
The Last Pickle - Apache Cassandra Consulting
http://www.thelastpickle.com
2016-06-14 21:24 GMT+02:00 Jun Wu <wu...@hotmail.com>:
> Hi Otis,
>
> Thank you so much for the reply. I do appreciate it.
>
> Actually, I've tried the sematext spm few days ago:) It works well and
> is easy to deploy.
>
> However, in the monitoring output figure for different metrics, the
> interval is 1 minute, which is longer than I want. What I want is something
> like one metric value / second and I want to have a close eye on each
> metric.
>
> That's why I post question and want to print out the metrics
> information in the console.
>
> I'm wondering whether you have any other solution for my question.
>
> Thanks!
>
> Jun
>
> ------------------------------
> From: otis.gospodnetic@gmail.com
> Date: Tue, 14 Jun 2016 15:01:20 -0400
> Subject: Re: How to print out the metrics information, like compaction and
> garbage collection?
> To: user@cassandra.apache.org
>
>
> Hi Jun,
>
> Here's a tool for dumping JMX contents: https://github.com/sematext/jmxc
> Here's a tool/service for monitoring Cassandra:
> https://sematext.com/spm/integrations/cassandra-monitoring/
>
> Otis
> --
> Monitoring - Log Management - Alerting - Anomaly Detection
> Solr & Elasticsearch Consulting Support Training - http://sematext.com/
>
>
> On Mon, Jun 13, 2016 at 5:17 PM, Jun Wu <wu...@hotmail.com> wrote:
>
> Hi there,
>
> I've deployed 6 node in Amazon EC2. I'm trying to monitor some metrics
> for each node and print them out when I write/read data into Cassandra.
> Specifically I want to print out the information about garbage collection
> and compaction.
>
> I do notice that there's metrics for compaction in o.a.c.metrics.
> CompactionMetrics.java. But I don't know how to get them, I've tried method
> below:
>
> CompactionMetrics metrics = new CompactionMetrics();
> System.out.println(metrics.pendingtasks);
>
> But it doesn't work.
>
> *************
> Another/same question is about the garbage collection, any idea on where
> should I refer to and get the information about garbage collection, like
> garbage collection count, collection time, etc.
>
> Any hint will be appreciated.
>
> Thanks!
>
> Jun
>
>
>
RE: How to print out the metrics information, like compaction and
garbage collection?
Posted by Jun Wu <wu...@hotmail.com>.
Hi Otis,
Thank you so much for the reply. I do appreciate it.
Actually, I've tried the sematext spm few days ago:) It works well and is easy to deploy.
However, in the monitoring output figure for different metrics, the interval is 1 minute, which is longer than I want. What I want is something like one metric value / second and I want to have a close eye on each metric.
That's why I post question and want to print out the metrics information in the console.
I'm wondering whether you have any other solution for my question.
Thanks!
Jun
From: otis.gospodnetic@gmail.com
Date: Tue, 14 Jun 2016 15:01:20 -0400
Subject: Re: How to print out the metrics information, like compaction and garbage collection?
To: user@cassandra.apache.org
Hi Jun,
Here's a tool for dumping JMX contents: https://github.com/sematext/jmxcHere's a tool/service for monitoring Cassandra: https://sematext.com/spm/integrations/cassandra-monitoring/Otis
--
Monitoring - Log Management - Alerting - Anomaly DetectionSolr & Elasticsearch Consulting Support Training - http://sematext.com/
On Mon, Jun 13, 2016 at 5:17 PM, Jun Wu <wu...@hotmail.com> wrote:
Hi there,
I've deployed 6 node in Amazon EC2. I'm trying to monitor some metrics for each node and print them out when I write/read data into Cassandra. Specifically I want to print out the information about garbage collection and compaction.
I do notice that there's metrics for compaction in o.a.c.metrics. CompactionMetrics.java. But I don't know how to get them, I've tried method below: CompactionMetrics metrics = new CompactionMetrics(); System.out.println(metrics.pendingtasks);
But it doesn't work.
************* Another/same question is about the garbage collection, any idea on where should I refer to and get the information about garbage collection, like garbage collection count, collection time, etc.
Any hint will be appreciated.
Thanks!
Jun
Re: How to print out the metrics information, like compaction and
garbage collection?
Posted by Otis Gospodnetić <ot...@gmail.com>.
Hi Jun,
Here's a tool for dumping JMX contents: https://github.com/sematext/jmxc
Here's a tool/service for monitoring Cassandra:
https://sematext.com/spm/integrations/cassandra-monitoring/
Otis
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/
On Mon, Jun 13, 2016 at 5:17 PM, Jun Wu <wu...@hotmail.com> wrote:
> Hi there,
>
> I've deployed 6 node in Amazon EC2. I'm trying to monitor some metrics
> for each node and print them out when I write/read data into Cassandra.
> Specifically I want to print out the information about garbage collection
> and compaction.
>
> I do notice that there's metrics for compaction in o.a.c.metrics.
> CompactionMetrics.java. But I don't know how to get them, I've tried method
> below:
>
> CompactionMetrics metrics = new CompactionMetrics();
> System.out.println(metrics.pendingtasks);
>
> But it doesn't work.
>
> *************
> Another/same question is about the garbage collection, any idea on where
> should I refer to and get the information about garbage collection, like
> garbage collection count, collection time, etc.
>
> Any hint will be appreciated.
>
> Thanks!
>
> Jun
>