Giter Site home page Giter Site logo

stackdriver-emitter's Introduction

Stackdriver Emitter Plugin for Druid

Custom extension for sending metric events from Apache Druid to Google Stackdriver.

Getting it working in Druid

Run mvn package to create a .jar file that contains all dependencies.

The generated .jar file needs to be copied into druids extensions/ directory (for example into /app/druid/extensions/stackdriver-emitter/).

When running druid it should automatically detect and execute this extension.

Stackdriver Authentication in GKE

To authenticate to the Stackdriver API the GOOGLE_APPLICATION_CREDENTIALS environment variable needs to be set pointing to the .json file with the necessary credentials.

To set these credentials in GKE the following steps are necessary:

See https://stackoverflow.com/questions/47021469/how-to-set-google-application-credentials-on-gke-running-through-kubernetes

Configuration

Configuration parameters for the plugin that can be set in the config file (eg. common.runtime.properties):

druid.emitter=stackdriver

# number of events sent together in one request to Stackdriver
druid.emitter.stackdriver.flushThreshold=5

# max. queue size for event queue
druid.emitter.stackdriver.maxQueueSize=1000

# frequency in ms of sending collected events to Stackdriver
druid.emitter.stackdriver.consumeDelay=60000

# Stackdriver project ID
druid.emitter.stackdriver.projectId=streaming-events-dev

# optionally, file with whitelist of druid events that should be processed
druid.emitter.stackdriver.metricMapPath=/app/druid/extensions/stackdriver-emitter/defaultMetrics.json

The extension must also be registered in the config file:

druid.extensions.loadList=[..., "stackdriver-emitter", ...]

Metrics in Stackdriver

The emitted metric events should appear in Stackdriver:

Screenshot metrics in Stackdriver

Resources

stackdriver-emitter's People

Contributors

scholtzan avatar

Stargazers

Zhiya Luo avatar pramitmarattha avatar

Watchers

Jeff Klukas avatar James Cloos avatar

stackdriver-emitter's Issues

CredentialsProvider class

Instead of reading and unwrapping the Google credentials inside StackdriverSender it would probably be cleaner to put that logic into a separate GoogleCredentialsProvider class.

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.