Page 1 of 1

Ethernet Rate Detector Project !  [SOLVED]

Posted: Sun Mar 24, 2019 5:14 pm
by katem07
Hey all

I have more than 30 Mikrotik servers over my network, Recently i had a problem with my rj45 connectors due to humidity and rain

The problem as known is to get ethernet rate "10Mbps", So i tried to make a simple script .. who will check all my Ethernet names and rate's every while of time, And to report me by Telegram bot if there is a "10Mbps" Ethernet rate with a message contains the damaged ethernet name ...

All is working fine, Except to define the damaged one, it fails with me ...

So i'm looking for The Genius Guy :D
/interface ethernet monitor [find] once do={
:if ($"rate" = "10Mbps") do={
/tool fetch "https://api.telegram.org/botXXX/sendMessage\?chat_id=XXXX&text=Ether $XXX rate is 10Mbps" keep-result=no;}
}
I think it's Possible to success !

Re: Ethernet Rate Detector Project !

Posted: Thu Mar 28, 2019 11:06 pm
by katem07
:shock:

Re: Ethernet Rate Detector Project !

Posted: Fri Mar 29, 2019 8:17 am
by Jotne
What is the question?

Since script does works fine and I do work using Splunk to monitor Mikrotik (see link in my signature) I would have sent data out suing syslog.

Some like this:
/interface ethernet monitor [find] once do {:if ($rate="1Gbps") do {:log info message=("interface=".$name." speed=".$rate)}}
Er even better, send all interface speed at every schedule so you can graph it nicely over time.
/interface ethernet monitor [find] once do {:log info message=("interface=".$name." speed=".$rate)}