pip install -r requirements.txtsudo npm install -g @commitlint/{config-conventional,cli}
pre-commit install && pre-commit autoupdate && pre-commit install --hook-type commit-msgcd traps
# copy configuration files
sudo cp snmptrapd.conf /etc/snmp
sudo cp snmpd.conf /usr/share/snmp
# copy parser files
sudo mkdir /etc/snmp/scripts
sudo cp traps_parser /etc/snmp/scripts
sudo cp *.py /etc/snmp/scriptssudo systemctl start snmpd
sudo systemctl start snmptrapdcd /etc/snmp/scripts
sudo chmod +x traps_parser----------------------------------------------------
IF STATE CHANGE
ROUTER ID: 12.0.0.1
INTERFACE ID: 12.0.0.1
INTERFACE STATE: BACKUP_DESIGNATED_ROUTER
----------------------------------------------------
IF STATE CHANGE
ROUTER ID: 12.0.0.1
INTERFACE ID: 11.0.0.2
INTERFACE STATE: BACKUP_DESIGNATED_ROUTER
----------------------------------------------------
NEIGHBOR STATE CHANGE
ROUTER ID: 13.0.0.1
OSPF ROUTER STATE: FULL
----------------------------------------------------In this section you'll find some examples about how to use the python-snmp-analyzer tool. Be aware that you have to install the dependencies before you run the tool.
python main.pypython main.py --ip 10.0.0.4python main.py --output output.txtpython main.py --add-routespython main.py --helpThe project is licensed under the GNU General Public License v3.0. See the LICENSE file for more information.