Community discussions

MikroTik App
 
aSelfLion
just joined
Topic Author
Posts: 18
Joined: Sun Sep 23, 2012 9:47 pm

'[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 1:34 pm

Hello

I am getting an error as 'input does not match any value of value-name'.
My script is as below
'
:foreach i in=[find] do={:put ([get $i block-access].','.[get $i address].','.[get $i mac-address].',' .[get $i client-id].','.[get $i server].','.[get $i active-address].','.[get $i active-mac-address].' ,'.[get $i active-host-name]) }
'
'[get $i active-host-name]' only when I add this part;
'input does not match any value of value-name'

I get this error.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7038
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: '[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 1:55 pm

From which menu? Are you sure that this parameter even exist in the menu you are trying to get it from?
 
aSelfLion
just joined
Topic Author
Posts: 18
Joined: Sun Sep 23, 2012 9:47 pm

Re: '[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 3:03 pm

From which menu? Are you sure that this parameter even exist in the menu you are trying to get it from?
I am absolutely sure.
I took a screenshot. attached.
You do not have the required permissions to view the files attached to this post.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7038
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: '[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 3:14 pm

no there isn't,

write in the terminal "get 0" and press tab to see all the valid parameter names.
 
aSelfLion
just joined
Topic Author
Posts: 18
Joined: Sun Sep 23, 2012 9:47 pm

Re: '[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 3:30 pm

It also brings only 1000 thread lists in the terminal.
I have a list of 1500 threads.
How can I get them all?

Or I can export to an excel sheet or csv or txt.
 
aSelfLion
just joined
Topic Author
Posts: 18
Joined: Sun Sep 23, 2012 9:47 pm

Re: '[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 3:30 pm

no there isn't,

write in the terminal "get 0" and press tab to see all the valid parameter names.
I did not understand or could not do this.

Could you give an example, please.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: '[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 3:32 pm

Maybe if you pay atteNtioN to how you write ... oN the forum you wrote one thiNg, in the screeNshot there is aNother !!!

active-host-name do not exist, you must use host-name

try to avoid morse code '.'.'.'.'.' ...
:foreach i in=[find] do={
    :put "$[get $i block-access],$[get $i address],$[get $i mac-address],$[get $i client-id],$[get $i server],$[get $i active-address],$[get $i active-mac-address],$[get $i host-name]"
}
 
aSelfLion
just joined
Topic Author
Posts: 18
Joined: Sun Sep 23, 2012 9:47 pm

Re: '[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 3:44 pm

Teşekkürler
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: '[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 3:55 pm

:) 
 
aSelfLion
just joined
Topic Author
Posts: 18
Joined: Sun Sep 23, 2012 9:47 pm

Re: '[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 4:04 pm

:) 
 
aSelfLion
just joined
Topic Author
Posts: 18
Joined: Sun Sep 23, 2012 9:47 pm

Re: '[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 4:12 pm

Maybe if you pay atteNtioN to how you write ... oN the forum you wrote one thiNg, in the screeNshot there is aNother !!!

active-host-name do not exist, you must use host-name

try to avoid morse code '.'.'.'.'.' ...
:foreach i in=[find] do={
    :put "$[get $i block-access],$[get $i address],$[get $i mac-address],$[get $i client-id],$[get $i server],$[get $i active-address],$[get $i active-mac-address],$[get $i host-name]"
}
My friend;

It also brings only 1000 thread lists in the terminal.
I have a list of 1500 threads.
How can I get them all?

Or I can export to an excel sheet or csv or txt.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: '[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 4:19 pm

You have 1500 threads items?

Where you read it?

try
print count-only
and see what number appear
 
aSelfLion
just joined
Topic Author
Posts: 18
Joined: Sun Sep 23, 2012 9:47 pm

Re: '[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 4:27 pm

You have 1500 threads items?

Where you read it?

try
print count-only
and see what number appear
It looks like 1260 pieces.

The hotel has a hotspot that's why it's so much.

Now I need to extract them somewhere in my cvs txt or xlsx format.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: '[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 4:30 pm

MikroTik have 4095 byte for (managed by script) file limit, the list can't be stored on one unique file from the script
 
aSelfLion
just joined
Topic Author
Posts: 18
Joined: Sun Sep 23, 2012 9:47 pm

Re: '[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 4:53 pm

MikroTik have 4095 byte for (managed by script) file limit, the list can't be stored on one unique file from the script
So how can I get all of these ip and mac addresses? Is there any other management?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: '[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 4:58 pm

I don't know what to suggest, you can do
/ip dhcp-server lease print terse file=namefile
but then you have to process later the file with the computer
 
aSelfLion
just joined
Topic Author
Posts: 18
Joined: Sun Sep 23, 2012 9:47 pm

Re: '[get $i active-host-name]' only when I add this part; 'input does not match any value of value-name'

Tue Aug 09, 2022 5:26 pm

I don't know what to suggest, you can do
/ip dhcp-server lease print terse file=namefile
but then you have to process later the file with the computer
Believe me, that's exactly what I was trying to do. I think it will do my job.

But what I really want to do is actually.
I want to extract the excel file with vba and follow some controls online. Maybe I can.
If I can find a clue an example I can do the rest somehow.
Thank you.

Who is online

Users browsing this forum: No registered users and 16 guests