My first script

I have finished my first real attempt at Python.

Nothing too complicated, just a simple script:

  • Python 3 (of course!)
  • minimal modules for max portability
  • pull information from Xymon and parse it
  • pull RAID and disk information using omreport and parse it to obtain a list of disks failed/in predictive failure, serial numbers, etc.
  • generate a report and print a template
  • follow the disk rebuild when the option -p is used, wrap the screen refresh in curses and wait for ‘q’ to be pressed then exit

I am sure it can be improved and made a lot better, as well as I am sure I did some horrible mistake somewhere. But it’s a start.

Find it on GitHub: https://github.com/markgreene74/smallprojects/blob/master/failed_disk.py

Now that this project is finished I can focus on the #100DaysOfCode in Python.