For more details, please see ourCookie Policy.


Info & Feedback

Reply
New Contributor
Posts: 3
Registered: ‎08-12-2011

Automation of reports download ?

Is there a way to automate the download of the reports from my.brocade.com ?

I have tried to use wget without luck

Any suggetions will appreciated

Regards

Michael

Occasional Contributor
Posts: 5
Registered: ‎10-31-2011

Re: Automation of reports download ?

I'm looking for the same thing, download over ftp would be nice.

atm I'm using some powershell-scripts to download the reports automaticly, maybe you can use it aswell.

to get the name of the reportfile:

$bla = Get-ChildItem C:\_sanhealth\*.BSH -name

$datei = $bla.Substring(0,29) | Out-File C:\_scripts\tmp\san-health-download.txt

Move-Item C:\_sanhealth\*.BSH C:\_sanhealth\_archiv

for downloading:

$bla= Get-Content "C:\_scripts\tmp\san-health-download.txt"
$datei = $bla.Substring(0,29)

$ie = new-object -com "InternetExplorer.Application"
$ie.navigate("http://my.brocade.com/")
$ie.visible = $true
while($ie.busy){Start-Sleep 1}
$ie.Document.getElementByID("userid").value="USERNAME"
$ie.Document.getElementByID("password").value="PASSWORD"

$ie.Document.getElementByID("login").Submit()
while($ie.busy){Start-Sleep 1}
$ie.navigate("javascript:downloadFile('$datei')")

$autoit = "C:\Program Files (x86)\AutoIt3\AutoIt3.exe"
$au3 = "C:\_scripts\autohandle.au3"
& $autoit $au3

and this autoit-script for handling ie:

WinWaitActive("File Download")

ControlSend("File Download", "","","{TAB}")

sleep(2000)

ControlSend("File Download", "","","{TAB}")

sleep(2000)

ControlSend("File Download", "","","{TAB}")

sleep(2000)

ControlSend("File Download", "","","{ENTER}")

WinWaitActive("Save As")

ControlSend("Save As", "","","{ENTER}")

WinWaitActive("Download complete")

ControlSend("Download complete", "","","{ENTER}")

WinWaitActive("My Brocade - Windows Internet Explorer")

ControlSend("My Brocade - Windows Internet Explorer", "","","{ALT}")

sleep(2000)

ControlSend("My Brocade - Windows Internet Explorer", "","","{UP}")

sleep(2000)

ControlSend("My Brocade - Windows Internet Explorer", "","","{UP}")

sleep(2000)

ControlSend("My Brocade - Windows Internet Explorer", "","","{ENTER}")

Visitor
Posts: 1
Registered: ‎08-09-2017

Re: Automation of reports download ?

Hello I am trying to use your script. I am able to scucced luanching my.brocade and navigate to SAN Health Check Report. After that autoit scipt i am unable to fetch any reports. Need your help. I don't see File Download tab now in the site. So assuming i have to change the code.

Frequent Contributor
Posts: 76
Registered: ‎04-04-2018

Re: Automation of reports download ?

Hello all,

 

At first i cant locate link where the scripts are saved so i will put it there..

@Antonio Bongiorno TechHelp24 could you please move it to script page?

 

I've played little bit arrount my.brocade and i've developed bash script.

 

The algorithm is that it will connect via curl to my.brocade login page with credentials and generate cookies file.

After that another curl command scrap SAN Health page to get all report names in repository

At the last its using curl again to download .zip files

 

It will download all reports in repository so if you want last one then you have to modify part of code where its grep report 

names.

 

 

At first run please setup user and pass, optionaly download path.

 

Enjoy :)

 

 

 

Please mark this response as "Accept as Solution" if it answers your question.

Marian Bezeg

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.