Skip to content

Instantly share code, notes, and snippets.

@ianrumford
Last active December 11, 2015 01:49
Show Gist options
  • Save ianrumford/4526324 to your computer and use it in GitHub Desktop.
Save ianrumford/4526324 to your computer and use it in GitHub Desktop.
RIemann Feeds blog_feed_jmx2.rb
#!/usr/bin/jruby
# riemann feeds
# A simple JMX feed monitoring the Hadoop YARN NameNode
require 'riemann-feeds' # bootstrap rieeman feeds
#$DEBUG = true # force diags
# All of the configuration in a Ruby
feedspec_namenode = './etc/feedconfigNameNode.rb'
# Make a feed handler
feed_handler = Riemann::Feeds::FeedHandler.new
# Show the feed to the handler
feed_handler.import_feed_or_croak(feedspecNameNode)
# Now tell the handler to run the feed
feed_handler.run_feed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment