Link to home
Start Free TrialLog in
Avatar of Roobenleo
Roobenleo

asked on

Python script for storage

Hi , i am a storage admin, and i would like to automate the health  check and  performance ( IOPS and latency )  of the Netapp and IBM storage using Python script, currently i have started to learn python, i would like to have expert advice on the python script  to login to the storage and collecting the information and send as an email.

I am very beginner for scripting, it wold be relay grateful if  experts guiding on this
Avatar of noci
noci

Python is one of the means you can use to Script things... What do you want to script.
"health check/performance" are high over goals...
Make it more narrow: what do you want to "health check"
How do you want to check that...
Methods, Mechanisms...

Then you can try to combine the methods & mechanisms using Python...
Python is no snake-oil, it doesn't auto magically compute stuff.
You need to tell what to do and when and how to do it.
(There are lots of libraries that can help with certain methods/mechanisms, but those needs to be established first).

I hope this helps to first better define the question(s).
Avatar of Roobenleo

ASKER

Hi Noci,

Thanks for the comments, let me explain, i have customer who do not wants to incest on the monitoring tools, and the have multiple storage systems, like NetApp cmode,  for SAN and IBM storage.

My team engaging entering the health check commands and check the event logs manually  by spending the 2 hours per shift.

what i wold like to do is create a python script that would login to the storage and collect the required logs and save it in a text file then to the perform the   text analyses and send the error and warning logs to my team.

Hope this would give yo u a better understanding. please let me know if need any further information.
For starters: What are the command you need to execute
(exclude authentication info, and public identifiable stuff), then first goal, then the steps to collect them, next goal and steps to collect data...
what to do to process the "raw" data..
What methods to collect data... (it better not be use a browser, the logon using forms, ....) it should preferably use machine accesible interfaces.
Hi Noci

thanks for the comments, below are the stage i want to perform. ( i am starting with NetApp  controller.

Stage 1 : login in to the   controller through python script and collect the event logs and saving it in a text file.
                Then do the text analyses  and send the warning and critical alerts through mail to monitor the storage

Stage 2:  similarly i will add the other health check command like  ( 'system health status show' )

Stage 3: Also so collect all the data ( IOPS and Latency .... etc ) and connect with database to store the and for visualization using python and create dash board

Thanks,
Ok This is step one, define the goals. This need to be worked out in more detail:
I have no access to NetApp so i have no idea how the login dialog would be, what access protocol it uses (SSH, TELNET, HTTP, Private methods) etc.
The mght be "better" or more accessible methods to collect data in stead of building parsers for several hardware types. (the tools should not be build for every separate tool).
How about something like SNMP?  That should be able to provide ready made performance data.
or Sending syslog output to some destination? (then items are prioritized, and can come from any part of the OS)
Syslog is relatively structured  and easy to catch with f.e. (syslog-ng agents).
It also only requires one parser for messages, in stead of one per device type.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.