Community discussions

MikroTik App
 
informant
newbie
Topic Author
Posts: 28
Joined: Wed Jul 22, 2015 10:33 am

log entry/line send to url

Tue Feb 26, 2019 5:16 pm

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
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3334
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: log entry/line send to url

Tue Feb 26, 2019 5:27 pm

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
 
informant
newbie
Topic Author
Posts: 28
Joined: Wed Jul 22, 2015 10:33 am

Re: log entry/line send to url

Tue Feb 26, 2019 5:32 pm

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
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3334
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: log entry/line send to url

Tue Feb 26, 2019 6:09 pm

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

Who is online

Users browsing this forum: Bing [Bot] and 11 guests