Skip to content

Commit dabaef2

Browse files
committed
Add: in_snmp documents and links
1 parent 1ede6b7 commit dabaef2

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

.gitbook.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ redirects:
2424
input/splunk: ./pipeline/inputs/splunk.md
2525
input/serial: ./pipeline/inputs/serial-interface.md
2626
#inputs/statsd: ./pipeline/inputs/
27+
input/snmp: ./pipeline/inputs/snmp.md
2728
input/stdin: ./pipeline/inputs/standard-input.md
2829
input/syslog: ./pipeline/inputs/syslog.md
2930
input/systemd: ./pipeline/inputs/systemd.md

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
* [Prometheus Scrape Metrics](pipeline/inputs/prometheus-scrape-metrics.md)
106106
* [Random](pipeline/inputs/random.md)
107107
* [Serial Interface](pipeline/inputs/serial-interface.md)
108+
* [SNMP](pipeline/inputs/snmp.md)
108109
* [Splunk](pipeline/inputs/splunk.md)
109110
* [Standard Input](pipeline/inputs/standard-input.md)
110111
* [StatsD](pipeline/inputs/statsd.md)

pipeline/inputs/snmp.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# SNMP
2+
3+
The **snmp** input plugin allows you to collect metrics from devices by SNMP(Simple Network Management Protocal) request.
4+
5+
## Configuration Parameters
6+
7+
The plugin supports the following configuration parameters:
8+
9+
| Key | Description |
10+
| :--- | :--- |
11+
| Target\_Host | The target host IP to send the request. Default: `127.0.0.1` |
12+
| Port | The port to send the request. Default: `161` |
13+
| Timeout | The timeout of the request in seconds. Default: `5` |
14+
| Version | The SNMP version to use for the request, currently support `1` and `2c`. Default: `2c` |
15+
| Community | The SNMP community setting to use for the request. Default: `public` |
16+
| Retries |The number of retries for the request. Default: `3` |
17+
| 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)). Default: `get` |
18+
| Oid | The SNMP OID (Object Identifier) setting to use for the request.Default: `1.3.6.1.2.1.1.3.0` (System up time) |
19+
20+
## Getting Started
21+
22+
You can run the plugin from the command line or through the configuration file:
23+
24+
### Command Line
25+
26+
```bash
27+
$ fluent-bit -i snmp -o stdout
28+
Fluent Bit v2.x.x
29+
* Copyright (C) 2015-2022 The Fluent Bit Authors
30+
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
31+
* https://fluentbit.io
32+
[0] snmp.test: [[1689404515.194358800, {}], {"iso.3.6.1.2.1.1.3.0"=>"58"}]
33+
[0] snmp.test: [[1689404516.194328000, {}], {"iso.3.6.1.2.1.1.3.0"=>"59"}]
34+
```
35+
36+
### Configuration File
37+
38+
In your main configuration file append the following _Input_ & _Output_ sections:
39+
40+
```python
41+
[INPUT]
42+
Name snmp
43+
Tag snmp.test
44+
Target_Host 192.168.0.1
45+
Community public
46+
Oid_Type get
47+
Oid 1.3.6.1.2.1.1.3.0
48+
49+
[OUTPUT]
50+
Name stdout
51+
Match *
52+
```

0 commit comments

Comments
 (0)