Vertx Metrics programmatically accessible without DropWizard?

277 views
Skip to first unread message

Hakan Kiyar

unread,
Sep 20, 2016, 9:11:00 AM9/20/16
to vert.x
Hi,

first of all I have managed to monitor my Verticles with Hawkular but the project leader doesnt liked it much since he wanted a lightweight and straightforward solution with JMX.


So he want to create a MicroService which collects all Metric and Logging Data from JMXEndpoints which should be the productive MicroServices. The JMX-MicroService itself  should write the stuff in a CassandraDatabase which then later be accessed somehow from grafana.

My concern is first collecting the JMX-data:

To enable Vertx Metrics over JMX do I have to use DropWizard?

I know how to programmatically access data from MBeans - can I access Vertx Metrics Data the same way?

Or have somebody a better and more lightweight way?

Any Help is welcome! Thanks!

Thomas SEGISMONT

unread,
Sep 20, 2016, 11:42:14 AM9/20/16
to ve...@googlegroups.com
Cy
2016-09-20 15:11 GMT+02:00 Hakan Kiyar <lauda...@gmail.com>:
Hi,

first of all I have managed to monitor my Verticles with Hawkular but the project leader doesnt liked it much since he wanted a lightweight and straightforward solution with JMX.


Reporting monitoring data to an external database and running a service to expose this data to a dashboard solution involves too much components to be straightforward.

I suggest you try again with a Hawkular Metrics standalone server which seems to be all you need.
 

So he want to create a MicroService which collects all Metric and Logging Data from JMXEndpoints which should be the productive MicroServices. The JMX-MicroService itself  should write the stuff in a CassandraDatabase which then later be accessed somehow from grafana.

Be careful with the "somehow". The "somehow" is provided by Hawkular. If you want to do it yourself that's fine but it's not a matter of 10 LOC.
 

My concern is first collecting the JMX-data:

To enable Vertx Metrics over JMX do I have to use DropWizard?

If you want Vert.x Metrics exposed as MBeans, yes, you need vertx-dropwizard. vertx-hawkular does not do provide this (yet).
 

I know how to programmatically access data from MBeans - can I access Vertx Metrics Data the same way?


Yes. However the easiest way to the Metric data is with the MetricService
http://vertx.io/docs/vertx-dropwizard-metrics/java/#_metrics_service

 

Or have somebody a better and more lightweight way?

Define lightweight. As an alternative to vertx-hawkular combined with Hawkular Metrics, you could use:

- vertx-dropwizard and add a Graphite reporter http://metrics.dropwizard.io/3.1.0/manual/graphite/
- Graphite with Cyanite backend http://cyanite.io/
- Grafana with Graphite datasource

 

Any Help is welcome! Thanks!

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/8c98f9e5-3a57-480c-8cf0-c76431350a26%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hakan Kiyar

unread,
Sep 21, 2016, 6:18:21 PM9/21/16
to vert.x
Thanks for your answer!


Now I managed to collect some JMX-data programmatically and save it to the CassandraDB. I have MicroServices with provide as JMX-Endpoints metric data (with DropWizard) and one MicroService which collect as JMXClient these data. For now I used only a small JMX-samle data set and all MicroServices are local that means under the same Java Virtual Machine. 

Now I want to visualize these data which were located in the CassandraDB in Grafana or another dashboard tool. Is there an recommended way? 

You said that this is not a matter of 10 LOC - what do you mean with that?

Thanks for your help.


Am Dienstag, 20. September 2016 17:42:14 UTC+2 schrieb Thomas Segismont:
Cy
2016-09-20 15:11 GMT+02:00 Hakan Kiyar <lauda...@gmail.com>:
Hi,

first of all I have managed to monitor my Verticles with Hawkular but the project leader doesnt liked it much since he wanted a lightweight and straightforward solution with JMX.


Reporting monitoring data to an external database and running a service to expose this data to a dashboard solution involves too much components to be straightforward.

I suggest you try again with a Hawkular Metrics standalone server which seems to be all you need.
 

So he want to create a MicroService which collects all Metric and Logging Data from JMXEndpoints which should be the productive MicroServices. The JMX-MicroService itself  should write the stuff in a CassandraDatabase which then later be accessed somehow from grafana.

Be careful with the "somehow". The "somehow" is provided by Hawkular. If you want to do it yourself that's fine but it's not a matter of 10 LOC.
 

My concern is first collecting the JMX-data:

To enable Vertx Metrics over JMX do I have to use DropWizard?

If you want Vert.x Metrics exposed as MBeans, yes, you need vertx-dropwizard. vertx-hawkular does not do provide this (yet).
 

I know how to programmatically access data from MBeans - can I access Vertx Metrics Data the same way?


Yes. However the easiest way to the Metric data is with the MetricService
http://vertx.io/docs/vertx-dropwizard-metrics/java/#_metrics_service

 

Or have somebody a better and more lightweight way?

Define lightweight. As an alternative to vertx-hawkular combined with Hawkular Metrics, you could use:

- vertx-dropwizard and add a Graphite reporter http://metrics.dropwizard.io/3.1.0/manual/graphite/
- Graphite with Cyanite backend http://cyanite.io/
- Grafana with Graphite datasource

 

Any Help is welcome! Thanks!

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.

Thomas SEGISMONT

unread,
Sep 23, 2016, 6:36:37 AM9/23/16
to ve...@googlegroups.com
2016-09-22 0:18 GMT+02:00 Hakan Kiyar <lauda...@gmail.com>:
Thanks for your answer!


Now I managed to collect some JMX-data programmatically and save it to the CassandraDB. I have MicroServices with provide as JMX-Endpoints metric data (with DropWizard) and one MicroService which collect as JMXClient these data. For now I used only a small JMX-samle data set and all MicroServices are local that means under the same Java Virtual Machine. 

Now I want to visualize these data which were located in the CassandraDB in Grafana or another dashboard tool. Is there an recommended way? 


What you could do is creating a custom Grafana datasource pointing to an HTTP service that would load data from Cassandra. But this is not a Vert.x related problem so please read the Grafana docs and ask for help in their forums.

 
You said that this is not a matter of 10 LOC - what do you mean with that?

You have to write a Grafana datasource plugin plus a backend service to load data from Cassandra. This is not something you can do with 10 lines of code.

You need to determine if maintaining those components yourself makes more sense than reusing existing monitoring tools.
 
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages