Automatic documentation of your SLES/OES2 server

The last 2 weeks I replaced a customer of mine while he was on holiday (he just got married!).
Beside solving daily problems, I had the tasks to document his network en especially the SLES/OES2 servers.

First day I started copying setting to a text document. After a hour I thought by myself: “But what is he changes something next week, than my documentation is no longer up-to-date”. This is a problem we al know about.

So I wrote a scripted who reads the most important (as far as I know) configuration files and writes them to a HTML file. This file is uploaded through SSH to a central server where you can view the setting.
The script runs every day and before writing the new setting, a backup is created of the old files. So you can always look back how it was.

Probably I did not include all the important configuration files. So if you miss one, let me known and I will include them.

The script I wrote is a modified script from Tim Burgess. He has made the bases. I include most of the Config File section.

no images were found

The installation is simple

Download the file doc-server.tar.gz

Server

  1. Create a directory called doc-server in /opt
  2. untar the doc-server.tar.gz file in this directory. You should get 3 directories called: server, client and archive
  3. In the header of the server/gen-html file change the variable to whatever you want
  4. Add the gen-html script to your crontab file.

Client

  1. Create a Public Key login with SSH to your central server. How? Check here.
  2. Create a directory called doc-server in  /opt
  3. Copy the client directory from the central server (/opt/doc-server/client). Note: This is the only directory that is necessary for the client.
  4. Modify the variables in the header of the doc-server file to whatever you want.
  5. Add the script doc-server to your crontab file. Make sure this script runs before the gen-html server on the central server.

After a first run you can open the index.html file with you favorite web browser.

About Michael
Michael Wilmsen is a experienced VMware Architect with more than 20 years in the IT industry. Main focus is VMware vSphere, Horizon View and Hyper Converged with a deep interest into performance and architecture. Michael is VCDX 210 certified, has been rewarded with the vExpert title from 2011, Nutanix Tech Champion and a Nutanix Platform Professional.

RSS feed for comments on this post.

Leave a Reply

You must be logged in to post a comment.