mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
unsused charset option
This commit is contained in:
parent
2c8fdbc8b1
commit
8c5b44518e
1 changed files with 6 additions and 17 deletions
|
@ -9,24 +9,13 @@ class LogStash::Codecs::Graphite < LogStash::Codecs::Base
|
|||
|
||||
milestone 2
|
||||
|
||||
# The character encoding used in this codec. Examples include "UTF-8" and
|
||||
# "CP1252"
|
||||
#
|
||||
# JSON requires valid UTF-8 strings, but in some cases, software that
|
||||
# emits JSON does so in another encoding (nxlog, for example). In
|
||||
# weird cases like this, you can set the charset setting to the
|
||||
# actual encoding of the text and logstash will convert it for you.
|
||||
#
|
||||
# For nxlog users, you'll want to set this to "CP1252"
|
||||
config :charset, :validate => ::Encoding.name_list, :default => "UTF-8"
|
||||
|
||||
EXCLUDE_ALWAYS = [ "@timestamp", "@version" ]
|
||||
|
||||
DEFAULT_METRICS_FORMAT = "*"
|
||||
METRIC_PLACEHOLDER = "*"
|
||||
|
||||
# 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
|
||||
# for metric names and also for values. This is a hash field with key
|
||||
# of the metric name, value of the metric value. Example:
|
||||
#
|
||||
# [ "%{host}/uptime", "%{uptime_1m}" ]
|
||||
|
@ -51,14 +40,14 @@ class LogStash::Codecs::Graphite < LogStash::Codecs::Base
|
|||
#
|
||||
# NOTE: If no metrics_format is defined the name of the metric will be used as fallback.
|
||||
config :metrics_format, :validate => :string, :default => DEFAULT_METRICS_FORMAT
|
||||
|
||||
|
||||
|
||||
|
||||
public
|
||||
def initialize(params={})
|
||||
super(params)
|
||||
@lines = LogStash::Codecs::Line.new
|
||||
end
|
||||
|
||||
|
||||
public
|
||||
def decode(data)
|
||||
@lines.decode(data) do |event|
|
||||
|
@ -75,7 +64,7 @@ class LogStash::Codecs::Graphite < LogStash::Codecs::Base
|
|||
|
||||
return metric
|
||||
end
|
||||
|
||||
|
||||
public
|
||||
def encode(event)
|
||||
# Graphite message format: metric value timestamp\n
|
||||
|
@ -111,4 +100,4 @@ class LogStash::Codecs::Graphite < LogStash::Codecs::Base
|
|||
end # if messages.empty?
|
||||
end # def encode
|
||||
|
||||
end # class LogStash::Codecs::JSON
|
||||
end # class LogStash::Codecs::Graphite
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue