Giter Club home page Giter Club logo

arecibo's Introduction

Overview

  1. To build

    mvn clean install

  2. Detailed documentation: see https://github.com/ning/Arecibo/wiki

Collector

The collector gathers and stores data sent by the agents to the datastore (MySQL by default). It supports multiple APIs, including REST over HTTP and UDP.

Before starting the collector, you need to create a database first, e.g.:

~ > echo 'create database arecibo' | mysql -u root -p
Enter password:
~ > cat collector/src/main/resources/collector.sql | mysql -u root -p arecibo
Enter password:

To start the collector, assuming MySQL is running locally:

java \
    -Dcom.sun.management.jmxremote.authenticate=false \
    -Dcom.sun.management.jmxremote.port=8990 \
    -Dcom.sun.management.jmxremote.ssl=false \
    -Darecibo.events.collector.db.url=jdbc:mysql://127.0.0.1:3306/arecibo \
    -Darecibo.events.collector.db.user=root \
    -Darecibo.events.collector.db.password=root
    -jar target/arecibo-collector-*-jar-with-dependencies.jar

To send data via the REST API, send JSON payloads to /xn/rest/1.0/event, e.g. (send 2 data points):

echo "
{
    \"timestamp\": $(date +%s)000,
    \"eventType\": \"testEvent\",
    \"sourceUUID\": \"550e8400-e29b-41d4-a716-446655440000\",
    \"min_heapUsed\": $RANDOM.515698888E9,
    \"max_heapUsed\": $RANDOM.835511784E9
}" | \
curl -v -H'Content-Type: application/json' -XPOST -d@- http://127.0.0.1:8088/xn/rest/1.0/event

Data is exposed in JSON format, e.g.:

curl -v http://127.0.0.1:8088/rest/1.0/hosts

See com.ning.arecibo.collector.resources for available endpoints.

For convenience, there is a Java library to access the data (see the collector-client-support module).

Dashboard

The dashboard module exposes graphs of collected metrics. It relies on a collector to access the data (using the collector REST api) and can be configured to use the alertmanager (disabled by default).

To start the dashboard, assuming the collector is at http://127.0.0.1:8088:

mvn \
    -Dcom.sun.management.jmxremote.authenticate=false \
    -Dcom.sun.management.jmxremote.port=8989 \
    -Dcom.sun.management.jmxremote.ssl=false \
    -Darecibo.collectorClient.collectorUri=http://127.0.0.1:8088 \
    jetty:run

You can test it by hitting the dashboard's endpoints, e.g.:

curl -v http://127.0.0.1:8080/rest/1.0/hosts

Note that the output is not JSON, but JSONP, for the dashboard AJAX requests. To get straight JSON, use the collector endpoints instead, e.g.:

curl -v http://127.0.0.1:8088/rest/1.0/hosts

arecibo's People

Contributors

dstryker avatar pierre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.