javalocalhostmetricsvert.xhawkular

Hawkular And Vertx: Why the new installed Hawkular Metric Server does not receive any metrics?


my goal is to visualize vertx metrics - like for example the counts of messages, which are sent over eventbus and so on. (please consider thath the following tools are all together on my localhost, nothing resides on separated machines)

Therefor I have used the Hawkular implementation of vertx: http://vertx.io/docs/vertx-hawkular-metrics/java/

First I installed CassandraDB with default settings:

http://www.planetcassandra.org/cassandra/

To build the Hawkular Metrics-alone Server I took an WildFly 10 and deployed the Metrics-warFile from here: https://github.com/hawkular/hawkular-metrics/releases/

When I now start the wildfly server I got under the url :http://localhost:8080/hawkular/metrics the starter screen with "Metrics Service started".

Until now all seem to be running fine....

Now I want to insert metric data - for that i programmed an short verticle with HawkularAPI:

public class Sender extends AbstractVerticle {

    public static void main(String[] args) {

        VertxOptions options = new VertxOptions();
        VertxHawkularOptions hawkularOptions = new   VertxHawkularOptions().setEnabled(true).setTenant("hawkular").setHost("localhost").setPort(8080);

        options.setMetricsOptions(hawkularOptions);

        Vertx.clusteredVertx(options, res -> {
            Vertx vertx = res.result();
            vertx.deployVerticle(new Sender());
        });
    }

    @Override
    public void start() throws Exception {

        vertx.setPeriodic(1500, id -> {
            vertx.eventBus().send("test", "testSend");
            System.out.println("SEND!");

        });
    }
}

But nothing happens - have i missed something? My opinion was that I perhaps can see some charts for example by hitting :http://localhost:8080/hawkular/metrics /counter/vertx etc....instead of graphics I get following ErrorMessage:

{"errorMsg":"Tenant is not specified. Use 'Hawkular-Tenant' header."} 

Solution

  • Hawkular Metrics does not provide charts. You need to start a graphical client like Grafana.

    See http://www.hawkular.org/hawkular-clients/grafana/docs/quickstart-guide/