You can install PoWA-collector either using pip or manually.
On Centos 6, you can avoid installing the header files for Python and PostgreSQL by using the package for psycopg2:
yum install python-pip python-psycopg2
pip install powa-collector
You'll need the following dependencies:
debian
apt-get install python python-psycopg2
archlinux
pacman -S python python-psycopg2
fedora
TODO
Then, download the latest release on pypi, uncompress it, and copy the sample configuration file:
wget tar -zxvf powa-collector-.tar.gz cd powa-collector- cp ./powa-collector.conf-dist ./powa-collector.conf ./powa-collector
Then, jump on the next section to configure powa-collector.
The powa-collector configuration is stored as a simple JSON file. Powa-collector will search its config as either of these files, in this order:
- /etc/powa-collector.conf
- ~/.config/powa-collector.conf
- ~/.powa-collector.conf
- ./powa-collector.conf
The following options are required:
- repository.dsn (string):
An URI to tell powa-collector how to connect on the dedicated repository powa database where to store data for all remote instances.
The following options are optional:
- debug (boolean):
A boolean to specify whether powa-collector should be launched in debug mode, providing a more verbose output, useful for debug purpose.
Example configuration file:
{
"repository": {
"dsn": "postgresql://powa_user@localhost:5432/powa"
},
"debug": false
}
Warning
The collector needs to be able to connect on the repository server and all the declared remote servers.
To start the program, simply run the powa-collector.py program. A SIGTERM
or a Keyboard Interrupt
on the program will cleanly stop all the thread and exit the program. A SIGHUP
will reload the configuration.
See also:
protocol.rst