Skip to content

Commit 582a10d

Browse files
committed
Add: in_snmp documents and links
1 parent 65148d9 commit 582a10d

File tree

3 files changed

+55
-1
lines changed

3 files changed

+55
-1
lines changed

.gitbook.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ redirects:
2626
input/splunk: ./pipeline/inputs/splunk.md
2727
input/serial: ./pipeline/inputs/serial-interface.md
2828
#inputs/statsd: ./pipeline/inputs/
29+
input/snmp: ./pipeline/inputs/snmp.md
2930
input/stdin: ./pipeline/inputs/standard-input.md
3031
input/syslog: ./pipeline/inputs/syslog.md
3132
input/systemd: ./pipeline/inputs/systemd.md

SUMMARY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@
116116
* [Prometheus scrape Metrics](pipeline/inputs/prometheus-scrape-metrics.md)
117117
* [Prometheus text file](pipeline/inputs/prometheus-textfile.md)
118118
* [Random](pipeline/inputs/random.md)
119-
* [Serial interface](pipeline/inputs/serial-interface.md)
119+
* [Serial Interface](pipeline/inputs/serial-interface.md)
120+
* [SNMP](pipeline/inputs/snmp.md)
120121
* [Splunk](pipeline/inputs/splunk.md)
121122
* [Standard input](pipeline/inputs/standard-input.md)
122123
* [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)