Wikia:MachDBBasics

From Mybrainhurts

Basic Usage Concepts

MachDB is a machine database that tracks all sorts of nifty data about your computers.

When setting up MachDB, you will set up one machine, the aggregator, that will run the web UI, and will aggregate the data about all of your other machines. The other machines will all need to communicate with the aggregator; they will each individually gather data about themselves and then send it off to the collect.php script.

A sample gather script, machdb-gather-linux26, has been provided in the bin/ directory of the machdb distribution. You can use this as a template for your own scripts, or write them in any language you choose. The data sent back to the aggregator is sent as an XML file (that can be generated however you wish). Again, you can use machdb-gather-linux26 as a template, or see the XML specification.

The data is then posted to collect.php on the aggregator. A sample sending script, machdb-send, is also included in the bin/ directory. See also Securing collect.php for another sample send script.

There's no reason that gathering and sending must be separated out into separate scripts, but it helps you abstract the gathering out by OS.

The gather-send process should be repeated as often as you wish. If you update or change your machines frequently and want a very precise record of it, then run them hourly. Otherwise, daily or weekly should suffice.