Community discussions

MikroTik App
 
User avatar
azurtem
Trainer
Trainer
Topic Author
Posts: 217
Joined: Mon May 16, 2011 5:35 pm
Location: Nice, France
Contact:

reditrect log output in script

Fri Mar 14, 2014 4:51 pm

Hi

I picked up the following script that allowed me to group
together into one single log line three details pertaining
to a hotspot user:

:local who $user;
:local macaddr [/ip hotspot active get [find user=$who] mac-address];
:local ipaddr [/ip hotspot host get [find mac-address=$macaddr] address];
:log info ("utilisateur: [".$who."] - adresse IP: [".$ipaddr."] - adresse MAC: [".$macaddr."]");

My question is the following: "how can I redirect the
output from the log line to a remote location" ?

thanks
yann
 
User avatar
c0d3rSh3ll
Long time Member
Long time Member
Posts: 558
Joined: Mon Jul 25, 2011 9:42 pm
Location: [admin@Chile] >

Re: reditrect log output in script

Fri Mar 14, 2014 9:30 pm

you can do with action remote in system-->loggin menu for info topic.

http://wiki.mikrotik.com/wiki/Manual:System/Log


the problem is that all loging info topic are send to remote syslog.
nothing
 
User avatar
azurtem
Trainer
Trainer
Topic Author
Posts: 217
Joined: Mon May 16, 2011 5:35 pm
Location: Nice, France
Contact:

Re: reditrect log output in script

Fri Mar 14, 2014 10:06 pm

Well, actually, initial tests lead me to believe that
it won't be all "info", but rather "script, info"
that will be redirected by my custom action,
which is really all I was looking for

thanks c0d3rSh3ll
 
Tcruise02
just joined
Posts: 1
Joined: Sat Feb 07, 2015 9:53 am

Re: reditrect log output in script

Sat Feb 07, 2015 11:20 am

:D Hello, Sorry for the long explanation, I think what I am looking for is Automatically provisioning RouterBoards as CPE devices for auto VPN connections back to the main office from the remote client office
KazUyA

Who is online

Users browsing this forum: No registered users and 14 guests