mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
- use %{host} instead of %{source} (fixes a typo)
This commit is contained in:
parent
620e9a728c
commit
3d2f45695f
16 changed files with 33 additions and 33 deletions
|
@ -99,12 +99,12 @@ class LogStash::Event
|
|||
if RUBY_ENGINE == "jruby"
|
||||
public
|
||||
def to_s
|
||||
return self.sprintf("%{+yyyy-MM-dd'T'HH:mm:ss.SSSZ} %{source} %{message}")
|
||||
return self.sprintf("%{+yyyy-MM-dd'T'HH:mm:ss.SSSZ} %{host} %{message}")
|
||||
end # def to_s
|
||||
else
|
||||
public
|
||||
def to_s
|
||||
return self.sprintf("#{self["@timestamp"].iso8601} %{source} %{message}")
|
||||
return self.sprintf("#{self["@timestamp"].iso8601} %{host} %{message}")
|
||||
end # def to_s
|
||||
end
|
||||
|
||||
|
@ -206,7 +206,7 @@ class LogStash::Event
|
|||
#
|
||||
# For example, if the event has type == "foo" and source == "bar"
|
||||
# then this string:
|
||||
# "type is %{type} and source is %{source}"
|
||||
# "type is %{type} and source is %{host}"
|
||||
# will return
|
||||
# "type is foo and source is bar"
|
||||
#
|
||||
|
|
|
@ -60,13 +60,13 @@ class LogStash::Filters::Base < LogStash::Plugin
|
|||
#
|
||||
# filter {
|
||||
# %PLUGIN% {
|
||||
# add_field => [ "foo_%{somefield}", "Hello world, from %{source}" ]
|
||||
# add_field => [ "foo_%{somefield}", "Hello world, from %{host}" ]
|
||||
# }
|
||||
# }
|
||||
#
|
||||
# If the event has field "somefield" == "hello" this filter, on success,
|
||||
# would add field "foo_hello" if it is present, with the
|
||||
# value above and the %{source} piece replaced with that value from the
|
||||
# value above and the %{host} piece replaced with that value from the
|
||||
# event.
|
||||
config :add_field, :validate => :hash, :default => {}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ class LogStash::Filters::Range < LogStash::Filters::Base
|
|||
# "duration", 101, 200, "field:latency:normal",
|
||||
# "duration", 201, 1000, "field:latency:slow",
|
||||
# "duration", 1001, 1e1000, "field:latency:outlier"
|
||||
# "requests", 0, 10, "tag:to_few_%{source}_requests" ]
|
||||
# "requests", 0, 10, "tag:to_few_%{host}_requests" ]
|
||||
# }
|
||||
# }
|
||||
#
|
||||
|
|
|
@ -16,7 +16,7 @@ class LogStash::Outputs::Datadog < LogStash::Outputs::Base
|
|||
config :api_key, :validate => :string, :required => true
|
||||
|
||||
# Title
|
||||
config :title, :validate => :string, :default => "Logstash event for %{source}"
|
||||
config :title, :validate => :string, :default => "Logstash event for %{host}"
|
||||
|
||||
# Text
|
||||
config :text, :validate => :string, :default => "%{message}"
|
||||
|
|
|
@ -28,7 +28,7 @@ class LogStash::Outputs::DatadogMetrics < LogStash::Outputs::Base
|
|||
config :metric_type, :validate => ["gauge", "counter"], :default => "%{metric_type}"
|
||||
|
||||
# The name of the host that produced the metric.
|
||||
config :host, :validate => :string, :default => "%{source}"
|
||||
config :host, :validate => :string, :default => "%{host}"
|
||||
|
||||
# The name of the device that produced the metric.
|
||||
config :device, :validate => :string, :default => "%{metric_device}"
|
||||
|
|
|
@ -23,7 +23,7 @@ class LogStash::Outputs::Gelf < LogStash::Outputs::Base
|
|||
# want to use something other than the event's source host as the
|
||||
# "sender" of an event. A common case for this is using the application name
|
||||
# instead of the hostname.
|
||||
config :sender, :validate => :string, :default => "%{source}"
|
||||
config :sender, :validate => :string, :default => "%{host}"
|
||||
|
||||
# The GELF message level. Dynamic values like %{level} are permitted here;
|
||||
# useful if you want to parse the 'log level' from an event and use that
|
||||
|
|
|
@ -38,7 +38,7 @@ class LogStash::Outputs::Gemfire < LogStash::Outputs::Base
|
|||
config :region_name, :validate => :string, :default => "Logstash"
|
||||
|
||||
# A sprintf format to use when building keys
|
||||
config :key_format, :validate => :string, :default => "%{source}-%{@timestamp}"
|
||||
config :key_format, :validate => :string, :default => "%{host}-%{@timestamp}"
|
||||
|
||||
public
|
||||
def register
|
||||
|
|
|
@ -29,11 +29,11 @@ class LogStash::Outputs::Graphite < LogStash::Outputs::Base
|
|||
# Should metrics be resend on failure?
|
||||
config :resend_on_failure, :validate => :boolean, :default => false
|
||||
|
||||
# The metric(s) to use. This supports dynamic strings like %{source}
|
||||
# The metric(s) to use. This supports dynamic strings like %{host}
|
||||
# for metric names and also for values. This is a hash field with key
|
||||
# of the metric name, value of the metric value. Example:
|
||||
#
|
||||
# [ "%{source}/uptime", "%{uptime_1m}" ]
|
||||
# [ "%{host}/uptime", "%{uptime_1m}" ]
|
||||
#
|
||||
# The value will be coerced to a floating point value. Values which cannot be
|
||||
# coerced will zero (0)
|
||||
|
|
|
@ -23,7 +23,7 @@ class LogStash::Outputs::Http < LogStash::Outputs::Base
|
|||
config :http_method, :validate => ["put", "post"], :required => :true
|
||||
|
||||
# Custom headers to use
|
||||
# format is `headers => ["X-My-Header", "%{source}"]
|
||||
# format is `headers => ["X-My-Header", "%{host}"]
|
||||
config :headers, :validate => :hash
|
||||
|
||||
# Content type
|
||||
|
@ -39,7 +39,7 @@ class LogStash::Outputs::Http < LogStash::Outputs::Base
|
|||
#
|
||||
# For example:
|
||||
#
|
||||
# mapping => ["foo", "%{source}", "bar", "%{type}"]
|
||||
# mapping => ["foo", "%{host}", "bar", "%{type}"]
|
||||
config :mapping, :validate => :hash
|
||||
|
||||
# Set the format of the http body.
|
||||
|
|
|
@ -21,9 +21,9 @@ class LogStash::Outputs::Librato < LogStash::Outputs::Base
|
|||
# Send data to Librato as a gauge
|
||||
#
|
||||
# Example:
|
||||
# ["value", "%{bytes_recieved}", "source", "%{source}", "name", "apache_bytes"]
|
||||
# ["value", "%{bytes_recieved}", "source", "%{host}", "name", "apache_bytes"]
|
||||
# Additionally, you can override the `measure_time` for the event. Must be a unix timestamp:
|
||||
# ["value", "%{bytes_recieved}", "source", "%{source}", "name", "apache_bytes","measure_time", "%{my_unixtime_field}]
|
||||
# ["value", "%{bytes_recieved}", "source", "%{host}", "name", "apache_bytes","measure_time", "%{my_unixtime_field}]
|
||||
# Default is to use the event's timestamp
|
||||
config :gauge, :validate => :hash, :default => {}
|
||||
|
||||
|
@ -31,9 +31,9 @@ class LogStash::Outputs::Librato < LogStash::Outputs::Base
|
|||
# Send data to Librato as a counter
|
||||
#
|
||||
# Example:
|
||||
# ["value", "1", "source", "%{source}", "name", "messages_received"]
|
||||
# ["value", "1", "source", "%{host}", "name", "messages_received"]
|
||||
# Additionally, you can override the `measure_time` for the event. Must be a unix timestamp:
|
||||
# ["value", "1", "source", "%{source}", "name", "messages_received", "measure_time", "%{my_unixtime_field}"]
|
||||
# ["value", "1", "source", "%{host}", "name", "messages_received", "measure_time", "%{my_unixtime_field}"]
|
||||
# Default is to use the event's timestamp
|
||||
config :counter, :validate => :hash, :default => {}
|
||||
|
||||
|
@ -45,7 +45,7 @@ class LogStash::Outputs::Librato < LogStash::Outputs::Base
|
|||
# All values will be passed through `event.sprintf`
|
||||
#
|
||||
# Example:
|
||||
# ["title":"Logstash event on %{source}", "name":"logstash_stream"]
|
||||
# ["title":"Logstash event on %{host}", "name":"logstash_stream"]
|
||||
# or
|
||||
# ["title":"Logstash event", "description":"%{message}", "name":"logstash_stream"]
|
||||
config :annotation, :validate => :hash, :default => {}
|
||||
|
|
|
@ -13,7 +13,7 @@ require "json"
|
|||
# port => "1420"
|
||||
# type => "apache-access"
|
||||
# fields => [ "response" ]
|
||||
# meter => [ "%{source}.apache.response.%{response}", "1" ]
|
||||
# meter => [ "%{host}.apache.response.%{response}", "1" ]
|
||||
# }
|
||||
class LogStash::Outputs::MetricCatcher < LogStash::Outputs::Base
|
||||
config_name "metriccatcher"
|
||||
|
@ -24,7 +24,7 @@ class LogStash::Outputs::MetricCatcher < LogStash::Outputs::Base
|
|||
# The port to connect on your MetricCatcher
|
||||
config :port, :validate => :number, :default => 1420
|
||||
|
||||
# The metrics to send. This supports dynamic strings like %{source}
|
||||
# The metrics to send. This supports dynamic strings like %{host}
|
||||
# for metric names and also for values. This is a hash field with key
|
||||
# of the metric name, value of the metric value.
|
||||
#
|
||||
|
@ -32,17 +32,17 @@ class LogStash::Outputs::MetricCatcher < LogStash::Outputs::Base
|
|||
# coerced will zero (0)
|
||||
config :gauge, :validate => :hash
|
||||
|
||||
# The metrics to send. This supports dynamic strings like %{source}
|
||||
# The metrics to send. This supports dynamic strings like %{host}
|
||||
# for metric names and also for values. This is a hash field with key
|
||||
# of the metric name, value of the metric value. Example:
|
||||
#
|
||||
# counter => [ "%{source}.apache.hits.%{response}, "1" ]
|
||||
# counter => [ "%{host}.apache.hits.%{response}, "1" ]
|
||||
#
|
||||
# The value will be coerced to a floating point value. Values which cannot be
|
||||
# coerced will zero (0)
|
||||
config :counter, :validate => :hash
|
||||
|
||||
# The metrics to send. This supports dynamic strings like %{source}
|
||||
# The metrics to send. This supports dynamic strings like %{host}
|
||||
# for metric names and also for values. This is a hash field with key
|
||||
# of the metric name, value of the metric value.
|
||||
#
|
||||
|
@ -50,7 +50,7 @@ class LogStash::Outputs::MetricCatcher < LogStash::Outputs::Base
|
|||
# coerced will zero (0)
|
||||
config :meter, :validate => :hash
|
||||
|
||||
# The metrics to send. This supports dynamic strings like %{source}
|
||||
# The metrics to send. This supports dynamic strings like %{host}
|
||||
# for metric names and also for values. This is a hash field with key
|
||||
# of the metric name, value of the metric value.
|
||||
#
|
||||
|
@ -58,7 +58,7 @@ class LogStash::Outputs::MetricCatcher < LogStash::Outputs::Base
|
|||
# coerced will zero (0)
|
||||
config :biased, :validate => :hash
|
||||
|
||||
# The metrics to send. This supports dynamic strings like %{source}
|
||||
# The metrics to send. This supports dynamic strings like %{host}
|
||||
# for metric names and also for values. This is a hash field with key
|
||||
# of the metric name, value of the metric value.
|
||||
#
|
||||
|
@ -66,11 +66,11 @@ class LogStash::Outputs::MetricCatcher < LogStash::Outputs::Base
|
|||
# coerced will zero (0)
|
||||
config :uniform, :validate => :hash
|
||||
|
||||
# The metrics to send. This supports dynamic strings like %{source}
|
||||
# The metrics to send. This supports dynamic strings like %{host}
|
||||
# for metric names and also for values. This is a hash field with key
|
||||
# of the metric name, value of the metric value. Example:
|
||||
#
|
||||
# timer => [ "%{source}.apache.response_time, "%{response_time}" ]
|
||||
# timer => [ "%{host}.apache.response_time, "%{response_time}" ]
|
||||
#
|
||||
# The value will be coerced to a floating point value. Values which cannot be
|
||||
# coerced will zero (0)
|
||||
|
|
|
@ -54,7 +54,7 @@ class LogStash::Outputs::NagiosNsca < LogStash::Outputs::Base
|
|||
# The format to use when writing events to nagios. This value
|
||||
# supports any string and can include %{name} and other dynamic
|
||||
# strings.
|
||||
config :message_format, :validate => :string, :default => "%{@timestamp} %{source}: %{message}"
|
||||
config :message_format, :validate => :string, :default => "%{@timestamp} %{host}: %{message}"
|
||||
|
||||
public
|
||||
def register
|
||||
|
|
|
@ -16,7 +16,7 @@ require "logstash/plugin_mixins/aws_config"
|
|||
# * sns - If no ARN is found in the configuration file, this will be used as
|
||||
# the ARN to publish.
|
||||
# * sns_subject - The subject line that should be used.
|
||||
# Optional. The "%{source}" will be used if not present and truncated at
|
||||
# Optional. The "%{host}" will be used if not present and truncated at
|
||||
# MAX_SUBJECT_SIZE_IN_CHARACTERS.
|
||||
# * sns_message - The message that should be
|
||||
# sent. Optional. The event serialzed as JSON will be used if not present and
|
||||
|
|
|
@ -38,7 +38,7 @@ class LogStash::Outputs::Statsd < LogStash::Outputs::Base
|
|||
|
||||
# The name of the sender.
|
||||
# Dots will be replaced with underscores
|
||||
config :sender, :validate => :string, :default => "%{source}"
|
||||
config :sender, :validate => :string, :default => "%{host}"
|
||||
|
||||
# An increment metric. metric names as array.
|
||||
config :increment, :validate => :array, :default => []
|
||||
|
|
|
@ -64,7 +64,7 @@ class LogStash::Outputs::Syslog < LogStash::Outputs::Base
|
|||
config :severity, :validate => SEVERITY_LABELS, :required => true
|
||||
|
||||
# source host for syslog message
|
||||
config :sourcehost, :validate => :string, :default => "%{source}"
|
||||
config :sourcehost, :validate => :string, :default => "%{host}"
|
||||
|
||||
# timestamp for syslog message
|
||||
config :timestamp, :validate => :string, :default => "%{@timestamp}"
|
||||
|
|
|
@ -26,7 +26,7 @@ class LogStash::Outputs::Xmpp < LogStash::Outputs::Base
|
|||
# the host on the user/identity is used. (foo.com for user@foo.com)
|
||||
config :host, :validate => :string
|
||||
|
||||
# The message to send. This supports dynamic strings like %{source}
|
||||
# The message to send. This supports dynamic strings like %{host}
|
||||
config :message, :validate => :string, :required => true
|
||||
|
||||
public
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue