Community discussions

 
nuchchie
just joined
Topic Author
Posts: 1
Joined: Mon Sep 09, 2019 12:28 pm

Export to Google Spreadsheet and Google Drive

Mon Sep 09, 2019 12:58 pm

Hello! I would like to export list of my active hotspot users to Google spreadsheet and Google Drive for every 1-hour with Winbox command but I could do only export to my email. Is there any way to do that?

So I put these in the scheduler and make it execute every 1-hour

Code: Select all

/////////////this command is to export list of active user to local file////////////////////
/ip hotspot active print file=active_user_list.txt

/////////////this command is to send that exported file to the email as extachment///////////////////
/tool e-mail send to="xxx@mail.com" subject="Active User $[/system clock get date] Report" \
body="$[/ip hotspot active print count-only] " file=active_user_list.txt
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1302
Joined: Sat Dec 24, 2016 11:17 am
Location: jo.overland at gmail.com

Re: Export to Google Spreadsheet and Google Drive

Mon Sep 09, 2019 8:15 pm

Not directly an answer to your question, but this how I would do it.

Schedule this script (not tested since I do not have hotspot)
:foreach logline in=[/ip hotspot active find] do={
	:local output "$[/ip hotspot active print as-value from=$logline]"
	:set ( "$output"->"script" ) "hotspot"
	:log info message="$output" 
}
Then use Splunk to get the syslog message and create a dashboard to monitor.

See my Splunk for MikroTik here:
viewtopic.php?f=23&t=137338
 
How to use Splunk to monitor your MikroTik Router

MikroTik->Splunk
 

Who is online

Users browsing this forum: No registered users and 3 guests