For more details, please see ourCookie Policy.


SAN Health Utility

Reply
Highlighted
Anonymous
Posts: 0

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.

Super Contributor
Posts: 321
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
Regular Visitor
Posts: 1
Registered: ‎01-21-2019

Re: Automation of reports download ?

HI

 

So it looks as if Broadcom has made changes to their website and started using OKTA to authenticate for users - so your script is now get an Error 500 as the pages do not seem to exist.

 

Would it be possible to get this script updated or advise on how to get the script up and running again?

 

Any help would be greatly appreciated.

 

Thanks

Community Manager
Posts: 297
Registered: ‎03-03-2014

Re: Automation of reports download ?

All,

 

I've messaged the SAN Health Team - look for a response shortly.

 

Thank you for your engagement and patience.

 

Jason

Community Manager

Super Contributor
Posts: 321
Registered: ‎04-04-2018

Re: Automation of reports download ?

Hello all,

 

as the autentification changed, it will take some time to adusjt script.

 

Thanks for understanding.

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

Marian Bezeg
Super Contributor
Posts: 321
Registered: ‎04-04-2018

Re: Automation of reports download ?

Hello all,

 

Currently i have rough draft for login so i can generate session token and create SAML authentification response.

As i curently don't have any SAN health report i need to generate dummy one to adjust new script.

 

 

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

Marian Bezeg
Super Contributor
Posts: 321
Registered: ‎04-04-2018

Re: Automation of reports download ?

Hello all,

 

i've created first draft of the script so no all exception are covered.

 

Aditional package are needed : jq and records.

Please edit username and password at the begining of the file before first start.

 

 

Currently script will download all your generated reports from brocade repository.

 

 

 

 

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

Marian Bezeg

Join the Broadcom Support Community

Get quick and easy access to valuable resources across the Broadcom Community Network.