Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ redirects:
input/splunk: ./pipeline/inputs/splunk.md
input/serial: ./pipeline/inputs/serial-interface.md
#inputs/statsd: ./pipeline/inputs/
input/snmp: ./pipeline/inputs/snmp.md
input/stdin: ./pipeline/inputs/standard-input.md
input/syslog: ./pipeline/inputs/syslog.md
input/systemd: ./pipeline/inputs/systemd.md
Expand Down
3 changes: 2 additions & 1 deletion SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@
* [Prometheus scrape Metrics](pipeline/inputs/prometheus-scrape-metrics.md)
* [Prometheus text file](pipeline/inputs/prometheus-textfile.md)
* [Random](pipeline/inputs/random.md)
* [Serial interface](pipeline/inputs/serial-interface.md)
* [Serial Interface](pipeline/inputs/serial-interface.md)
* [SNMP](pipeline/inputs/snmp.md)

Check warning on line 119 in SUMMARY.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [FluentBit.Acronyms] Spell out 'SNMP', if it's unfamiliar to the audience. Raw Output: {"message": "[FluentBit.Acronyms] Spell out 'SNMP', if it's unfamiliar to the audience.", "location": {"path": "SUMMARY.md", "range": {"start": {"line": 119, "column": 6}}}, "severity": "INFO"}
* [Splunk](pipeline/inputs/splunk.md)
* [Standard input](pipeline/inputs/standard-input.md)
* [StatsD](pipeline/inputs/statsd.md)
Expand Down
52 changes: 52 additions & 0 deletions pipeline/inputs/snmp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# SNMP

Check warning on line 1 in pipeline/inputs/snmp.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [FluentBit.Acronyms] Spell out 'SNMP', if it's unfamiliar to the audience. Raw Output: {"message": "[FluentBit.Acronyms] Spell out 'SNMP', if it's unfamiliar to the audience.", "location": {"path": "pipeline/inputs/snmp.md", "range": {"start": {"line": 1, "column": 3}}}, "severity": "INFO"}

Check warning on line 1 in pipeline/inputs/snmp.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [FluentBit.Headings] 'SNMP' should use sentence-style capitalization. Raw Output: {"message": "[FluentBit.Headings] 'SNMP' should use sentence-style capitalization.", "location": {"path": "pipeline/inputs/snmp.md", "range": {"start": {"line": 1, "column": 3}}}, "severity": "INFO"}

The _SNMP_ input plugin lets you collect metrics from devices by SNMP (Simple Network Management Protocol) request.

Check warning on line 3 in pipeline/inputs/snmp.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [FluentBit.Simplicity] Avoid words like "Simple" that imply ease of use, because the user may find this action difficult. Raw Output: {"message": "[FluentBit.Simplicity] Avoid words like \"Simple\" that imply ease of use, because the user may find this action difficult.", "location": {"path": "pipeline/inputs/snmp.md", "range": {"start": {"line": 3, "column": 72}}}, "severity": "WARNING"}

Check warning on line 3 in pipeline/inputs/snmp.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [FluentBit.Acronyms] Spell out 'SNMP', if it's unfamiliar to the audience. Raw Output: {"message": "[FluentBit.Acronyms] Spell out 'SNMP', if it's unfamiliar to the audience.", "location": {"path": "pipeline/inputs/snmp.md", "range": {"start": {"line": 3, "column": 66}}}, "severity": "INFO"}

Check warning on line 3 in pipeline/inputs/snmp.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [FluentBit.Acronyms] Spell out 'SNMP', if it's unfamiliar to the audience. Raw Output: {"message": "[FluentBit.Acronyms] Spell out 'SNMP', if it's unfamiliar to the audience.", "location": {"path": "pipeline/inputs/snmp.md", "range": {"start": {"line": 3, "column": 6}}}, "severity": "INFO"}

## Configuration parameters

The plugin supports the following configuration parameters:

| Key | Description | Default |
| :--- | :--- | :--- |
| `Target_Host` | The target host IP to send the request. | `127.0.0.1` |
| `Port` | The port to send the request. | `161` |
| `Timeout` | The timeout of the request in seconds. | `5` |
| `Version` | The SNMP version to use for the request. Supported versions: `1` and `2c`. | `2c` |

Check warning on line 14 in pipeline/inputs/snmp.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [FluentBit.Acronyms] Spell out 'SNMP', if it's unfamiliar to the audience. Raw Output: {"message": "[FluentBit.Acronyms] Spell out 'SNMP', if it's unfamiliar to the audience.", "location": {"path": "pipeline/inputs/snmp.md", "range": {"start": {"line": 14, "column": 19}}}, "severity": "INFO"}
| `Community` | The SNMP community setting to use for the request. | `public` |

Check warning on line 15 in pipeline/inputs/snmp.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [FluentBit.Acronyms] Spell out 'SNMP', if it's unfamiliar to the audience. Raw Output: {"message": "[FluentBit.Acronyms] Spell out 'SNMP', if it's unfamiliar to the audience.", "location": {"path": "pipeline/inputs/snmp.md", "range": {"start": {"line": 15, "column": 21}}}, "severity": "INFO"}
| `Retries` |The number of retries for the request. | `3` |
| `Oid_Type` | The type of SNMP request to send, current support `get` ([snmpget](https://net-snmp.sourceforge.io/wiki/index.php/TUT:snmpget)) and `walk` ([snmpwalk](https://net-snmp.sourceforge.io/wiki/index.php/TUT:snmpwalk)). | `get` |

Check warning on line 17 in pipeline/inputs/snmp.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [FluentBit.Spelling] Spelling check: 'snmpget'? Raw Output: {"message": "[FluentBit.Spelling] Spelling check: 'snmpget'?", "location": {"path": "pipeline/inputs/snmp.md", "range": {"start": {"line": 17, "column": 74}}}, "severity": "INFO"}

Check warning on line 17 in pipeline/inputs/snmp.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [FluentBit.Acronyms] Spell out 'SNMP', if it's unfamiliar to the audience. Raw Output: {"message": "[FluentBit.Acronyms] Spell out 'SNMP', if it's unfamiliar to the audience.", "location": {"path": "pipeline/inputs/snmp.md", "range": {"start": {"line": 17, "column": 28}}}, "severity": "INFO"}
| `Oid` | The SNMP OID (Object Identifier) setting to use for the request. | `1.3.6.1.2.1.1.3.0` (System up time) |

## Get started

You can run the plugin from the command line or through the configuration file:

### Command line

```bash
$ fluent-bit -i snmp -o stdout
Fluent Bit v2.x.x
* Copyright (C) 2015-2022 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io
[0] snmp.test: [[1689404515.194358800, {}], {"iso.3.6.1.2.1.1.3.0"=>"58"}]
[0] snmp.test: [[1689404516.194328000, {}], {"iso.3.6.1.2.1.1.3.0"=>"59"}]
```

### Configuration file

In your main configuration file append the following sections:

```python
[INPUT]
Name snmp
Tag snmp.test
Target_Host 192.168.0.1
Community public
Oid_Type get
Oid 1.3.6.1.2.1.1.3.0

[OUTPUT]
Name stdout
Match *
```
Loading