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

Commit

Permalink
fix: use index from config.yaml (#66)
Browse files Browse the repository at this point in the history
* fix: use index from config.yaml

* Update hec_sender.py

Co-authored-by: Addon Factory template <[email protected]>
  • Loading branch information
Ryan Faircloth and Addon Factory template authored Apr 29, 2021
1 parent ba1b3e9 commit 97f1545
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ poetry install
poetry run sc4snmp-traps
```

**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 Down
2 changes: 1 addition & 1 deletion splunk_connect_for_snmp_traps/manager/hec_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def post_data_to_thread_pool(self, host, variables_binds):
data = {
"sourcetype": "sc4snmp:traps",
"host": host,
"index": self._args.index,
"index": self._server_config["splunk"]["index"],
"event": variables_binds,
}

Expand Down
3 changes: 0 additions & 3 deletions splunk_connect_for_snmp_traps/snmp_trap_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ def main():
)
parser.add_argument("-c", "--config", default="config.yaml", help="Config File")

# TODO discuss if we need to move this into config.yaml
parser.add_argument("-i", "--index", default="netops", help="Index for traps")

args = parser.parse_args()

log_level = args.loglevel.upper()
Expand Down

0 comments on commit 97f1545

Please sign in to comment.