Community discussions

MikroTik App
 
bmatic
just joined
Topic Author
Posts: 16
Joined: Fri Oct 21, 2016 8:40 am

Feature request: tool/fetch new property - no-log

Mon Jun 05, 2017 10:01 am

I did my own ddns no-ip script, which does http fetch of an html file with my public ip address, and I noticed that fetch tool logs every download, so my log is cluttured with unnecessary fetch logs.
So my feature request is that fetch tool have additional property, like for example: no-log.
 
emkac
just joined
Posts: 1
Joined: Sun Oct 22, 2017 12:59 pm

Re: Feature request: tool/fetch new property - no-log

Sun Oct 22, 2017 1:08 pm

I have the same issue.
Script for no-ip updating is working fine, but this command always create log entry.
/tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html"
log_file_fetch.png
Is there any possibility how to disable logging for "fetch"?

OS version:6.39.2
You do not have the required permissions to view the files attached to this post.
 
Boardy
just joined
Posts: 4
Joined: Sun Apr 01, 2018 11:01 am

Re: Feature request: tool/fetch new property - no-log

Sat Apr 07, 2018 1:10 pm

same for me, please add verbose flag...
 
ivanfm
newbie
Posts: 47
Joined: Sun May 20, 2012 5:07 pm

Re: Feature request: tool/fetch new property - no-log

Tue Apr 10, 2018 5:18 pm

will be nice an option to log only on error.

no messages when got and 200 response, but log for connection error or different status code.
 
bakadave
just joined
Posts: 24
Joined: Fri Jul 01, 2016 11:06 pm
Location: Hungary

Re: Feature request: tool/fetch new property - no-log

Tue May 08, 2018 9:55 am

seconded!

and logging event in case of error only would be even better
 
JAza
just joined
Posts: 24
Joined: Sun Jun 10, 2012 1:07 am

Re: Feature request: tool/fetch new property - no-log

Thu Aug 16, 2018 10:09 pm

+1.

My script needs to /tool fetch a url as an https 'get' for update the ddns service.
There is no actual file but the fetch creates a 2 byte file in the name of the url query. The file is named "?=xxx" where xxx is a mixed random string (the update token).

This file is difficult to deal with due to the '?' in the name and sometimes my script fails to delete it (mystery...).
Since I can't rename it and I can't download to my windows box a file with a ? in the name I have no idea what the 2 bytes in it are but I know I would rather be able to not create teh file in first place as I never parse it or use it so it's completely unnecessary clutter and it clutters my logs on every run.
 
eliasbats
just joined
Posts: 8
Joined: Thu May 11, 2017 6:22 pm

Re: Feature request: tool/fetch new property - no-log

Thu Dec 19, 2019 10:53 pm

+1
nice request
 
gotsprings
Forum Veteran
Forum Veteran
Posts: 902
Joined: Mon May 14, 2012 9:30 pm

Re: Feature request: tool/fetch new property - no-log

Sat Dec 21, 2019 4:30 pm

I got around this by using resolve.

I resolve my public IP address. And make that a local variable. Then I compare that variable to what I pick off IP cloud or route pref-source.

This cuts down on sending unnecessary traffic to my name server provider. And NOTHING GETS WRITTEN TO MY LOG UNTIL... I send an update to the name server.

If you provide a copy of your script...
Maybe I could show you where to plug in local variables. but here are my pieces... YOU WILL NEED TO ADD THE WORD "WAN" to your public facing interface.
i.e. ether1-WAN

Pick IP From Route
:global Stat [/ip route get [find gateway=ether1-WAN] pref-src]

Pick IP from Address
:global OnEtherSub [/ip address get [find interface~"WAN"] address]
:global OnEther [:pick $OnEtherSub 0 [:find $OnEtherSub "/"]]

Pick IP from DHCP-Client
:global OnEtherSub [/ip dhcp-client get [find interface~"WAN"] address]
:global OnEther [:pick $OnEtherSub 0 [:find $OnEtherSub "/"]]

Get Public IP from IP Cloud
:global ipCloud [/ip cloud get public-address]
Resolve your current DNS name
:global RESOLVED [:resolve something.whatever.com]

Once you have those 2 things...
Compare them.

If not = then run the part of the script that sends the update to your service.

Then you will only have a log entry when they need and do updates.

(Figured this out a few years back and have been using it since.)
"It ain't what you don't know that gets you into trouble. It's what you know for sure that just ain't so."
Mark Twain
 
jgraue
just joined
Posts: 5
Joined: Wed Jun 03, 2015 3:34 am

Re: Feature request: tool/fetch new property - no-log

Fri Feb 21, 2020 5:26 am

+1
nice request
+1 for the request. im also getting log messages on each POST.
 
dke
just joined
Posts: 13
Joined: Tue Dec 10, 2019 11:30 pm
Location: Austria

Re: Feature request: tool/fetch new property - no-log

Sun Jun 28, 2020 1:09 am

+1 for the request

Who is online

Users browsing this forum: jondavy and 18 guests