lib/riemann/tools.rb in riemann-tools-0.0.9 vs lib/riemann/tools.rb in riemann-tools-0.1.0
- old
+ new
@@ -26,10 +26,11 @@
end
end
opt :host, "Riemann host", :default => '127.0.0.1'
opt :port, "Riemann port", :default => 5555
+ opt :event_host, "Event hostname", :type => String
opt :interval, "Seconds between updates", :default => 5
opt :tag, "Tag to add to events", :type => String, :multi => true
opt :ttl, "TTL for events", :type => Integer
end
end
@@ -59,9 +60,11 @@
end
if options[:ttl]
event[:ttl] = options[:ttl]
end
+
+ event[:host] ||= options[:event_host]
riemann << event
end
def riemann