Installation

Download the latest version of the historian here

Debian

sudo apt install postgresql-server postgresql-contrib
sudo factry-historian-server_vx.x.x_linux-x64 install

Redhat / Centos

sudo yum install postgresql postgresql-contrib
sudo factry-historian-server_vx.x.x_linux-x64 install

Default service file location/name:

/etc/systemd/system/factry-historian-server.service

Default environment file location/name:

/etc/systemd/system/environments/factry-historian-server

Default system user:

factry-system-user

Configuration

The historian server can be configured using environment variables. If left empty the historian server will use the listed default values.

All variables starting with ‘DB_’ refer to the main postgresql configuration database.

Name Default value Description
DB_HOST 127.0.0.1 Host to connect to for the database
DB_NAME factry_historian Name of the database to connect to
DB_USER_NAME factry User to connect to the database with
DB_PASSWORD Password for the user
DB_PORT 5432 Port number to connect to at the server host
PORT 8000 Port number for the REST API
GRPC_PORT 8001 Port number for GRPC collector communication
JWT_SECRET JWT token used to sign the collector API token. Which is used to authenticate in the REST/GRPC communication. The JWT is also used to encrypt certain settings
BUFFER_PATH /var/opt/factry/buffer Path for the timeseries database client buffer
LOG_LEVEL info The log level of the historian
GRPC_MAX_MESSAGE_SIZE 64MB The maximum message size for GRPC messages.

Upgrading the historian

To upgrade an existing historian installation you can use the upgrade command.

sudo factry-historian-server_vx.x.x_linux-x64 upgrade

Flags

Name Description Default value
–clone Clone the database to a new database before migrating true
–keep-old Keep the old database after successfully migrating when clone is enabled false