Page 1 of 1

log entry/line send to url

Posted: Tue Feb 26, 2019 5:16 pm
by informant
Hi all, i need a little bit your help,
i would create a small script that do send a log entry to a external http url

for exsample, if a customer with pppoe disconnect:
on Down Script :
cust-1234 logged out, 39 54 2067 3 13 <<< this is log entry on disconnect

send this log entry/log line to a url for exsample: https://www.mytest.com/?data=logline

how can i do it, can you help my please. thanks and bet regards

Re: log entry/line send to url

Posted: Tue Feb 26, 2019 5:27 pm
by Jotne
Not an direct answer to you question, but why can you not just send all log to an external log server.
Splunk is free for up to 500MB log a day and then you can read all line using http.
There are several tools to graph it to look nice.

See link in my signature on how to use Splunk with MikroTik

Re: log entry/line send to url

Posted: Tue Feb 26, 2019 5:32 pm
by informant
hi we need only this line in our external script, but dont have a idea to do it :( a log server for it is not so good well not directly data was in our database ;/
i hope you can help to find a script to do it .
regards

Re: log entry/line send to url

Posted: Tue Feb 26, 2019 6:09 pm
by Jotne
This may be a start for you.
Reads the logs and takes action depending on log line.
https://wiki.mikrotik.com/wiki/Log_Pars ... ger_Script