Community discussions

MikroTik App

Search found 29 matches

by UNiXMIT
Wed Apr 15, 2020 12:34 am
Forum: Scripting
Topic: SFTP upload with variable [SOLVED]
Replies: 8
Views: 5925

Re: SFTP upload with variable [SOLVED]

Hi UNiXMIT, I managed to figure out what's goin on with my script and now its fully working. Your post help me a lot!! Thanks again. My script: :global name=backupfile value=([/system identity get name] . [:pick [/system clock get date] 7 11] . [:pick [/system clock get date] 0 3] . [:pick [/system...
by UNiXMIT
Tue Apr 14, 2020 5:48 pm
Forum: Scripting
Topic: SFTP upload with variable [SOLVED]
Replies: 8
Views: 5925

Re: SFTP upload with variable [SOLVED]

Thanks for your reply!! Are you also using a variable $backupfile or have you removed that part? Im using it (Im kind of new in scripting) If you enter the command directly in a terminal does it give an error message? This message: "status: failed failure: Is a directory" Can you post the command y...
by UNiXMIT
Tue Apr 14, 2020 4:17 pm
Forum: Scripting
Topic: SFTP upload with variable [SOLVED]
Replies: 8
Views: 5925

Re: SFTP upload with variable [SOLVED]

OK ignore me. I must have not had the variable set correctly. The following works now for me: :global backupfile; :global backupname; /tool fetch url="sftp://10.0.0.2/path/to/file/$backupfile" user=usr password=passw upload=yes I tried the same (I just changed the sftp settings up there) but didnt ...
by UNiXMIT
Wed Mar 04, 2020 1:20 pm
Forum: Scripting
Topic: SFTP upload with variable [SOLVED]
Replies: 8
Views: 5925

Re: SFTP upload with variable [SOLVED]

OK ignore me. I must have not had the variable set correctly. The following works now for me:

:global backupfile; :global backupname; /tool fetch url="sftp://10.0.0.2/path/to/file/$backupfile" user=usr password=passw upload=yes
by UNiXMIT
Wed Mar 04, 2020 12:52 pm
Forum: Scripting
Topic: SFTP upload with variable [SOLVED]
Replies: 8
Views: 5925

Re: SFTP upload with variable [SOLVED]

I think I need to combine both my attempts and set the variable on the URL and the src-path for it to work.
by UNiXMIT
Wed Mar 04, 2020 12:26 pm
Forum: Scripting
Topic: SFTP upload with variable [SOLVED]
Replies: 8
Views: 5925

SFTP upload with variable [SOLVED]

The following works fine: :global backupfile; :global backupname; /tool fetch url=" sftp://10.0.0.2/path/to/filename.backup" user=usr password=passw upload=yes but I am trying to upload a weekly backup so the name of the file is always different. It worked using FTP fine previously using $backupfile...
by UNiXMIT
Sun Apr 29, 2018 11:44 pm
Forum: General
Topic: Script to remove a file issue [SOLVED]
Replies: 7
Views: 1610

Re: Script to remove a file issue [SOLVED]

Ok I understand what you are saying now. Works now thank you. I understood by reading the docs that the variable was already shared between scripts. And using the same script in terminal works. Anyway it’s all good now thanks.
by UNiXMIT
Fri Apr 27, 2018 6:48 pm
Forum: General
Topic: Script to remove a file issue [SOLVED]
Replies: 7
Views: 1610

Re: Script to remove a file issue [SOLVED]

When the global variable has been set in the first script, in a different script can I call it directly or do I have to read it and store it locally first?
by UNiXMIT
Fri Apr 27, 2018 6:39 pm
Forum: General
Topic: Script to remove a file issue [SOLVED]
Replies: 7
Views: 1610

Re: Script to remove a file issue [SOLVED]

When you are using in an other script then written to the global variable you have put into the other script at start : set backupfile . I'm sorry I don't understand. Script 1 - This script sets the variable using :global backupfile ($backupname.".backup"); Script 2 - This script uses the variable ...
by UNiXMIT
Fri Apr 27, 2018 6:01 pm
Forum: General
Topic: Script to remove a file issue [SOLVED]
Replies: 7
Views: 1610

Re: Script to remove a file issue [SOLVED]

I would assume that either $backupfile variable is not defined or nothing is stored in it when executing script.
That variable is set in the Environment and my other script that uploads a file using FTP also uses this variable and it works.
by UNiXMIT
Fri Apr 27, 2018 5:21 pm
Forum: General
Topic: Script to remove a file issue [SOLVED]
Replies: 7
Views: 1610

Script to remove a file issue [SOLVED]

I have a script to remove a backup file and it doesn't work. All it contains is:

/file remove $backupfile

I have set all the permissions and still no joy. If I enter that command into the terminal it's fine. Is this a limitation or am I doing something wrong?
Thanks
by UNiXMIT
Wed Jan 10, 2018 4:21 pm
Forum: Scripting
Topic: Script help [SOLVED]
Replies: 3
Views: 656

Re: Script help [SOLVED]

I tried this again from scratch entering it manually into the terminal to test it. Now it works. Must have been a formatting issue. Thanks
by UNiXMIT
Fri Jan 05, 2018 9:00 pm
Forum: Scripting
Topic: Script help [SOLVED]
Replies: 3
Views: 656

Re: Script help [SOLVED]

Permissions of script maybe?
Don’t think so. Similar scripts with the email part work fine with the same permissions.
by UNiXMIT
Fri Jan 05, 2018 1:19 pm
Forum: General
Topic: Mikrotik will lose internet connection under heavy download usage [SOLVED]
Replies: 10
Views: 2301

Re: Mikrotik will lose internet connection under heavy download usage [SOLVED]

I had my workaround set up which worked but I have noticed that it doesn't happen anymore. May have been an issue with the ISP. Thanks
by UNiXMIT
Fri Jan 05, 2018 1:12 pm
Forum: Scripting
Topic: Script help [SOLVED]
Replies: 3
Views: 656

Script help [SOLVED]

I'm stuck. This works: :if ([/interface get [/interface find name="VPN"] running] = false) do={ /log info Test } This doesn’t work: :if ([/interface get [/interface find name="VPN"] running] = false) do={ /tool e-mail send to=email@address.com subject="SUBJECT" body="BODY" } But this command works o...
by UNiXMIT
Sat Oct 21, 2017 12:15 am
Forum: General
Topic: Issues with station-psuedobridge [SOLVED]
Replies: 4
Views: 830

Re: Issues with station-psuedobridge [SOLVED]

Ok so I swapped it round and it didn’t work UNTIL I changed the frequency on wlan1 and manually set it rather than have it set to auto. That means that wlan1 is always up broadcasting an ssid so I can connect even if the Virtual AP isn’t connected to another WiFi. Excellent.
by UNiXMIT
Fri Oct 20, 2017 5:09 pm
Forum: General
Topic: Issues with station-psuedobridge [SOLVED]
Replies: 4
Views: 830

Re: Issues with station-psuedobridge [SOLVED]

Switch it around, what's the worst that can happen?
I'll give it a go when I get home. I was just being impatient. I can't access it at the moment to try it.
Thanks
by UNiXMIT
Fri Oct 20, 2017 5:03 pm
Forum: General
Topic: Issues with station-psuedobridge [SOLVED]
Replies: 4
Views: 830

Issues with station-psuedobridge [SOLVED]

I have set up my map lite with wlan1 set as station-psuedobridge to connect to a WIFI network. WLAN2 is a virtual ap so I can connect to my map lite and that works but only when WLAN1 has successfully connected to a network. If WLAN1 hasn't managed to connect to a network then WLAN2 doesn't broadcas...
by UNiXMIT
Wed Oct 11, 2017 6:09 pm
Forum: General
Topic: Mikrotik will lose internet connection under heavy download usage [SOLVED]
Replies: 10
Views: 2301

Re: Mikrotik will lose internet connection under heavy download usage [SOLVED]

For now my workaround using Netwatch to run a script that restarts my PPPoE connection is working so that's fine (Netwatch will send me an email when it occurs so I will know if the next step isn't working). I have put a max limit on Rx below my max broadband speed to see if that helps. I'll try and...
by UNiXMIT
Mon Oct 09, 2017 11:51 am
Forum: General
Topic: Mikrotik will lose internet connection under heavy download usage [SOLVED]
Replies: 10
Views: 2301

Re: Mikrotik will lose internet connection under heavy download usage [SOLVED]

Could it be saturation? Have you tried capping the bandwidth just below your max speed to see if it will keep it alive?
Thanks jspool I'll try that.

BartoszP - Sorry I forgot to reply about that. No I cannot ping anything outside when it goes down.

Thanks
by UNiXMIT
Thu Oct 05, 2017 5:24 pm
Forum: General
Topic: Mikrotik will lose internet connection under heavy download usage [SOLVED]
Replies: 10
Views: 2301

Re: Mikrotik will lose internet connection under heavy download usage [SOLVED]

UPDATE: It happened again so I disabled the PPPoE interface then enabled it and it started working again. I have now created script on netwatch so this now happens automatically when it goes down.

So is my ISP at fault or my PPPoE interface do you think?
by UNiXMIT
Thu Oct 05, 2017 5:21 pm
Forum: General
Topic: Broadcast and Multicast over VPN (PPP)
Replies: 11
Views: 5847

Re: Broadcast and Multicast over VPN (PPP)

EoIP is amazing and I highly recommend it. Works a treat. Thanks.
Excellent, did you use my example above or did you find EoIP before I posted?
I just checked back on this and in the meantime my friend suggested EoIP. Just thought I would chime in and say how great it was.
by UNiXMIT
Wed Oct 04, 2017 6:26 pm
Forum: General
Topic: Mikrotik will lose internet connection under heavy download usage [SOLVED]
Replies: 10
Views: 2301

Re: Mikrotik will lose internet connection under heavy download usage [SOLVED]

I'll do some more tests but it's odd that it works again after I restart the Mikrotik. If I leave it and do nothing it doesn't help the situation. Thanks so far.
by UNiXMIT
Wed Oct 04, 2017 2:30 pm
Forum: General
Topic: Using Splunk to analyse MikroTik logs
Replies: 98
Views: 21440

Re: Using Splunk to analyse MikroTik logs

Looks great. Is this the Splunk Cloud? I can't find the Mikrotik app for Splunk Cloud only for Splunk Enterprise.
by UNiXMIT
Wed Oct 04, 2017 12:20 pm
Forum: General
Topic: Mikrotik will lose internet connection under heavy download usage [SOLVED]
Replies: 10
Views: 2301

Mikrotik will lose internet connection under heavy download usage [SOLVED]

I'm running v6.40.3 on my Mikrotik and I connect to my ISPs fibre box using pppoe. When the Mikrotik is under heavy download usage like downloading software and someone watching Netflix at the same time, the Mikrotik will lose internet connection. The Mikrotik stays on and all LAN connections are fi...
by UNiXMIT
Wed Oct 04, 2017 12:12 pm
Forum: General
Topic: Broadcast and Multicast over VPN (PPP)
Replies: 11
Views: 5847

Re: Broadcast and Multicast over VPN (PPP)

EoIP is amazing and I highly recommend it. Works a treat. Thanks.
by UNiXMIT
Sat Oct 22, 2016 1:27 am
Forum: General
Topic: Webfig stopped working [SOLVED]
Replies: 1
Views: 701

Webfig stopped working [SOLVED]

SOLVED. Found a rogue rule forwarding port 80 to nowhere. All fixed.
by UNiXMIT
Sat Oct 22, 2016 1:05 am
Forum: General
Topic: Webfig stopped working [SOLVED]
Replies: 1
Views: 701

Webfig stopped working [SOLVED]

Webfig stopped working locally and remotely. I can't access it. Any ideas why it would do this? Could there be a setting I'm overlooking? I can still connect via winbox and telnet. www on port 80 is running apparently. IP address I try is the one I've always used to access it. I'm stumped. Thanks in...
by UNiXMIT
Fri Jan 22, 2016 10:25 pm
Forum: General
Topic: Broadcast and Multicast over VPN (PPP)
Replies: 11
Views: 5847

Re: Broadcast and Multicast over VPN (PPP)

Did you ever get this working? I have the same issue.

Thanks.