Giter Site home page Giter Site logo

servo-influxdb's Introduction

Running Tests

mvn test
mvn test -P unit-tests
mvn test -P integration-tests
mvn test -P all-tests

Deploy Binaries to the mvn-repo branch

mvn deploy __

Deply Site to the gh-pages branch

mvn site-deploy

mvn sprint-boot:run mvn spring-boot:run -Drun.jvmArguments="-Dspring.profiles.active=microservice1โ€ mvn sonar:sonar -Dsonar.host.url=http://192.168.99.100:9000 -Dsonar.jdbc.url="jdbc:h2:tcp://192.168.99.100/sonar" -Dsonar.jdbc.username=sonar -Dsonar.jdbc.password=sonar -Dsonar.profile=


A Servo and InfluxDB Integration.

  • Servo is an Open-Source application monitoring library by Netflix
  • InfluxDB is a scalable datastore for metrics, events, and real-time analytics

Description

  • Publishes exposed application and JVM metrics to an external InfluxDB.
  • An implementation of the Servo's MetricObserver to forward metrics data to an InfluxDB database.

Main Features

  • Batch support
  • Configurable

Wishlist

  • Retries

Continuous Integration TravisCI
Test Coverage COVERALLS

Example

import java.util.concurrent.TimeUnit;

import com.google.common.collect.Lists;
import com.netflix.servo.publish.BasicMetricFilter;
import com.netflix.servo.publish.JvmMetricPoller;
import com.netflix.servo.publish.MetricPoller;
import com.netflix.servo.publish.MonitorRegistryMetricPoller;
import com.netflix.servo.publish.PollRunnable;
import com.netflix.servo.publish.PollScheduler;
import com.polymathiccoder.servo.publish.influxdb.InfluxDBMetricObserver;
import com.polymathiccoder.servo.publish.influxdb.operations.InfluxDBConnection;
import com.polymathiccoder.servo.publish.influxdb.operations.InfluxDBOperations;
import com.polymathiccoder.servo.publish.influxdb.util.NetflixServoUtils;
import com.polymathiccoder.servo.publish.influxdb.util.SampleData;

public class Main {
    public static void main(String[] args) {
        // Observers
        final InfluxDBConnection influxDBConnection = InfluxDBConnection.create(SampleData.getInfluxDBConfiguration());
        final InfluxDBOperations influxDBOperations = new InfluxDBOperations(influxDBConnection);
        final InfluxDBMetricObserver influxDBMetricObserver = new InfluxDBMetricObserver(
                influxDBOperations,
                NetflixServoUtils.commonTagsDecoration());

        // Pollers
        MetricPoller monitorRegistryMetricPoller = new MonitorRegistryMetricPoller();
        MetricPoller JvmMetricPoller = new JvmMetricPoller();

        // Schedulers
        final PollScheduler pollScheduler = PollScheduler.getInstance();
        pollScheduler.start();

        final PollRunnable jvmMetricsTask = new PollRunnable(
                JvmMetricPoller,
                BasicMetricFilter.MATCH_ALL,
                true,
                Lists.newArrayList(
                        influxDBMetricObserver));
        pollScheduler.addPoller(jvmMetricsTask, 3, TimeUnit.SECONDS);

        final PollRunnable monitorRegistryMetricsTask = new PollRunnable(
                monitorRegistryMetricPoller,
                BasicMetricFilter.MATCH_ALL,
                true,
                Lists.newArrayList(
                        influxDBMetricObserver));
        pollScheduler.addPoller(monitorRegistryMetricsTask, 3, TimeUnit.SECONDS);
    }
}

servo-influxdb's People

Contributors

polymathiccoder avatar

Stargazers

 avatar

Watchers

 avatar  avatar

servo-influxdb's Issues

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.