Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Commit

Permalink
chore: removed unused params
Browse files Browse the repository at this point in the history
  • Loading branch information
lingy1028 authored and mayurah committed Mar 12, 2021
1 parent dc64192 commit cada2d1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ This project connects SNMP Trap sending source to Splunk Enterprise and Splunk E

We use SNMP library for Python under the BSD 2 Clause License https://github.com/etingof/pysnmp

## Development Steps (For Internal Tests)
## Development Instructions for Traps

> This is used as a reference steps while working on development aspects of SNMP Traps component of Splunk Connect for SNMP!
### Get Started
```
git clone git@github.com:splunk/splunk-connect-for-snmp-traps.git
cd "splunk-connect-for-snmp-trapsr"
```

### Install Poetry
`pip3 install poetry`

### Install deps

`poetry install`

### Setup Splunk HEC Environment
```
Expand All @@ -23,13 +28,20 @@ export SPLUNK_HEC_TLS_VERIFY=False
export MIBS_SERVER_URL=<mib-server-url>
```

**Note**: Please refer to here to set up the MIB SERVER: https://github.com/splunk/splunk-connect-for-snmp-mib-server

### Run Trap Server
`poetry run sc4snmp-traps -l debug`

**Note**: The default index for traps is `netops`. You can use `-i` option to specify the index where you want traps to be sent to.
```
poetry install
poetry run sc4snmp-traps
```

`poetry run sc4snmp-traps -l debug -i <index_name>`
**Note**: The default index for traps is `netops`. You can use `-i` option to specify the index where you want traps to be sent to.

```
poetry run sc4snmp-traps -i <index_name>
```

### Send Sample Traps

Expand All @@ -44,6 +56,4 @@ sudo snmptrap -v 2c -c public 0.0.0.0:2162 '' 1.3.6.1.4.1.8072.2.3.0.1 1.3.6.1.4
oid-type1="ObjectName" value1-type="TimeTicks" 1.3.6.1.2.1.1.3.0="123" value1="123" SNMPv2-MIB::sysUpTime.0="123" 正常运行时间="123"
oid-type2="ObjectName" value2-type="ObjectIdentifier" 1.3.6.1.6.3.1.1.4.1.0="1.3.6.1.6.3.1.1.5.1" value2="1.3.6.1.6.3.1.1.5.1" SNMPv2-MIB::snmpTrapOID.0="SNMPv2-MIB::coldStart" 陷阱="None"
oid-type3="ObjectName" value3-type="OctetString" 1.3.6.1.2.1.1.5.0="testk8s" value3="testk8s" SNMPv2-MIB::sysName.0="testk8s"
```


```
4 changes: 1 addition & 3 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ snmp:
- public
- "my-area"
thread-pool:
max-suggested-working-threads: 10
splunk:
index: snmp
max-suggested-working-threads: 10

0 comments on commit cada2d1

Please sign in to comment.