Skip to content

A program that analyzes the network by asking Cisco routers using the snmp protocol ๐ŸŒ

License

Notifications You must be signed in to change notification settings

SNMP-Python/snmp-data-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

SNMP analyzer tool ๐Ÿ

Summary

Installing dependencies and environment for the snmp analyzer๐ŸŒฒ:

Install the development and build dependencies ๐Ÿ“ฆ

pip install -r requirements.txt

Install the git hooks for following the development standards ๐Ÿง

sudo npm install -g @commitlint/{config-conventional,cli}
pre-commit install && pre-commit autoupdate && pre-commit install --hook-type commit-msg

Set up the trap catcher ๐Ÿฅ…

Copy the trap configuration and parser files

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

Start the snmpd and snmpdtrap services

sudo systemctl start snmpd
sudo systemctl start snmptrapd

Give executable permissions to the traps_parser script in case it doesn't have permissions

cd /etc/snmp/scripts
sudo chmod +x traps_parser

Check output and see traps info in /var/log/logs_parsed.txt ๐Ÿฆ†

----------------------------------------------------
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
----------------------------------------------------

Usage ๐Ÿ“•

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.

Execute the tool with the default values

python main.py

Execute the tool and add directly an ip address

python main.py --ip 10.0.0.4

Execute the tool and save the output to a file

python main.py --output output.txt

Execute the tool and save the routes that the program discovers to your routing table

python main.py --add-routes

Search for help

python main.py --help

License ๐Ÿ‘ฎ

The project is licensed under the GNU General Public License v3.0. See the LICENSE file for more information.

About

A program that analyzes the network by asking Cisco routers using the snmp protocol ๐ŸŒ

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •