docs/index.asciidoc in logstash-input-snmp-1.2.8 vs docs/index.asciidoc in logstash-input-snmp-1.3.0
- old
+ new
@@ -24,10 +24,26 @@
The SNMP input polls network devices using Simple Network Management Protocol (SNMP)
to gather information related to the current state of the devices operation.
The SNMP input plugin supports SNMP v1, v2c, and v3 over UDP and TCP transport protocols.
+[id="plugins-{type}s-{plugin}-ecs"]
+==== Compatibility with the Elastic Common Schema (ECS)
+
+Because SNMP data has specific field names based on OIDs, we recommend setting a <<plugins-{type}s-{plugin}-target>>.
+Metadata fields follow a specific naming convention when <<plugins-{type}s-{plugin}-ecs_compatibility,ECS compatibility mode>> is enabled.
+
+[cols="<l,<l,e,<e"]
+|=======================================================================
+|ECS disabled |ECS v1, v8 |Description
+|[@metadata][host_protocol] |[@metadata][input][snmp][host][protocol] |The protocol used to retrieve data e.g. "udp"
+|[@metadata][host_address] |[@metadata][input][snmp][host][address] |The host IP e.g. "192.168.1.1"
+|[@metadata][host_port] |[@metadata][input][snmp][host][port] |The host's port e.g. "161"
+|[@metadata][host_community] |[@metadata][input][snmp][host][community] |The configured community e.g. "public"
+|[host] |[host][ip] |Same as `[@metadata][host_address]`, host's IP address
+|=======================================================================
+
[id="plugins-{type}s-{plugin}-import-mibs"]
==== Importing MIBs
This plugin already includes the IETF MIBs (management information bases) and these do not need to be imported.
@@ -53,18 +69,20 @@
This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
[cols="<,<,<",options="header",]
|=======================================================================
|Setting |Input type|Required
+| <<plugins-{type}s-{plugin}-ecs_compatibility>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-get>> |<<array,array>>|No
| <<plugins-{type}s-{plugin}-hosts>> |<<array,array>>|No
| <<plugins-{type}s-{plugin}-interval>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-mib_paths>> |<<path,path>>|No
| <<plugins-{type}s-{plugin}-oid_root_skip>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-oid_path_length>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-walk>> |<<array,array>>|No
| <<plugins-{type}s-{plugin}-tables>> |<<array,array>>|No
+| <<plugins-{type}s-{plugin}-target>> |<<string,string>>|No
|=======================================================================
==== SNMPv3 Authentication Options
This plugin supports the following SNMPv3 authentication options.
@@ -84,18 +102,18 @@
Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
input plugins.
[id="plugins-{type}s-{plugin}-get"]
-===== `get`
+===== `get`
+ * Value type is <<array,array>>
+ * There is no default value for this setting
+
Use the `get` option to query for scalar values for the given OID(s).
One or more OID(s) are specified as an array of strings of OID(s).
-* Value type is <<array,array>>
-* There is no default value for this setting
-
Example
[source,ruby]
-----
input {
snmp {
@@ -106,18 +124,18 @@
-----
[id="plugins-{type}s-{plugin}-hosts"]
===== `hosts`
+ * Value type is <<array,array>>
+ * There is no default value for this setting
+
The `hosts` option specifies the list of hosts to query the configured `get` and `walk` options.
Each host definition is a hash and must define the `host` key and value.
`host` must use the format `{tcp|udp}:{ip address}/{port}`, for example `host => "udp:127.0.0.1/161"`
-* Value type is <<array,array>>
-* There is no default value for this setting
-
Each host definition can optionally include the following keys and values:
* `community` the community string, default is `public`.
* `version` `1`, `2c` or `3`, default is `2c`.
* `retries` is the number of retries in case of failure, default is `2`.
@@ -158,61 +176,62 @@
}
}
-----
[id="plugins-{type}s-{plugin}-interval"]
-===== `interval`
+===== `interval`
+ * Value type is <<number,number>>
+ * Default value is `30`
+
The `interval` option specifies the polling interval in seconds.
If polling all configured hosts takes longer than this interval, a warning will be emitted to the logs.
-* Value type is <<number,number>>
-* Default value is `30`
-
[id="plugins-{type}s-{plugin}-mib_paths"]
-===== `mib_paths`
+===== `mib_paths`
-The `mib_paths` option specifies the location of one or more imported MIB files. The value can be either a dir path containing
-the imported MIB `.dic` files or a file path to a single MIB `.dic` file.
+ * Value type is <<path,path>>
+ * There is no default value for this setting
-* Value type is <<path,path>>
-* There is no default value for this setting
+The `mib_paths` option specifies the location of one or more imported MIB files.
+The value can be either a dir path containing the imported MIB `.dic` files or a
+file path to a single MIB `.dic` file.
This plugin includes the IETF MIBs.
If you require other MIBs, you need to import them. See <<plugins-{type}s-{plugin}-import-mibs>>.
[id="plugins-{type}s-{plugin}-oid_root_skip"]
-===== `oid_root_skip`
+===== `oid_root_skip`
+ * Value type is <<number,number>>
+ * Default value is `0`
+
The `oid_root_skip` option specifies the number of OID root digits to ignore in the event field name.
For example, in a numeric OID like "1.3.6.1.2.1.1.1.0" the first 5 digits could be ignored by setting `oid_root_skip => 5`
which would result in a field name "1.1.1.0". Similarly when a MIB is used an OID such
"1.3.6.1.2.mib-2.system.sysDescr.0" would become "mib-2.system.sysDescr.0"
-* Value type is <<number,number>>
-* Default value is `0`
-
[id="plugins-{type}s-{plugin}-oid_path_length"]
===== `oid_path_length`
+ * Value type is <<number,number>>
+ * Default value is `0`
+
The `oid_path_length` option specifies the number of OID root digits to retain in the event field name.
For example, in a numeric OID like "1.3.6.1.2.1.1.1.0" the last 2 digits could be retained by setting `oid_path_length => 2`
which would result in a field name "1.0". Similarly when a MIB is used an OID such
"1.3.6.1.2.mib-2.system.sysDescr.0" would become "sysDescr.0"
-* Value type is <<number,number>>
-* Default value is `0`
-
[id="plugins-{type}s-{plugin}-walk"]
===== `walk`
+ * Value type is <<array,array>>
+ * There is no default value for this setting
+
Use the `walk` option to retrieve the subtree of information for the given OID(s).
One or more OID(s) are specified as an array of strings of OID(s).
-* Value type is <<array,array>>
-* There is no default value for this setting
-
Queries the subtree of information starting at the given OID(s).
Example
[source,ruby]
-----
@@ -224,18 +243,18 @@
-----
[id="plugins-{type}s-{plugin}-tables"]
===== `tables`
+ * Value type is <<array,array>>
+ * There is no default value for this setting
+ * Results are returned under a field using the table name
+
The `tables` option is used to query for tabular values for the given column OID(s).
Each table definition is a hash and must define the name key and value and the columns to return.
-* Value type is <<array,array>>
-* There is no default value for this setting
-* Results are returned under a field using the table name
-
*Specifying a single table*
[source,ruby]
-----
input {
@@ -265,56 +284,84 @@
These options are required only if you are using SNMPv3.
[id="plugins-{type}s-{plugin}-auth_pass"]
===== `auth_pass`
-The `auth_pass` option specifies the SNMPv3 authentication passphrase or password
+ * Value type is <<password,password>>
+ * There is no default value for this setting
-* Value type is <<password,password>>
-* There is no default value for this setting
+The `auth_pass` option specifies the SNMPv3 authentication passphrase or password.
[id="plugins-{type}s-{plugin}-auth_protocol"]
===== `auth_protocol`
The `auth_protocol` option specifies the SNMPv3 authentication protocol or type
* Value can be any of: `md5`, `sha`, `sha2`, `hmac128sha224`, `hmac192sha256`, `hmac256sha384`, `hmac384sha512`
* There is no default value for this setting
+[id="plugins-{type}s-{plugin}-ecs_compatibility"]
+===== `ecs_compatibility`
+
+ * Value type is <<string,string>>
+ * Supported values are:
+ ** `disabled`: does not use ECS-compatible field names (fields might be set at the root of the event)
+ ** `v1`, `v8`: avoids field names that might conflict with Elastic Common Schema (for example, the `host` field)
+ * Default value depends on which version of Logstash is running:
+ ** When Logstash provides a `pipeline.ecs_compatibility` setting, its value is used as the default
+ ** Otherwise, the default value is `disabled`.
+
+Controls this plugin's compatibility with the {ecs-ref}[Elastic Common Schema (ECS)].
+
[id="plugins-{type}s-{plugin}-priv_pass"]
===== `priv_pass`
-The `priv_pass` option specifies the SNMPv3 encryption password
+ * Value type is <<password,password>>
+ * There is no default value for this setting
-* Value type is <<password,password>>
-* There is no default value for this setting
+The `priv_pass` option specifies the SNMPv3 encryption password.
[id="plugins-{type}s-{plugin}-priv_protocol"]
===== `priv_protocol`
+ * Value can be any of: `des`, `3des`, `aes`, `aes128`, `aes192`, `aes256`
+ * Note that `aes` and `aes128` are equivalent
+ * There is no default value for this setting
+
The `priv_protocol` option specifies the SNMPv3 privacy/encryption protocol.
-* Value can be any of: `des`, `3des`, `aes`, `aes128`, `aes192`, `aes256`
-* Note that `aes` and `aes128` are equivalent
-* There is no default value for this setting
-
[id="plugins-{type}s-{plugin}-security_name"]
===== `security_name`
-The `security_name` option specifies the SNMPv3 security name or user name
+ * Value type is <<string,string>>
+ * There is no default value for this setting
-* Value type is <<string,string>>
-* There is no default value for this setting
+The `security_name` option specifies the SNMPv3 security name or user name.
[id="plugins-{type}s-{plugin}-security_level"]
===== `security_level`
-The `security_level` option specifies the SNMPv3 security level between Authentication, No Privacy; Authentication, Privacy; or no Authentication, no Privacy
+ * Value can be any of: `noAuthNoPriv`, `authNoPriv`, `authPriv`
+ * There is no default value for this setting
-* Value can be any of: `noAuthNoPriv`, `authNoPriv`, `authPriv`
-* There is no default value for this setting
+The `security_level` option specifies the SNMPv3 security level between
+Authentication, No Privacy; Authentication, Privacy; or no Authentication, no Privacy.
+[id="plugins-{type}s-{plugin}-target"]
+===== `target`
+
+ * Value type is <<string,string>>
+ * There is no default value for this setting
+
+The name of the field under which SNMP payloads are assigned.
+If not specified data will be stored in the root of the event.
+
+Setting a target is recommended when <<plugins-{type}s-{plugin}-ecs_compatibility>> is enabled.
+
+[id="plugins-{type}s-{plugin}-examples"]
+==== Configuration examples
+
*Specifying SNMPv3 settings*
[source,ruby]
-----
input {
@@ -329,11 +376,9 @@
security_level => "authPriv"
}
}
-----
-
-==== More configuration examples
*Using both `get` and `walk` in the same poll cycle for each host(s)*
[source,ruby]
-----