Vertx Monitoring - No clue how to manage that......

1,473 views
Skip to first unread message

lauda...@gmail.com

unread,
Sep 1, 2016, 5:45:58 PM9/1/16
to vert.x
Hi, 


im programmed some plain verticles with vertx-core and I am very confused about which monitoring tool should be used, if you just want to monitor plain verticles.
Is there any possibility to  monitor the event bus, what is useful for faster finding of eventbus-bottlenecks in your distributed vertx microservices and visualize it?
Im very new in monitoring, so any advice is welcome.

dominik....@trivago.com

unread,
Sep 2, 2016, 8:19:20 AM9/2/16
to vert.x
A first starting point would be to use something like the dropwizard metrics integration. For starters, you could simply print out the metrics of your application every few seconds on the command line:

public class MetricsVerticle extends AbstractVerticle {
    @Override
    public void start() {

        MetricsService service = MetricsService.create(vertx);
        
        vertx.setPeriodic(30_000, h-> {
          System.out.println(Json.encodePrettily(service.getMetricsSnapshot("vertx")));
        });
}}

And then deploy that verticle.

Don't forget to tell vert.x, which event handlers to monitor: http://vertx.io/docs/vertx-dropwizard-metrics/java/#_event_bus_metrics

If you want integration with other monitoring tools, just build a respective page or endpoint or whatever is needed, which can be polled by your monitoring.

As a start, this should give you a good indication about which metrics are available and which ones are relevant for you.

Clement Escoffier

unread,
Sep 3, 2016, 2:14:19 AM9/3/16
to ve...@googlegroups.com
Hi,

Today, Vert.x provides 2 metrics support:

* Dropwizard (JMX)
* Hawkular

Let’s take the first one (let me know if you are using Hawkular). First you need to add the dropwizard support to your project (http://vertx.io/docs/vertx-dropwizard-metrics/java/). You probably want to enable JMX. 

Once it’s done, you can connect to your VM using a JMX explorer (VisualVM, JConsole…) and get the measured data. If you want to export this data you can configure JMX to be available remotely or use Jolokia exposing JMX as REST. We also provide instructions to use Hawtio (to build a dashboard) or Nagios. 

If you want to build a Grafana dashboard, use JMXTrans to pull your JMX data and write it to InfluxDB (the database read by Grafana). There is also a way to import JMX data exposed by Jolokia to influxDB (telegraf plugin) but I never used it.

Clement


--
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.
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/2eef47d3-4799-40c1-a8b5-dcb2534f66bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thomas SEGISMONT

unread,
Sep 3, 2016, 2:14:33 AM9/3/16
to ve...@googlegroups.com
Have you checked the devops section in the docs? http://vertx.io/docs/#devops

There are two Metrics SPI implementations in the official stack:
- one which creates Dropwizard metrics
- another which reports metric data to Hawkular


With Dropwizard, you can must configure a reporter to store the data in the monitoring solution of your choice. Monitoring solutions often provide visualizations/dashboards.
You can also enable the JMX reporter to get live data.


--
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.

Julien Viet

unread,
Sep 3, 2016, 2:34:15 AM9/3/16
to ve...@googlegroups.com
there are also two other implementations listed in https://github.com/vert-x3/vertx-awesome : OpenTSDB and Bosun.

To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.

lauda...@gmail.com

unread,
Sep 7, 2016, 11:19:18 AM9/7/16
to vert.x
Thanks for all answers.

But is it possible to additionally visualize the vertx data which I got in the MBeans tab?  
Message has been deleted

Thomas SEGISMONT

unread,
Sep 8, 2016, 9:12:31 AM9/8/16
to ve...@googlegroups.com
Yes, you will be able to visualize your data with Grafana if you use the Hawkular Metrics SPI implementation.

Otherwise with the Dropwizard SPI impl:
- you can either use JMXTrans, as Clément said, to export data to Graphite (for example)
- or configure the MetricsRegistry to use a reporter

Then Grafana can connect to the monitoring solution to get the data.

2016-09-07 21:36 GMT+02:00 Hakan Kiyar <lauda...@gmail.com>:
Hi Clement, 

i have managed to get the measured data in VisualVM (under the MBeans Tab), but i want to visualize the vertx data  e.g. in Grafana. I just do no want to see numbers - Hawkular seems for me the easier way to achieve that - for that you only have to install up a hawkular server and a cassandra server and then turn on the hawkular Options in your verticle - and thats it or not? Or do you know an esier way ? 
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