A
A
Andrey Yagodka2016-12-12 21:43:29
Mikrotik
Andrey Yagodka, 2016-12-12 21:43:29

Mikrotik how to save reboot logs?

There is a Mikrotik 951G-2HnD (Firmware 6.37.3, Firmware 3.33) a Yota LTE whistle with a static IP is connected to it. Periodically, the Internet disappears and the LTE1 connection hangs as active, the problem was solved as follows:
1. Schedule for startup 5 minutes timeout:

:local PINGCOUNT 10;
:local PINGIP "8.8.8.8";
:log info message="START PING TO $PINGIP";
:local PINGRESULT [/ping $PINGIP count=$PINGCOUNT];
:if ($PINGRESULT > 0) do={
:log info message="PING TO $PINGIP OK";
} else={
:log info message="PINGTEST FAIL";
/system reboot;
}

2. Schedule by startup 5 minutes timeout:
:local PINGCOUNT 10;
:local PINGIP "8.8.8.8";
:log info message="START PING TO $PINGIP";
:local PINGRESULT [/ping $PINGIP count=$PINGCOUNT];
:if ($PINGRESULT > 0) do={
:log info message="PING TO $PINGIP OK";
} else={
:log info message="PINGTEST FAIL";
/system routerboard usb power-reset duration=15s;
}

The question is, I need to track when Mikrotik reboots, or a usb power-reset occurs, it is desirable, of course, that these actions be sent to e-mail. Because after a reboot, the logs are lost.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cool Admin, 2016-12-12
@ifaustrue

configure that info logs are written to a file on the flash (and not to memory, as it is by default). After the start, you can either / and periodically send it (file) to the mail.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question