GithubHelp home page GithubHelp logo

robertjsullivan / datadog-firehose-nozzle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from datadog/datadog-firehose-nozzle

0.0 0.0 0.0 350 KB

CF component to forward metrics from the Loggregator Firehose to Datadog

Home Page: https://docs.datadoghq.com/integrations/cloud_foundry/

License: Apache License 2.0

Shell 0.33% Go 99.67%

datadog-firehose-nozzle's Introduction

Summary

The datadog-firehose-nozzle is a CF component which forwards metrics from the Loggregator Firehose to Datadog

Configure CloudFoundry UAA for Firehose Nozzle

The datadog firehose nozzle requires a UAA user who is authorized to access the loggregator firehose. You can add a user by editing your CloudFoundry manifest to include the details about this user under the properties.uaa.clients section. For example to add a user datadog-firehose-nozzle:

properties:
  uaa:
    clients:
      datadog-firehose-nozzle:
        access-token-validity: 1209600
        authorized-grant-types: authorization_code,client_credentials,refresh_token
        override: true
        secret: <password>
        scope: openid,oauth.approvals,doppler.firehose
        authorities: oauth.login,doppler.firehose

Dependencies

We manage dependencies using Glide. So, in order to build, install or run tests, you should first install glide. Then, glide install.

Running

The datadog nozzle uses a configuration file to obtain the firehose URL, datadog API key and other configuration parameters. The firehose and the datadog servers both require authentication -- the firehose requires a valid username/password and datadog requires a valid API key.

You can start the firehose nozzle by executing:

go run main.go -config config/datadog-firehose-nozzle.json"

Batching

The configuration file specifies the interval at which the nozzle will flush metrics to datadog. By default this is set to 15 seconds.

slowConsumerAlert

For the most part, the datadog-firehose-nozzle forwards metrics from the loggregator firehose to datadog without too much processing. A notable exception is the datadog.nozzle.slowConsumerAlert metric. The metric is a binary value (0 or 1) indicating whether or not the nozzle is forwarding metrics to datadog at the same rate that it is receiving them from the firehose: 0 means the the nozzle is keeping up with the firehose, and 1 means that the nozzle is falling behind.

The nozzle determines the value of datadog.nozzle.slowConsumerAlert with the following rules:

  1. When the nozzle receives a websocket Close frame with status 1008, it publishes the value 1. Traffic Controller pings clients to determine if the connections are still alive. If it does not receive a Pong response before the KeepAlive deadline, it decides that the connection is too slow (or even dead) and sends the Close frame.

  2. Otherwise, the nozzle publishes 0.

Using Proxies

If you need a proxy to connect to the Internet, you can use the HTTPProxyURL and HTTPSProxyURL fields in your configuration file in order to configure the nozzle to do this. For example:

  • HTTPProxyURL: "http(s)://user:password@proxy_for_http:port"
  • HTTPSProxyURL: "http(s)://user:password@proxy_for_https:port"

Alternatively, you can use environment variables (HTTP_PROXY and HTTPS_PROXY).

Tests

You need ginkgo to run the tests. The tests can be executed by:

ginkgo -r

Deploying

There is a bosh release that will configure, start and monitor the datadog nozzle: https://github.com/DataDog/datadog-firehose-nozzle-release

datadog-firehose-nozzle's People

Contributors

bradylove avatar dsabeti avatar enocom avatar gmmeyer avatar gzussa avatar ihcsim avatar irabinovitch avatar isauve avatar jeremy-lq avatar jmtuley avatar poy avatar robertjsullivan avatar rothgar avatar roxtar avatar tylarb avatar wfernandes avatar zippolyte 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.