Skip to content

scadora/logstash-output-bigmuddy-network-telemetry-metrics

 
 

Repository files navigation

Logstash Plugin

This is a plugin for Logstash.

It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.

Documentation

This output plugin takes a streaming telemetry event, ferrets out any numeric fields, and PUT|POSTs events in time series metric format (e.g prometheus, signalfx) to a configured URL over HTTP. The default format of the posted content is that accepted by the prometheus pushgw, but multiple types of consumers are supported (e.g. signalfx).

HTTP headers, the URL, and the HTTP operation can all be customised. All the HTTP mixin client options and the underlying Manticore client options are supported (e.g. proxy configuration, number of parallel in flight operations, client certificate, cookie support etc).

This output plugin depends on a sister input codec which handles compressed JSON streamed content over a stream based transport. The reverse is not true; i.e. the input codec plugin can be used with a variety of output plugins including this one.

Note: The streaming telemetry project is work in progress, and both the on and off box components of streaming telemetry are likely to evolve at a fast pace.

Configuration

Sample configuration with logstash pipeline feeding prometheus:

output {
    telemetry_metrics {
	http_method => "post"
	url => "http://www.example.com:9091/metrics/jobs/xrstv2"	      
    }
}

A slightly more involved configuration feeding content to signalfx:

output {
    telemetry_metrics {
	http_method => "post"
	consumer => "signalfx"
	headers => {
	    "X-SF-TOKEN" => "AddYOURTokenHERE"
	}
	url => "https://ingest.signalfx.com/v2/datapoint"
	content_type => "application/json"
	proxy => "http://proxy.example.com:8080"
    }
}

Further documentation is provided in the plugin source.

Need Help?

Need help? Try #logstash on freenode IRC or the https://discuss.elastic.co/c/logstash discussion forum.

Developing

1. Plugin Development and Testing

Code

  • To get started, you'll need JRuby with the Bundler gem installed.

  • Create a new plugin or clone and existing from the GitHub logstash-plugins organization. We also provide example plugins.

  • Install dependencies

bundle install

Test

Unit test development in progress.

2. Running your unpublished Plugin in Logstash

2.1 Run in a local Logstash clone

  • Edit Logstash Gemfile and add the local plugin path, for example:
gem "logstash-codec-output-bigmuddy-network-telemetry-metrics", :path => "/your/local/logstash-codec-output-bigmuddy-network-telemetry-metrics"
  • Install plugin
bin/plugin install --no-verify

At this point any modifications to the plugin code will be applied to this local Logstash setup. After modifying the plugin, simply rerun Logstash.

2.2 Run in an installed Logstash

You can use the same 2.1 method to run your plugin in an installed Logstash by editing its Gemfile and pointing the :path to your local plugin development directory or you can build the gem and install it using:

  • Build your plugin gem
gem build logstash-codec-output-bigmuddy-network-telemetry-metrics.gemspec
  • Install the plugin from the Logstash home
bin/plugin install /your/local/plugin/logstash-codec-output-bigmuddy-network-telemetry-metrics.gem
  • Start Logstash and proceed to test the plugin

Contributing

Once all the necessary criteria are met, we will attempt to push this content to the logstash-plugins repository, and the corresponding gem to rubygems.org. Watch this space.

About

Logstash output plugin used to extract time series metrics from network telemetry streams, and post these metrics over HTTP.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%