Wouldn't it be easier to have the logs sent to a syslog server, then monitor the one log?
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373 On Mon, Mar 7, 2016 at 2:56 PM, Ty Featherling <tyfeatherl...@gmail.com> wrote: > I don't have a clue but I would love if you'd share the finished result. > That would be very useful. > > -Ty > > > > -Ty > > On Mon, Mar 7, 2016 at 1:22 PM, Christopher Tyler < > ch...@totalhighspeed.net> > wrote: > > > I'm in need of a little scripting assistance. I'm trying to write a > router > > script that gets the current link speed of all the interfaces on a router > > and compare that against the previous value that was received from that > > same script. > > > > Below is the script that I have so far. Right now it loops through all of > > the interfaces, checks to see if there is an active Ethernet link, then > it > > gets the current rate and compares it to the string "1Gbps", if it's not > > 1Gbps it then puts a message in the log for for that interface. What I > > can't figure out is how to store a variable as part of the variable name > so > > that I can compare it to the current value to see if the link changed, > > which is what I really want to know. But I need that stored value in > order > > to check against it, rather than the string 1Gbps. > > > > :global identity ([/system identity get name]) > > :foreach interface in=[/interface ethernet find] do={ > > /interface ethernet monitor numbers=$interface once do={ > > :if ("$status" = "link-ok") do { > > :if ("$rate" != "1Gbps") do { > > :log info message=($name . " is set to " . $rate) > > }}}} > > > > This will eventually send an email, I just have it logging right now to > > keep my inbox from getting flooded. And before anyone says it. Yes, I > know > > that the built in logging can do this, but we have over 100 routers and > > figuring out which one sent out a message is not an entirely non-time > > consuming task, and I ultimately we would like a little more information > in > > the email than what the logging system provides. > > > > Any assistance is greatly appreciated. > > > > -- > > Christopher Tyler > > MTCRE/MTCNA/MTCTCE/MTCWE > > Total Highspeed Internet Services > > 417.851.1107 > > > > _______________________________________________ > > Mikrotik mailing list > > Mikrotik@mail.butchevans.com > > http://mail.butchevans.com/mailman/listinfo/mikrotik > > > > Visit http://blog.butchevans.com/ for tutorials related to Mikrotik > > RouterOS > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.butchevans.com/pipermail/mikrotik/attachments/20160307/8c3c921c/attachment.html > > > _______________________________________________ > Mikrotik mailing list > Mikrotik@mail.butchevans.com > http://mail.butchevans.com/mailman/listinfo/mikrotik > > Visit http://blog.butchevans.com/ for tutorials related to Mikrotik > RouterOS > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.butchevans.com/pipermail/mikrotik/attachments/20160307/f9e887a9/attachment.html> _______________________________________________ Mikrotik mailing list Mikrotik@mail.butchevans.com http://mail.butchevans.com/mailman/listinfo/mikrotik Visit http://blog.butchevans.com/ for tutorials related to Mikrotik RouterOS