PoWA-collector

Install

You can install PoWA Collector either using pip, RPM packages or manually.

Install with pip

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

Install on Red Hat / CentOS / Fedora / Rocky Linux

The RPM package is available on the PostgreSQL YUM Repository. Follow the installation guidelines below to add this repository to your system:

https://www.postgresql.org/download/linux/redhat/

Then install the package with:

yum install powa_collector

Manual install

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 https://pypi.io/packages/source/p/powa-collector/powa-collector-1.2.0.tar.gz
tar -zxvf powa-collector-1.2.0.tar.gz
cd powa-collector-1.2.0
cp ./powa-collector.conf-dist ./powa-collector.conf
./powa-collector

Then, jump on the next section to configure powa-collector.

Configuration

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.

Usage

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: