Community discussions

Search found 9 matches

by Gesuino
Wed Oct 02, 2019 2:16 pm
Forum: Scripting
Topic: How to grab via ssh a value
Replies: 3
Views: 452

Re: How to grab via ssh a value

Use API instead of SSH.
Hi thanks for your answer.
Is possible to use API from a RouterOS machine to another Routeros machine?
by Gesuino
Mon Sep 30, 2019 3:17 pm
Forum: Scripting
Topic: How to grab via ssh a value
Replies: 3
Views: 452

How to grab via ssh a value

Hi guys. I need a way to have a remote value on a local variable, i have ssh configured with public keys, no password required from machine1 to machine2 :global Status ([/system ssh-exec address=10.50.0.243 user=admin-ssh command=":put [/system identity get \"name\"]" as-value]->"output") ; /put $St...
by Gesuino
Mon Sep 30, 2019 1:58 pm
Forum: Scripting
Topic: Help with function
Replies: 0
Views: 215

Help with function

Hi guys, i am trying to learn funcion for simplify some of my autoprovisioning script, having some trouble for remote ssh output interpretation. This is an example: /foreach aDev in=[/ppp secret find comment="Autoprovisioning"] do={ #Funcion :global aIP [/ppp secret get $aDev "remote-address"] :glob...
by Gesuino
Mon Sep 02, 2019 1:37 pm
Forum: Scripting
Topic: Delete profile in ppp secret last logged out older than 1 Month
Replies: 2
Views: 375

Re: Delete profile in ppp secret last logged out older than 1 Month

Hi thanks for your answer, i tried the script on page but it seems can't process output of /ppp secret get last-logged-out very well, so i modified this with my needs:
https://wiki.mikrotik.com/wiki/Expire_u ... er_of_days.
by Gesuino
Mon Aug 19, 2019 12:08 pm
Forum: Scripting
Topic: Delete profile in ppp secret last logged out older than 1 Month
Replies: 2
Views: 375

Delete profile in ppp secret last logged out older than 1 Month

Hi guys, need a help. I need a script for deleting older profile in /ppp secret for clients that haven't connected for one month. I dont understand how to processing "latest logged out" value, it is not simple: put [ppp secret get [find name=mgmt] last-logged-out] aug/16/2019 12:10:58 <-How i can pr...
by Gesuino
Fri Jul 26, 2019 9:11 pm
Forum: General
Topic: Feature request for v7.x
Replies: 269
Views: 63725

Re: Feature request for v7.x

Hi please improve dude settings from cli, i love routeros scripting language. I need some instrument for auto adding devices to graphical map, in routeros style like: /dude network-maps rescan "home" that can be triggered by scripts; /dude device add name=" " ip-address =" " type=" .... to-map ="hom...
by Gesuino
Fri Jul 26, 2019 8:53 pm
Forum: Scripting
Topic: Subtract from get given IP
Replies: 3
Views: 668

Re: Subtract from get given IP

Thanks for your answer after many attempt i have found a solution. If you do an addiction to variable +0 is ok, then you can subtract without problems.
Here an example
:set $IP ($IP+0); :set $IP ($IP-1)
by Gesuino
Tue Jun 18, 2019 12:19 pm
Forum: General
Topic: PCQ and hotspot, It is possible?
Replies: 0
Views: 172

PCQ and hotspot, It is possible?

Hi guys, i have a client that have an hotspot radius system, radius is used only for ok or ko no queue limitations. I know the speed incoming from wan (30-DWN / 3-UP) want to equalize entire subnet (10.5.50.0/24) like a normal lan with pcq. I done this: /queue simple add max-limit=3M/30M name=EQ que...
by Gesuino
Mon Jan 21, 2019 5:39 pm
Forum: Scripting
Topic: Subtract from get given IP
Replies: 3
Views: 668

Subtract from get given IP

Hi, i have this problem:
/global IP [/ip neighbor get number=0 address]; :set "$IP" ($IP-1);
Script Error: cannot substract string from time interval
But it work if i set IP variable manually, there is a way to subtract an ip address given by print or get command?

Thanks