pip install -r requirements.txt
sudo npm install -g @commitlint/{config-conventional,cli}
pre-commit install && pre-commit autoupdate && pre-commit install --hook-type commit-msg
cd 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/scripts
sudo systemctl start snmpd
sudo systemctl start snmptrapd
cd /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.py
python main.py --ip 10.0.0.4
python main.py --output output.txt
python main.py --add-routes
python main.py --help
The project is licensed under the GNU General Public License v3.0. See the LICENSE file for more information.