docs/index.asciidoc in logstash-input-snmp-1.1.0 vs docs/index.asciidoc in logstash-input-snmp-1.2.0

- old
+ new

@@ -57,12 +57,14 @@ |Setting |Input type|Required | <<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>> |<<boolean,boolean>>|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 |======================================================================= ==== SNMPv3 Authentication Options This plugin supports the following SNMPv3 authentication options. @@ -166,18 +168,29 @@ 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` -The `oid_root_skip` option specifies the number of OID root digits to ignore in event field name. +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` + +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` 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). @@ -195,10 +208,45 @@ hosts => [{host => "udp:127.0.0.1/161" community => "public"}] } } ----- +[id="plugins-{type}s-{plugin}-tables"] +===== `tables` + +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 { + snmp { + hosts => [{host => "udp:127.0.0.1/161" community => "public" version => "2c" retries => 2 timeout => 1000}] + tables => [ {"name" => "interfaces" "columns" => ["1.3.6.1.2.1.2.2.1.1", "1.3.6.1.2.1.2.2.1.2", "1.3.6.1.2.1.2.2.1.5"]} ] + } +} +----- + +*Specifying multiple tables* + +[source,ruby] +----- +input { + snmp { + get => ["1.3.6.1.2.1.1.1.0"] + tables => [ {"name" => "interfaces" "columns" => ["1.3.6.1.2.1.2.2.1.1", "1.3.6.1.2.1.2.2.1.2", "1.3.6.1.2.1.2.2.1.5"]}, {"name" => "ltmPoolStatTable" "columns" => ["1.3.6.1.4.1.3375.2.2.5.2.3.1.1", "1.3.6.1.4.1.3375.2.2.5.2.3.1.6"]} ] + } +} +----- + ==== SNMPv3 Authentication Options A **single user** can be configured and will be used for all defined SNMPv3 hosts. Multiple snmp input declarations will be needed if multiple SNMPv3 users are required. These options are required only if you are using SNMPv3. @@ -249,9 +297,28 @@ 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 + +*Specifying SNMPv3 settings* + +[source,ruby] +----- +input { + snmp { + hosts => [{host => "udp:127.0.0.1/161" version => "3"}] + get => ["1.3.6.1.2.1.1.1.0"] + security_name => "mySecurityName" + auth_protocol => "sha" + auth_pass => "ShaPassword" + priv_protocol => "aes" + priv_pass => "AesPasword" + security_level => "authPriv" + } +} + +----- ==== More configuration examples *Using both `get` and `walk` in the same poll cycle for each host(s)*