mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
Merge pull request #386 from wiibaa/doc
Doc: link to datatype in plugin doc (LOGSTASH-500) + minor syntax fixes
This commit is contained in:
commit
e0fb19540b
9 changed files with 17 additions and 17 deletions
|
@ -40,7 +40,7 @@ Comments are as in ruby, perl, and python. Starts with a '#' character. Example:
|
|||
The documentation for a plugin may say that a config field has a certain type.
|
||||
Examples include boolean, string, array, number, hash, etc.
|
||||
|
||||
### Boolean
|
||||
### <a name="boolean"></a>Boolean
|
||||
|
||||
A boolean must be either true or false.
|
||||
|
||||
|
@ -48,7 +48,7 @@ Examples:
|
|||
|
||||
debug => true
|
||||
|
||||
### String
|
||||
### <a name="string"></a>String
|
||||
|
||||
A string must be a single value.
|
||||
|
||||
|
@ -58,7 +58,7 @@ Example:
|
|||
|
||||
Single, unquoted words are valid as strings, too, but you should use quotes.
|
||||
|
||||
### Number
|
||||
### <a name="number"></a>Number
|
||||
|
||||
Numbers must be valid numerics (floating point or integer are OK)
|
||||
|
||||
|
@ -66,7 +66,7 @@ Example:
|
|||
|
||||
port => 33
|
||||
|
||||
### Array
|
||||
### <a name="array"></a>Array
|
||||
|
||||
An 'array' can be a single string value or multiple. If you specify the same
|
||||
field multiple times, it appends to the array.
|
||||
|
@ -78,7 +78,7 @@ Examples:
|
|||
|
||||
The above makes 'path' a 3-element array including all 3 strings.
|
||||
|
||||
### Hash
|
||||
### <a name="hash"></a>Hash
|
||||
|
||||
A 'hash' is currently represented using the same syntax as an array (see above).
|
||||
The 'key' and 'value' are simply pairs, such as:
|
||||
|
|
|
@ -22,7 +22,7 @@ parsing tools, etc. Video also below:
|
|||
The slides are available online here: [slides](http://goo.gl/68c62). The slides
|
||||
include speaker notes (click 'actions' then 'speaker notes').
|
||||
-->
|
||||
<iframe width="480" height="296" src="http://www.youtube.com/embed/RuUFnog29M4" frameborder="0" allowfullscreen></iframe>
|
||||
<iframe width="480" height="296" src="http://www.youtube.com/embed/RuUFnog29M4" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
|
||||
|
||||
The slides are available online here: [slides](http://semicomplete.com/presentations/logstash-puppetconf-2012/).
|
||||
|
||||
|
|
|
@ -83,9 +83,9 @@ This is what it might look like in your config file:
|
|||
<li> The configuration attribute name here is anything that matches the above regular expression. </li>
|
||||
<% end -%>
|
||||
<% if config[:validate].is_a?(Symbol) -%>
|
||||
<li> Value type is <%= config[:validate] %> </li>
|
||||
<li> Value type is <a href="../configuration#<%= config[:validate] %>"><%= config[:validate] %></a> </li>
|
||||
<% elsif config[:validate].nil? -%>
|
||||
<li> Value type is string </li>
|
||||
<li> Value type is <a href="../configuration#string">string</a> </li>
|
||||
<% elsif config[:validate].is_a?(Array) -%>
|
||||
<li> Value can be any of: <%= config[:validate].map(&:inspect).join(", ") %> </li>
|
||||
<% end -%>
|
||||
|
|
|
@ -25,7 +25,7 @@ class LogStash::Filters::CSV < LogStash::Filters::Base
|
|||
|
||||
# The CSV data in the value of the source field will be expanded into a
|
||||
# datastructure.
|
||||
# This deprecates the regexp '[A-Za-z0-9_-]' variable.
|
||||
# This deprecates the regexp `[A-Za-z0-9_-]` variable.
|
||||
config :source, :validate => :string
|
||||
|
||||
# Define a list of column names (in the order they appear in the CSV,
|
||||
|
|
|
@ -43,8 +43,8 @@ class LogStash::Filters::Date < LogStash::Filters::Base
|
|||
#
|
||||
# [joda.time.format.DateTimeFormat](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html)
|
||||
#
|
||||
# An array with field name first, and format patterns following, [ field,
|
||||
# formats... ]
|
||||
# An array with field name first, and format patterns following, `[ field,
|
||||
# formats... ]`
|
||||
#
|
||||
# If your time field has multiple possible formats, you can do this:
|
||||
#
|
||||
|
|
|
@ -95,10 +95,10 @@ class LogStash::Filters::Metrics < LogStash::Filters::Base
|
|||
config_name "metrics"
|
||||
plugin_status "experimental"
|
||||
|
||||
# syntax: meter => [ "name of metric", "name of metric" ]
|
||||
# syntax: `meter => [ "name of metric", "name of metric" ]`
|
||||
config :meter, :validate => :array, :default => []
|
||||
|
||||
# syntax: timer => [ "name of metric", "%{time_value}" ]
|
||||
# syntax: `timer => [ "name of metric", "%{time_value}" ]`
|
||||
config :timer, :validate => :hash, :default => {}
|
||||
|
||||
# Don't track events that have @timestamp older than some number of seconds.
|
||||
|
|
|
@ -16,7 +16,7 @@ class LogStash::Inputs::File < LogStash::Inputs::Base
|
|||
plugin_status "beta"
|
||||
|
||||
# The path to the file to use as an input.
|
||||
# You can use globs here, such as "/var/log/*.log"
|
||||
# You can use globs here, such as `/var/log/*.log`
|
||||
# Paths must be absolute and cannot be relative.
|
||||
config :path, :validate => :array, :required => true
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class LogStash::Inputs::Tcp < LogStash::Inputs::Base
|
|||
# `client` connects to a server.
|
||||
config :mode, :validate => ["server", "client"], :default => "server"
|
||||
|
||||
# Enable ssl (must be set for other `ssl_` options to take effect_
|
||||
# Enable ssl (must be set for other `ssl_` options to take effect)
|
||||
config :ssl_enable, :validate => :boolean, :default => false
|
||||
|
||||
# Verify the identity of the other end of the ssl connection against the CA
|
||||
|
|
|
@ -13,10 +13,10 @@ class LogStash::Outputs::Ganglia < LogStash::Outputs::Base
|
|||
# The port to connect on your ganglia server.
|
||||
config :port, :validate => :number, :default => 8649
|
||||
|
||||
# The metric to use. This supports dynamic strings like %{@source_host}
|
||||
# The metric to use. This supports dynamic strings like `%{@source_host}`
|
||||
config :metric, :validate => :string, :required => true
|
||||
|
||||
# The value to use. This supports dynamic strings like %{bytes}
|
||||
# The value to use. This supports dynamic strings like `%{bytes}`
|
||||
# It will be coerced to a floating point value. Values which cannot be
|
||||
# coerced will zero (0)
|
||||
config :value, :validate => :string, :required => true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue