Skip to content

Pings hosts within a network and sends an alert email if any are not found. It can also retrieve DHCP reservations from a Mikrotik router and ping those.

Notifications You must be signed in to change notification settings

lalliexperience/MikroTik-Multipinger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MikroTik-Multipinger

Pings hosts within a network and sends an alert email if any are not found. It can also retrieve DHCP reservations from a MikroTik router and ping those.


Additional package installation requirements

Originally built on Python 3.9.6 but I have had no issues with different newer Python versions

pip3 install multiping # https://pypi.org/project/multiping/

pip3 install argparse # https://pypi.org/project/argparse/

pip3 install paramiko # https://www.paramiko.org/installing.html


Example Usage

Ping a predeifned list of addresses in multipinger.json and if something is not found send an email. This does not log in to any of those routers or devices.

python.exe multipinger.py multipinger.json -e [email protected]

Log in to a MikroTik router via SSH and obtain a list of DHCP reservations which contain comments (CTRL-M in winbox). Then ping all of these hosts. This pinging does not occur from the router and is pinging from the host running python:

python.exe multipinger.py -r -e [email protected]


Output Screenshots

Sample of code running. You can schedule it to run automatically with cron or task sceduler for regular checking:

MikroTik Get DHCP Reservations

Sample email:

MikroTik DHCP Reservations send email when device not pingable


Future Update Ideas

  • Make the target router assignable from command line instead of predefined in script.
  • Make all options definable via command line arguments indstead of predefined in script.
  • Make the SSH connection from a MikroTik router instead of from the Pyhon host
  • Community user ideas to expand on a MikroTik toolset

Author

Stan Lalli

🤝 Support

Contributions, issues, and feature requests are welcome!

Give a ⭐️ if you like this project!

About

Pings hosts within a network and sends an alert email if any are not found. It can also retrieve DHCP reservations from a Mikrotik router and ping those.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages