summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2013-04-26 19:35:43 +0300
committerSaku Ytti <saku@ytti.fi>2013-04-26 19:35:43 +0300
commit5fca52c86b50dd9754546902530530b9c0f6216b (patch)
treef0ece477d6518c2ef6ce9a38b77cb53d1f333060 /extra
parent3dc52f34c386409e65465aaa0878ac5db812570c (diff)
1.9/2.0 compatibility fix + syslogd cleanup
Diffstat (limited to 'extra')
-rw-r--r--extra/rest_client.rb6
-rwxr-xr-xextra/syslog.rb3
2 files changed, 4 insertions, 5 deletions
diff --git a/extra/rest_client.rb b/extra/rest_client.rb
index 2c58d04..88daeae 100644
--- a/extra/rest_client.rb
+++ b/extra/rest_client.rb
@@ -16,9 +16,9 @@ module Oxidized
@web = Net::HTTP.new host, port
end
- def next node, opt={}
- data = JSON.dump :node => node, :user => opt[:user], :msg => opt[:msg], :from => opt[:from]
- @web.put '/nodes/next/' + node.to_s, data
+ def next opt
+ data = JSON.dump opt
+ @web.put '/nodes/next/' + opt[:name].to_s, data
end
end
diff --git a/extra/syslog.rb b/extra/syslog.rb
index 10757bc..7671d22 100755
--- a/extra/syslog.rb
+++ b/extra/syslog.rb
@@ -50,8 +50,7 @@ module Oxidized
end
def rest opt
- Oxidized::RestClient.next opt[:name], :user => opt[:user], :msg => opt[:msg],
- :from => opt[:from]
+ Oxidized::RestClient.next opt
end
def ios ip, log, i