Skip to content

Latest commit

 

History

History
64 lines (39 loc) · 2.09 KB

Development.md

File metadata and controls

64 lines (39 loc) · 2.09 KB

These are development notes for working with SNMP and Splunk. I dev on windows so they're all Powershell based

cls ; ./update.ps1 ; splunk cmd splunkd print-modinput-config snmp snmp://HRE | splunk cmd python $env:SPLUNK_HOME/etc/apps/snmpmod/bin/snmp.py

cls ; ./update.ps1 ; splunk cmd splunkd print-modinput-config --debug snmp snmp://HRE 2>&1 > out.tx

./update.ps1 ; splunk cmd splunkd print-modinput-config snmp snmp://HRE

SNMP IFACE

# Print out the config
splunk cmd splunkd print-modinput-config snmpif snmpif://tst | Out-File snmpif.xml

# Run it using the script in the dev directory
cat snmpif.xml | splunk cmd python snmpmod/bin/snmpif.py



./updateDevSplunk.ps1 ; splunk cmd splunkd print-modinput-config snmpif snmpif://tst
cls ; ./updateDevSplunk.ps1 ; splunk cmd splunkd print-modinput-config --debug snmpif snmpif://tst 2>&1 > out.txt
splunk cmd python $env:SPLUNK_HOME/etc/apps/snmpmod/bin/snmpif.py
cls ; ./updateDevSplunk.ps1 ; splunk cmd splunkd print-modinput-config snmpif snmpif://tst | splunk cmd python $env:SPLUNK_HOME/etc/apps/snmpmod/bin/snmpif.py --validate-arguments


# Check the interfaces
snmpwalk -v 3 -u <user> -A <password> 46.17.232.130  IF-MIB::ifDescr

snmpwalk -v 3 -u <user> -A <password> 46.17.232.131 IF-MIB::ifDescr

splunk cmd splunkd print-modinput-config snmpif snmpif://test | splunk cmd python $SPLUNK_HOME/etc/apps/snmpmod/bin/snmpif.py

IPSLA Statistics

./updateDevSplunk.ps1 ; splunk cmd sp1lunkd print-modinput-config ipsla ipsla://tst | splunk cmd python $SPLUNK_HOME/etc/apps/snmpmod/bin/ipsla.py --validate-arguments

# Linux

./update.sh && splunk cmd splunkd print-modinput-config ipsla ipsla://test | splunk cmd python $SPLUNK_HOME/etc/apps/snmpmod/bin/ipsla.py

QOS

splunk cmd python $SPLUNK_HOME/etc/apps/snmpmod/bin/qos.py --scheme

splunk cmd splunkd print-modinput-config qos qos://test | splunk cmd python $SPLUNK_HOME/etc/apps/snmpmod/bin/qos.py --validate-arguments
``

Splunk
======
Update from command line

```shell
splunk install app target/snmpmod.spl -update 1 -auth admin:changeme