mirror of
https://github.com/elastic/logstash.git
synced 2025-04-25 07:07:54 -04:00
95 lines
3 KiB
Text
95 lines
3 KiB
Text
==== Common Options
|
|
|
|
The following configuration options are supported by all input plugins:
|
|
[cols="<,<,<",options="header",]
|
|
|=======================================================================
|
|
|Setting |Input type|Required
|
|
| <<plugins-{type}s-{plugin}-add_field>> |<<hash,hash>>|No
|
|
| <<plugins-{type}s-{plugin}-codec>> |<<codec,codec>>|No
|
|
| <<plugins-{type}s-{plugin}-enable_metric>> |<<boolean,boolean>>|No
|
|
| <<plugins-{type}s-{plugin}-id>> |<<string,string>>|No
|
|
| <<plugins-{type}s-{plugin}-tags>> |<<array,array>>|No
|
|
| <<plugins-{type}s-{plugin}-type>> |<<string,string>>|No
|
|
|=======================================================================
|
|
|
|
|
|
==== Details
|
|
|
|
|
|
|
|
[id="plugins-{type}s-{plugin}-add_field"]
|
|
===== `add_field`
|
|
|
|
* Value type is <<hash,hash>>
|
|
* Default value is `{}`
|
|
|
|
Add a field to an event
|
|
|
|
[id="plugins-{type}s-{plugin}-codec"]
|
|
===== `codec`
|
|
|
|
* Value type is <<codec,codec>>
|
|
* Default value is `"plain"`
|
|
|
|
The codec used for input data. Input codecs are a convenient method for decoding your data before it enters the input, without needing a separate filter in your Logstash pipeline.
|
|
|
|
|
|
[id="plugins-{type}s-{plugin}-enable_metric"]
|
|
===== `enable_metric`
|
|
|
|
* Value type is <<boolean,boolean>>
|
|
* Default value is `true`
|
|
|
|
Disable or enable metric logging for this specific plugin instance
|
|
by default we record all the metrics we can, but you can disable metrics collection
|
|
for a specific plugin.
|
|
|
|
[id="plugins-{type}s-{plugin}-id"]
|
|
===== `id`
|
|
|
|
* Value type is <<string,string>>
|
|
* There is no default value for this setting.
|
|
|
|
Add a unique `ID` to the plugin configuration. If no ID is specified, Logstash will generate one.
|
|
It is strongly recommended to set this ID in your configuration. This is particularly useful
|
|
when you have two or more plugins of the same type, for example, if you have 2 grok filters.
|
|
Adding a named ID in this case will help in monitoring Logstash when using the monitoring APIs.
|
|
|
|
[source,ruby]
|
|
---------------------------------------------------------------------------------------------------
|
|
output {
|
|
stdout {
|
|
id => "my_plugin_id"
|
|
}
|
|
}
|
|
---------------------------------------------------------------------------------------------------
|
|
|
|
[id="plugins-{type}s-{plugin}-tags"]
|
|
===== `tags`
|
|
|
|
* Value type is <<array,array>>
|
|
* There is no default value for this setting.
|
|
|
|
Add any number of arbitrary tags to your event.
|
|
|
|
This can help with processing later.
|
|
|
|
[id="plugins-{type}s-{plugin}-type"]
|
|
===== `type`
|
|
|
|
* Value type is <<string,string>>
|
|
* There is no default value for this setting.
|
|
|
|
This is the base class for Logstash inputs.
|
|
Add a `type` field to all events handled by this input.
|
|
|
|
Types are used mainly for filter activation.
|
|
|
|
The type is stored as part of the event itself, so you can
|
|
also use the type to search for it in Kibana.
|
|
|
|
If you try to set a type on an event that already has one (for
|
|
example when you send an event from a shipper to an indexer) then
|
|
a new input will not override the existing type. A type set at
|
|
the shipper stays with that event for its life even
|
|
when sent to another Logstash server.
|