Skip to content

Commit

Permalink
Path and prefix of sincedb configurable (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger Butenuth committed Mar 1, 2017
1 parent b0c3a8a commit f2781d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ input {
type => "CloudHub"
username => "anypoint-user"
password => "anypoint-password"
environments => "ints|prod"
environments => "ints|prod"
sincedb_folder => "/temp/cloudhub_db"
sincedb_prefix => "since_"
interval => 30
proxy_host => "proxy-host"
proxy_port => 8080
Expand Down
8 changes: 7 additions & 1 deletion lib/logstash/inputs/cloudhub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ class LogStash::Inputs::Cloudhub < LogStash::Inputs::Base
# Default: 100
config :events_per_call, :validate => :number, :default => 100

# Folder for sincedb files, default is <logstash>/data/plugins/cloudhub
config :sincedb_folder, :validate => :string, :default => nil

# File name prefix for sincedb files, default is 'sincedb-'
config :sincedb_prefix, :validate => :string, :default => 'sincedb-'

# Host name of web proxy
config :proxy_host, :validate => :string

Expand All @@ -51,7 +57,7 @@ class LogStash::Inputs::Cloudhub < LogStash::Inputs::Base
public
def register
@host = Socket.gethostname
@sincedb = SinceDB.new
@sincedb = SinceDB.new @sincedb_folder, @sincedb_prefix
end

def run(queue)
Expand Down

0 comments on commit f2781d2

Please sign in to comment.