Community discussions

MikroTik App

Search found 14 matches

by ninet
Wed Nov 24, 2010 4:55 pm
Forum: The Dude
Topic: BUG: Custom logs reseted to default after Windows reboot
Replies: 24
Views: 7535

Re: Bug - logs reseted to default after Windows reboot

Ok gsandul, now you move from karma No. 13 :)...
it looks much easier now with http, so I have parameters for playing arround. I also opened inbound rule for web access in LAN. If I succeed with PowerShell script on my Win2008 I`ll post it here.

Thank you.
by ninet
Wed Nov 24, 2010 3:40 pm
Forum: The Dude
Topic: BUG: Custom logs reseted to default after Windows reboot
Replies: 24
Views: 7535

Re: Bug - logs reseted to default after Windows reboot

Exactly, what we need -> we already have with new backup procedure in 4.02 beta. No matter if everything is zipped (included rest of files), it would be all dude backup itself anyway, dozen MB every day more or less... Just to find out how to automate dude backup on daily basis...
by ninet
Wed Nov 24, 2010 2:03 pm
Forum: The Dude
Topic: BUG: Custom logs reseted to default after Windows reboot
Replies: 24
Views: 7535

Re: Bug - logs reseted to default after Windows reboot

thank you for reply normis, I know that, this is ok. But anyway we have to copy those old files each day and compress on backup storage, what can be accomplished now through new dude backup way - tar.gz. Story is: by the new law we are obligated to keep certain log files up to 12 months (!), as we h...
by ninet
Wed Nov 24, 2010 1:04 pm
Forum: The Dude
Topic: BUG: Custom logs reseted to default after Windows reboot
Replies: 24
Views: 7535

Re: Bug - logs reseted to default after Windows reboot

Actually we are quite satisfied with new .tar.gz backup format so there is no need to compress all those log files within dude separately since there are already compressed on proper way. How we can automate backup, for example every day 5am run export and specify location? Is it possible using some...
by ninet
Tue Nov 23, 2010 2:06 pm
Forum: The Dude
Topic: BUG: Custom logs reseted to default after Windows reboot
Replies: 24
Views: 7535

Re: Bug - logs reseted to default after Windows reboot

Excellent! I have been created several instances in Logs, and all are still there after reboot! Naturally there is some short gap in logging during restart, but logging continues to fill in existing log file. Now, we have a new question, imagine we have 50 log instances (logs) in Dude Syslog (50 rou...
by ninet
Mon Nov 22, 2010 2:46 pm
Forum: The Dude
Topic: Dude Syslog BUG
Replies: 1
Views: 861

Re: Dude Syslog BUG

This syslog bug is really frustrating. It`s mentioned here: http://forum.mikrotik.com/viewtopic.php?f=8&t=41757 and now it`s not fixed even in beta2 version? Does it mean it would not be fixed at all in version 4? We also have dedicated box for monitoring numbered points, intended to use Syslog - ev...
by ninet
Fri Nov 27, 2009 12:37 pm
Forum: Scripting
Topic: Show flags in ssh output (Array)
Replies: 2
Views: 831

Re: Show flags in ssh output (Array)

solved! :D
$test = explode(';', conn_exec(":put [/user get ".$user." disabled]"));
print_r ($test);
will give the output:
Array ( [0] => false ) 
if user $user is disabled, otherwise will be true.
by ninet
Wed Nov 25, 2009 5:36 pm
Forum: Scripting
Topic: Show flags in ssh output (Array)
Replies: 2
Views: 831

Show flags in ssh output (Array)

Hello, After playing around with API I have decided to work with ssh, using ssh2_shell. Executing scripts works fine, a bit more tricky is with report, and here is one question for you guys: How I can read Flags from array? For example, If I wanna get list of users I`ll simple ran explode(';', conn_...
by ninet
Wed Aug 12, 2009 11:16 pm
Forum: Scripting
Topic: Php SSH2 fetch OUTPUT from Mikrotik
Replies: 1
Views: 1119

Php SSH2 fetch OUTPUT from Mikrotik

Hello, I have started with PHP API (topic http://forum.mikrotik.com/viewtopic.php?f=9&t=34084), but wanted to keep same CLI syntax, what is not possible what I didn`t know at the beginning. Since I wanted to preserve original syntax, I have found SSH2 for php, and despite tricky installation, I was ...
by ninet
Wed Aug 12, 2009 2:34 pm
Forum: Scripting
Topic: basic help with PHP API
Replies: 23
Views: 6465

Re: basic help with PHP API

Hello again, all commands which I wanted to execute - manage users, playing around with firewall rules - have completed without any issues, syntax is exactly same as I wanted to do in CLI (what was the idea), but now I have the problem to get the OUTPUT? I read many forums and there are lot of repor...
by ninet
Tue Aug 11, 2009 5:20 pm
Forum: Scripting
Topic: basic help with PHP API
Replies: 23
Views: 6465

Re: basic help with PHP API

it works finally! topic: http://forum.mikrotik.com/viewtopic.php?f=9&t=22763 helped me to setup connection: $methods = array ( 'kex' => 'diffie-hellman-group1-sha1' ); if(!($con = ssh2_connect("10.11.10.11", 22, $methods))){ echo "fail: unable to establish connection\n"; . . . . and now I can run re...
by ninet
Tue Aug 11, 2009 1:39 pm
Forum: Scripting
Topic: basic help with PHP API
Replies: 23
Views: 6465

Re: basic help with PHP API

well, still nothing :(... anyway now I`m keen to try solution were I can be more comfortable - execute regular CLI command, get output and parse it in web page. I have installed php ssh2 (a bit tricky indeed) and works fine when I wanna connect to some other server and execute some shell command. He...
by ninet
Mon Aug 10, 2009 5:11 pm
Forum: Scripting
Topic: basic help with PHP API
Replies: 23
Views: 6465

Re: basic help with PHP API

Thank you mrz for your reply, I got the point, however with your code I didn`t got new user on my test router, browser output is: Connection attempt #1 to 10.11.10.11:8728... <<< [6] /login 5 >>> [5/5 bytes read. >>> [5, 39] !done 37 >>> [37/37 bytes read. >>> [37, 1] =ret=0d12ec731390d33d96d7596616...
by ninet
Mon Aug 10, 2009 4:07 pm
Forum: Scripting
Topic: basic help with PHP API
Replies: 23
Views: 6465

basic help with PHP API

Hello, I`m trying PHP API with test router - v3.23 API service enabled. I wanna add test user on test router, but without success. $API = new routeros_api(); $API->debug = true; if ($API->connect('10.11.10.11', 'user', 'pass')) { $API->write('/user add group=full name=test22 password=test123', false...