mirror of
https://github.com/pavel-odintsov/fastnetmon
synced 2024-06-06 06:26:39 +02:00
1fdde91cbb | ||
---|---|---|
.. | ||
README.md | ||
bgp_network_collector.py | ||
bgp_network_retriever.py | ||
build_any_package.pl | ||
build_libary_bundle.pl | ||
enable_passthrough_for_pcie_nic_to_kvm_vm.pl | ||
exabgp_network_collector.conf | ||
fastnetmon_notify.py | ||
install_binary.pl | ||
notify_with_slack.sh | ||
reformat_code_with_clang_format.sh | ||
reset_redis_stats |
Here you could find nice scripts for subnet's collection from the BGP router server
- Clone ExaBGP master's repository:
# yum/apt-get install -y python-pip
pip install exabgp
- Download configs and scripts:
wget https://raw.githubusercontent.com/pavel-odintsov/fastnetmon/master/src/scripts/exabgp_network_collector.conf -O/etc/exabgp_network_collector.conf
wget https://raw.githubusercontent.com/pavel-odintsov/fastnetmon/master/src/scripts/bgp_network_retriever.py -O/usr/local/bin/bgp_network_retriever.py
wget https://raw.githubusercontent.com/pavel-odintsov/fastnetmon/master/src/scripts/bgp_network_collector.py -O/usr/local/bin/bgp_network_collector.py
chmod +x /usr/local/bin/bgp_network_retriever.py /usr/local/bin/bgp_network_collector.py
- Run ExaBGP:
cd /usr/src/exabgp
env exabgp.log.level=DEBUG exabgp.daemon.user=root exabgp.tcp.bind="0.0.0.0" exabgp.tcp.port=179 exabgp.daemon.daemonize=false exabgp.daemon.pid=/var/run/exabgp.pid exabgp.log.destination=/var/log/exabgp.log exabgp /etc/exabgp_network_collector.conf
- Wait few minutes while all announces received (depends on router server size)
- Retrieve learned networks from database (/var/lib/bgp_network_collector.db):
python /usr/local/bin/bgp_network_retriever.py