Hi guys,
I know that there is an old script to create the graphs and upload them to a folder called /graphs.
# Backup graphing data
:local graphaddress "127.0.0.1"
:local graphport 80
:local graphimages "daily.gif, weekly.gif, monthly.gif, yearly.gif"
# Internal processing...
:local graphpath
# Main graphs page
:set graphpath ("graphs/")
/tool fetch address=$graphaddress port=$graphport mode=http \
src-path=($graphpath) dst-path=($graphpath . "index.html")
# Resource graphs
:foreach g in=[:toarray "cpu,ram,hdd"] do={
:set graphpath ("graphs/" . [:tostr $g] . "/")
/tool fetch address=$graphaddress port=$graphport mode=http \
src-path=($graphpath) dst-path=($graphpath . "index.html")
:foreach i in=[:toarray $graphimages] do={
/tool fetch address=$graphaddress port=$graphport mode=http \
src-path=($graphpath . [:tostr $i]) dst-path=($graphpath . [:tostr $i])
}
}
# Queue graphs
# Only simple queues are available (both enabled and disabled)
:foreach g in=[/queue simple find] do={
:set graphpath ("graphs/queue/" . [/queue simple get $g name] . "/")
/tool fetch address=$graphaddress port=$graphport mode=http \
src-path=($graphpath) dst-path=($graphpath . "index.html")
:foreach i in=[:toarray $graphimages] do={
/tool fetch address=$graphaddress port=$graphport mode=http \
src-path=($graphpath . [:tostr $i]) dst-path=($graphpath . [:tostr $i])
}
}
# Interface graphs
# Only running interfaces are available
:foreach g in=[/interface find] do={
:if ([/interface get $g running] = [:tobool true]) do={
:set graphpath ("graphs/iface/" . [/interface get $g name] . "/")
/tool fetch address=$graphaddress port=$graphport mode=http \
src-path=($graphpath) dst-path=($graphpath . "index.html")
:foreach i in=[:toarray $graphimages] do={
/tool fetch address=127.0.0.1 port=8000 mode=http \
src-path=($graphpath . [:tostr $i]) dst-path=($graphpath . [:tostr $i])
}
}
}
My question is since Mikrotik came with the tool /fetch if there is a way that we can upload the files from to the graphs folder to an FTP server?
Thanks
Mihail
