Hawkular Metrics JAX-RS 2.0 API

JAX-RS 2.0 REST API Implementation

License

License

Categories

Categories

Metrics Application Testing & Monitoring Monitoring
GroupId

GroupId

org.hawkular.metrics
ArtifactId

ArtifactId

hawkular-metrics-api-jaxrs
Last Version

Last Version

0.31.2.Final
Release Date

Release Date

Type

Type

war
Description

Description

Hawkular Metrics JAX-RS 2.0 API
JAX-RS 2.0 REST API Implementation
Project Organization

Project Organization

Red Hat, Inc.

Download hawkular-metrics-api-jaxrs

How to add to project

<!-- https://jarcasting.com/artifacts/org.hawkular.metrics/hawkular-metrics-api-jaxrs/ -->
<dependency>
    <groupId>org.hawkular.metrics</groupId>
    <artifactId>hawkular-metrics-api-jaxrs</artifactId>
    <version>0.31.2.Final</version>
    <type>war</type>
</dependency>
// https://jarcasting.com/artifacts/org.hawkular.metrics/hawkular-metrics-api-jaxrs/
implementation 'org.hawkular.metrics:hawkular-metrics-api-jaxrs:0.31.2.Final'
// https://jarcasting.com/artifacts/org.hawkular.metrics/hawkular-metrics-api-jaxrs/
implementation ("org.hawkular.metrics:hawkular-metrics-api-jaxrs:0.31.2.Final")
'org.hawkular.metrics:hawkular-metrics-api-jaxrs:war:0.31.2.Final'
<dependency org="org.hawkular.metrics" name="hawkular-metrics-api-jaxrs" rev="0.31.2.Final">
  <artifact name="hawkular-metrics-api-jaxrs" type="war" />
</dependency>
@Grapes(
@Grab(group='org.hawkular.metrics', module='hawkular-metrics-api-jaxrs', version='0.31.2.Final')
)
libraryDependencies += "org.hawkular.metrics" % "hawkular-metrics-api-jaxrs" % "0.31.2.Final"
[org.hawkular.metrics/hawkular-metrics-api-jaxrs "0.31.2.Final"]

Dependencies

compile (4)

Group / Artifact Type Version
com.datastax.cassandra : cassandra-driver-core jar 3.3.0
org.hawkular.metrics : hawkular-metrics-api-util jar 0.31.2.Final
org.hawkular.metrics : hawkular-metrics-core-service jar 0.31.2.Final
org.hawkular.commons : hawkular-cors-jaxrs-filter jar 0.9.6.Final

provided (10)

Group / Artifact Type Version
org.jboss.resteasy : resteasy-jaxrs jar
org.jboss.resteasy : jaxrs-api jar 3.0.12.Final
com.fasterxml.jackson.core : jackson-databind jar 2.7.4
org.jboss.resteasy : resteasy-jackson2-provider jar
org.jboss.spec.javax.servlet : jboss-servlet-api_3.1_spec jar
javax.enterprise : cdi-api jar 1.2
org.jboss.logging : jboss-logging-processor jar 2.0.1.Final
io.undertow : undertow-servlet jar
io.swagger : swagger-annotations jar 1.5.8
io.swagger : swagger-core jar 1.5.8

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.mockito : mockito-core jar 1.10.19

Project Modules

There are no modules declared in this project.

Hawkular Metrics, a storage engine for metric data

Build Status
Coverity Scan Build Status (coverity_scan branch)

About

Hawkular Metrics is the metric data storage engine part of Hawkular community.

It relies on Apache Cassandra as a backend and is comprised of:

  • a core library

  • a REST/HTTP interface

Important
Cassandra 3.0.12 or later is required.

The core library

A Java library, built with RxJava on top of the Cassandra Java driver.

This is for advanced users only, for embedding the core functionality in another project.

REST/HTTP interface

Most users will work with the web application. It exposes a REST/HTTP interface based on the core library. It is implemented with the JAX-RS 2 asynchronous API and runs on a Wildfly 10 server. The data format is JSON.

Goals

Simple, easy to use REST interface

The REST API should be easy to use. Users should be able to send data with the simplest tools: shell scripts and curl.

Getting started with a release build

There are a couple of options for running Hawkular Metrics:

  • WildFly distribution

  • EAR distribution

Important
Earlier versions of Hawkular Metrics could be run by deploying hawkular-metrics-api-jaxrs-X.Y.Z.war. This is longer supported.

The WildFly distribution is a pre-configured WildFly 10 server that includes Hawkular Alerts in addition to Hawkular Metrics. Check out the Metrics releases page and download the latest version of hawkular-metrics-wildfly-standalone-X.Y.Z.Final.tar.gz.

The EAR distribution includes both Hawkular Metrics and Hawkular Alerts. Check out the Metrics releases page and download the latest version of hawkular-metrics-standalone-dist-X.Y.Z.Final.ear. Copy the EAR file to the standalone/deployments directory. You will have to manually configure WildFly.

The following cache container declarations are needed in the infinispan subsection:

<cache-container name="hawkular-alerts" default-cache="triggers" statistics-enabled="true">
      <local-cache name="partition"/>
      <local-cache name="triggers"/>
      <local-cache name="data"/>
      <local-cache name="publish"/>
      <local-cache name="schema"/>
      <local-cache name="dataIds"/>
      <local-cache name="globalActions"/>
</cache-container>
<cache-container name="hawkular-metrics" default-cache="triggers" statistics-enabled="true">
        <local-cache name="locks"/>
</cache-container>

If you are running a cluster of WildFly servers in HA mode, then you will instead want to edit standalone-ha.xml, adding the following cache containers:

<cache-container name="hawkular-alerts" default-cache="triggers" statistics-enabled="true">
        <transport lock-timeout="60000"/>
        <replicated-cache name="partition" mode="SYNC">
               <transaction mode="BATCH"/>
        </replicated-cache>
        <replicated-cache name="triggers" mode="ASYNC">
               <transaction mode="BATCH"/>
        </replicated-cache>
        <replicated-cache name="data" mode="ASYNC">
               <transaction mode="BATCH"/>
        </replicated-cache>
        <replicated-cache name="publish" mode="ASYNC">
               <transaction mode="BATCH"/>
        </replicated-cache>
        <replicated-cache name="schema" mode="SYNC">
               <transaction mode="NON_XA"/>
        </replicated-cache>
        <replicated-cache name="dataIds" mode="ASYNC">
               <transaction mode="BATCH"/>
        </replicated-cache>
        <replicated-cache name="globalActions" mode="ASYNC">
               <transaction mode="BATCH"/>
        </replicated-cache>
</cache-container>
<cache-container name="hawkular-metrics" default-cache="triggers" statistics-enabled="true">
        <transport lock-timeout="60000"/>
        <replicated-cache name="locks" mode="SYNC">
               <transaction mode="NON_XA" locking="PESSIMISTIC"/>
        </replicated-cache>
</cache-container>

By default, Metrics will try to connect to a Cassandra on localhost. If you want to start a Cassandra server embedded in WildFly for testing, add the hawkular-metrics-embedded-cassandra-ear-X.Y.Z.ear archive to the standalone/deployments directory.

Build Instructions

Important
A running Cassandra cluster, which can be a single node, is required for unit and integration tests.
git clone [email protected]:hawkular/hawkular-metrics.git
cd hawkular-metrics
./mvnw install
Tip
If you only want to build the sources without a running C* cluster, you can run ./mvnw install -DskipTests.

Setting up Cassandra for development or testing

For development or testing, the easiest way to setup Cassandra is to use the Cassandra Cluster Manager, CCM.

ccm create -v 3.0.12 -n 1 -s hawkular

These steps build and start a single node cluster of Cassandra. Note that while it is recommended to use ccm, it is not necessary. You just need to make sure you have a running 3.0.12 cluster.

Client tools

If you want to send or fetch metrics from your own application, there are client libraries available to assist:

Working with monitoring tools

You can send data collected with your usual monitoring tools to Hawkular Metrics:

  • collectd

  • ganglia

  • jmxtrans

  • statsd

In order to do so, you must start our network protocol adapter, ptrans.

Contributing & Community

If you are a user of Hawkular Metrics please ask your question in the Hawkular user forum. To contribute or participate in design discussion, please use the Hawkular developer mailing list.

We love contributions and pull-requests :-)

To file an issue, please use the Hawkular-Metrics JIRA.

To chat, join us on Freenode IRC in channel #hawkular. If you can not use the irc protocol, you can also use a web to irc gateway like Web chat on Freenode.

Hawkular-Metrics is @hawkular_org on Twitter.

org.hawkular.metrics

Hawkular

Monitoring services: Metrics, Alerting, Inventory, Application Performance Management

Versions

Version
0.31.2.Final
0.31.1.Final
0.31.0.Final
0.30.7.Final
0.30.6.Final
0.30.5.Final
0.30.4.Final
0.30.3.Final
0.30.2.Final
0.30.1.Final
0.30.0.Final
0.29.3.Final
0.29.2.Final
0.29.1.Final
0.29.0.Final
0.28.8.Final
0.28.7.Final
0.28.6.Final
0.28.5.Final
0.28.4.Final
0.28.3.Final
0.28.2.Final
0.28.1.Final
0.28.0.Final
0.27.9.Final
0.27.8.Final
0.27.7.Final
0.27.6.Final
0.27.5.Final
0.27.4.Final
0.27.3.Final
0.27.2.Final
0.27.1.Final
0.27.0.Final
0.26.2.Final
0.26.1.Final
0.26.0.Final
0.25.0.Final
0.24.1.Final
0.24.0.Final
0.23.13.Final
0.23.12.Final
0.23.11.Final
0.23.9.Final
0.23.8.Final
0.23.7.Final
0.23.6.Final
0.23.5.Final
0.23.4.Final
0.23.3.Final
0.23.2.Final
0.23.1.Final
0.23.0.Final
0.22.0.Final
0.21.15.Final
0.21.14.Final
0.21.13.Final
0.21.12.Final
0.21.11.Final
0.21.10.Final
0.21.9.Final
0.21.7.Final
0.21.6.Final
0.21.5.Final
0.21.4.Final
0.21.3.Final
0.21.2.Final
0.21.1.Final
0.21.0.Final
0.20.1.Final
0.20.0.Final
0.19.3.Final
0.19.2.Final
0.19.1.Final
0.19.0.Final
0.18.5.Final
0.18.4.Final
0.18.3.Final
0.18.2.Final
0.18.1.Final
0.18.0.Final
0.17.0.Final
0.16.0.Final
0.15.0.Final
0.14.0.Final
0.13.0.Final
0.12.1.Final
0.12.0.Final
0.11.0.Final
0.10.0.Final
0.9.0.Final
0.8.1.Final
0.8.0.Final
0.7.0.Final
0.6.0.Final
0.5.0.Final
0.4.0.Final
0.3.4
0.3.3
0.3.2
0.3.1