Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have about 20 linux servers which I need to document the configuration of. I do not mean the detailed configuration of services, but rather user accounts, databases, databases accounts, ip addresses, physical location, SSH port etc. etc. I know all this data is stored in config files, but I want to centralize it all. I am considering just creating a spreadsheet to record this data, but was wondering if there is something better (perhaps a small php/mysql app) which would be more structured and complete than a hacked together spreadsheet.

What do you use?

share|improve this question
    
I hadn't thought to much about this before but it would be useful. The spreadsheet approach is probably not ideal. It's easy to get it out of date. Automated has to be the way to go. –  Matt Jun 13 '10 at 21:48

6 Answers 6

up vote 9 down vote accepted

I assume this is a long term documentation effort, not just trying to capture a snapshot of the current configuration.

The wiki works now and might keep you sane for a while but if your environment changes quickly you will have a serious problem. You will always have to make sure the cron jobs are properly written, run in a timely fashion, get written for new services, are compatible with new versions of software, etc.

Consider using an configuration management tool like Puppet or Cfengine. At least put whatever data you collect under version control (like Mercurial, git, or Subversion).

Your configuration data is coming in from everywhere instead of being centralized. A wiki will always lag the current state of your machines. You need to centralize the configuration data; make it flow from the center out to the edges. But it is true that sometimes you have to go out and capture configuration data. Cfengine can do audits, Puppet might. Look at this Wikipedia article listing other configuration managers.

share|improve this answer
    
+1 I also use cfengine2 (and mediawiki for further documentation) –  ThorstenS Jun 13 '10 at 23:05
    
ok but how to make a report of the data in puppet? –  Tom H Feb 11 '12 at 10:59

Next time you tweak a machine, you should install etckeeper on it first. That way you will keep a log of configuration changes.

What distro are you using? There are some quite convenient tools for managing and auditing conffiles, and they generally depend on the package manager.

share|improve this answer

You might want to try cfg2html, which dumps your configuration to an HTML file, which you can then fetch at regular intervals and serve from a central server.

share|improve this answer
    
Thanks but cfg2html is overkill for my requirements. Great script though! –  Michelle Jun 13 '10 at 9:44

My suggestion would be just to build a wiki to centralize information and get a script to edit pages so that configuration files are updated on the wiki automatically through a cron job.

If you use moin, you should check http://moinmo.in/ScriptMarket/PutPageScript .

This way you get:

  1. Centralized documentation.

  2. Up-to-date system configuration.

  3. History of configuration changes.

share|improve this answer
    
I like this solution, very flexible. It would be nice if there were already some scripts available to update the wiki. –  Michelle Jun 13 '10 at 9:47

A spreadsheet is basically a two-dimension grid. I consider it not to be the best data structure for such things. I prefer trees, so I use outliners to manage trees.

My favourite one is leo. If you want something that would work on a server that has no X, have a look at htb (seems to be abandoned), or at VOoM vim plugin.

All these tools use plain text files or XML as backend. Teamed with some version control, they make a powerful combination.

Another alternative would be fossil. It is a distributed version control tool with built-in wiki and ticket tracker. It's a single binary which can also work as CGI and serve a web interface, thus making it available over network. fossil as a mini-CMS for a website is very powerful.

share|improve this answer

We have 4 data centers in 3 countries. We have over 500 production servers. Like some ppl said above, we use wiki and attach spreadsheet files on wiki. The good thing about that is, when you update your spreadsheet and attach it back on your wiki, it keeps the history of that. Like who updated the file and when.

But we also lock down our wiki, users can't see almost any page unless they are logged in. Also, the page where spreadsheet file is installed is controlled using tags which uses accesscontrol extensions.

-N

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.