Collecting logs by running command

Hi, i am a general user of linux but we work mostly on windows next i am moving full time on linux.

here is my question:
We have product which consist or several subsystem each subsystem has one module to create logs file dump. and i am going to write that support dump tool.

we need to create a zip which consists of various logs file from our product basically for trouble shooting.

This zip consist of following:

  1. static log files
  2. run few command and create files
  3. OS related logs which helps in analyzing system related issues.

Now what approach i have is will have one configuration file which consists of:

  1. location of files
  2. commands to run which create files

and each subsystem will have their configuration file so we can collect all logs. done. simple.

The approach looks very simple and i am sure many of you would have same requirement, just wanted to know if there is some tool/command/utility already available where i can define my configuration file and it can fit my requirement?
i have googled and found "rotatelog" can do few, there is "cfg2html" can do few things.. but not really sure if they fit wilth all my requirements.

Please let me also know your suggestions. thanks in advance, will be waiting for replies.

You may find something in the JAVA world I suppose...
rotatelog does what its name suggests ( only can be of use if you already have logs to rotate...)
cfg2html is a more sofisticated utility that collects all system information and put it in html format... You could try to read and see how the script works and try to customize for your needs, or create your own script using it as a model, in which case I would contact Ralph to ask his kind permission...

Thanks for a kind reply. i come from java world, why i was looking into script solution is because wanted to complete this feature fast. and getting OS related data will be much easier and faster in scripts, also creating and maintaining a framework for doing same in java will be more effort.

i am glad to see reply but i really wanted you or someone to comment on above thoughts!

Thanks, Ajay

Have you tried out Nagios with custom plug-ins?