Software Development Kit (SDK) and API Discussions

Automated Autosupport Download NodeJS

Megajin
4,949 Views

Hi,

 

I'm new to the NetApp stuff. Currently I'm trying to figure out how to get Autosupport files completely automated.

We've got a NOSQL Database with historical data from customers. I want to expand the data with the weekly ASUP Data. 

However it seems NetApp has no REST-Api to get any of that information. I know there is the Zedi Explorer, but we can not access every NetApp

which lead me to ASUP files. 

 

Now I want to create some automation withing our NodeJS enviroment:

 

  1. Get the ASUP  '*.xml'
  2. Parse the data into json for the database
  3. Generate some data with the ASUPs and historical data

I need the information as XML or better as JSON (I can parse XML to json no problem). I do not want to parse Text-files or CSVs which could lead to errors very easily. That said I am a little dissapointed that NetApp can't provide solid XMLs in the autosupport files, some are in XML and some not - why is that?

 

I could also use the download option on weekly autosupport files which will download a '*.tgz'. I have no clue where to find that link and how the authentication will then work.

 

Is there any possible way to access the autosupport files over a GET-Method? 

 

The queries I could use would be something like this: https://smartsolve.netapp.com/cdv#&asupids={ASUPID}&section=MOTHERBOARD-INFO.XML&"other parameters".

However there would be no way I could access multiple ASUPS from different SerialNumbers. Because the query is not providing any parameter to fill in that information.

 

The other thing is I have no access even if I can use the query. I need to authenticate somehow, so does NetApp proivde any sort of an API-Key to authenticate?

 

I really don't want to use an iframe and load content into ASUP Forms automated -> could lead to errors again.

 

PS.: API calls can be made in Python too NodeJS can run Childprocesses very easily, please remember I can't use Zedi so I can not use pyhton like this:


s = NaServer("<server name or IP address>", 1 , 31)
s.set_server_type("FILER")
s.set_transport_type("HTTPS")
s.set_port(443)
s.set_style("LOGIN")
s.set_admin_user("<user name>", "<password>")

 

Regards, Megajin

5 REPLIES 5

FelipeMafra
4,895 Views
Hello,

You can set your fillers to send you an email with ASUP, so you simply have to work with your email, there is no need to authenticate on NetApp portal.

Take a look here:

https://library.netapp.com/ecmdocs/ECMP1368862/html/GUID-BBCB6CA0-88BF-4C94-9048-9643769F4BAB.html

Megajin
4,875 Views

Hi,

 

thanks for your reply. I've tried to use ASUP via Email. Unfortunately the ASUP Files will be sent as CSV (XLSX) not as XML or JSON...

I'm gonna open an iframe within my window and let the user log in by himself.

FelipeMafra
4,864 Views
I really don't like to use ASUP as a solution.

Anyway this could help you:
https://kb.netapp.com/support/s/article/what-are-the-new-autosupport-features-in-data-ontap-8-1?language=en_US

I think you have another option. Install OnCommand Unified Manager (Known as OCUM) and try to work with it. This is a NetApp official tool to collect data from fillers.

Then you can make queries on OCUM database which is a MySQL, so it's quite simple.

One more thing you could do it, if you don't have access to fillers directly because someone else is the administrator, is to ask him (her) to create a role with capabilities you need. Those are the APIs you call. Let's say for example: if you like to work with CIFS shares. You just need a capability api-cifs-shares-*.

Megajin
4,852 Views

Thanks for the tip, I cannot use OCUM. Since I would need to have some kind of VPN to every customer with a netapp. I will monitore every netapp which is sending ASUP from our customers. That's why im stucked with that idea. Otherwise I would use the SDK which again needs a direct connection.

FelipeMafra
4,735 Views
Hi again,

You could write an application to distribute between your customers so each one can enter is credentials. The only thing it will do is send you an email with data you need.

If you like spreadsheet you can make use of openpyxl to generate an excel file.

By the way I really don't understand why ASUP files cannot be generated as XML or JSON since API call returns an XML.
Public