Community discussions

MikroTik App
 
c2h5oh98
just joined
Topic Author
Posts: 2
Joined: Sat Sep 24, 2016 8:17 am

SyslogNG

Tue Oct 04, 2016 3:52 pm

Hi, I have this problem. I need to send to a remote syslog server, a message such as "router number 7 works" every minute. Is there a command that will send a message to the remote syslog server? On DD-WRT I used
logger "router number 7 works"
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 2879
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: SyslogNG

Tue Oct 04, 2016 4:50 pm

Watch and implement :D
SysLOG1.PNG
SysLOG2.PNG
As copy of any message is send to SYSLOG so you can do
:log info "To REMOTE"
and it should be displayed in Log window and copy sent to SYSLOG target
You do not have the required permissions to view the files attached to this post.
 
c2h5oh98
just joined
Topic Author
Posts: 2
Joined: Sat Sep 24, 2016 8:17 am

Re: SyslogNG

Tue Apr 25, 2017 10:02 am

SOLVED
I used for my task script in "Schenuler".
# get IP address from 3G modem
:local getip [/ip address get [find interface=ppp-out1] address]; 
# get rx-byte/tx-byte frome same interface
:local getrx [/interface get ppp-out1 rx-byte];
:local gettx [/interface get ppp-out1 tx-byte];
# send message to SyslogNG where ("log" comand to send message, "info" logging rules, "777" number of device "wifirouter" key word for syslogng server, "$getip $getrx $gettx" variables with data)
:log info "777 wifirouter $getip $getrx $gettx";
In system\logging i create topics "info" with action type "remote" contains Remote Addres "my server addres" Remote Port "514"

Who is online

Users browsing this forum: No registered users and 28 guests