Skip to content

Commit

Permalink
Merge pull request #2 from campanja/master
Browse files Browse the repository at this point in the history
Add --tag option to specify tags
  • Loading branch information
aphyr committed Oct 21, 2012
2 parents d4c7769 + fd8a7ed commit ce3c7e2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/riemann/tools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -52,6 +53,10 @@ def opt(*a)
end

def report(event)
if options[:tag]
event[:tags] = options[:tag]
end

riemann << event
end

Expand Down

0 comments on commit ce3c7e2

Please sign in to comment.