From fd8a7ed05b9f9cc40be2e8172a032853b0512ee4 Mon Sep 17 00:00:00 2001 From: "T. Norinder" Date: Thu, 19 Jul 2012 11:33:23 +0200 Subject: [PATCH] Add --tag option to allow specification of tags --- lib/riemann/tools.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/riemann/tools.rb b/lib/riemann/tools.rb index ab09cb9a..e8c05fe6 100644 --- a/lib/riemann/tools.rb +++ b/lib/riemann/tools.rb @@ -29,6 +29,7 @@ def options opt :host, "Riemann host", :default => '127.0.0.1' opt :port, "Riemann port", :default => 5555 opt :interval, "Seconds between updates", :default => 5 + opt :tag, "Tag to add to events", :type => String, :multi => true end end @@ -52,6 +53,10 @@ def opt(*a) end def report(event) + if options[:tag] + event[:tags] = options[:tag] + end + riemann << event end