Community discussions

MikroTik App
 
User avatar
anav
Forum Guru
Forum Guru
Topic Author
Posts: 6190
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Script to Report DHCP CLient Changes

Tue Feb 23, 2021 5:38 pm

hi the logging tools are not very specific in terms of pinpointing when dhcp client leases change etc.
I would like the router to be able to email a log item but the logging rules are like a sledgehammer, while
I only need a pencil so to speak.

Thus looking for a a short script that will meet the following basic requirements.
Most of you can do this in your sleep I presume.
I note that the data is often found in dhcp, info or interface, info

a. IF keyword "joe" is found in log settings dhcp,info
b. email that log entry to myemailaddress.com

To get to something like:
if keywords Joe OR harry are found in log settings dhcp,info OR interface,info
then email that logging entry to myemailaddress.com.
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
MTUNA Certified, by the Ascerbic Llama!

Who is online

Users browsing this forum: danielcada and 25 guests