Preparations
Enabling Ingestion into TimescaleDB
To enable ingestion of Paragon Active Assurance data into TimescaleDB, do as follows:
-
Enable the services
paa-metrics-service
andpaa-timescaledb
:sudo systemctl enable paa-metrics-service paa-timescaledb
-
In
/etc/netrounds/netrounds.conf
make the following settings:KAFKA_METRICS_ENABLED=True AVAILABLE_TIME_SERIES=['rrd', 'kafka']
-
Restart all
netrounds-*
andpaa-*
services:sudo systemctl restart netrounds-* paa-*
Setting Up Support for PostgreSQL Databases
External tools use different approaches to supporting PostgreSQL databases:
- If the tool requires a JDBC driver, download the latest driver for PostgreSQL from https://jdbc.postgresql.org/download.html before proceeding with the configuration.
- Other reporting tools provide support for PostgreSQL databases through a data source plugin: this can either be installed separately or be included in their standard installation.
Allowing Incoming Connections from an External Tool TODO no longer present in the Confluence doc -- no longer needed?
- Take note of the IP address
ERT-IP
where the external tool is running (for example,10.0.0.1
). - Connect via SSH to the database node
TSDB
. - Switch to the postgres user:
su – postgres
- Open the file
$PGDATA/pg_hba.conf
. - Append the following line to that file (consult https://www.postgresql.org/docs/12/auth-pg-hba-conf.html on how to allow connections from subnets):
- for IPv4:
host paa paaread <ERT-IP>/32 md5
; in our example,host paa paaread 10.0.0.1/32 md5
- for IPv6:
host paa paaread <ERT-IP>/128 md5
- for IPv4:
- Run
pg_ctl reload
. - Now it is possible to connect from
ERT
to the database instancepaa
defined in theTSDB
database server as userpaaread
.
Parameters for Connecting to the Metrics Database
At this point, it is possible to connect to the database using the following connection parameters:
- Hostname: either
TSDB
orTSDB-IP
- Port:
7432
- Database:
paa-metrics
- Username:
<Paragon Active Assurance username>
- Password:
<Paragon Active Assurance password>
- TLS/SSL Mode:
disable
<Paragon Active Assurance username> and <Paragon Active Assurance password> might differ from one external tool to another, as they depend on the system module responsible for access management.
For example, within Grafana it is possible to configure one data source with credentials of the paaread
read-only user, and all users will have their own credentials to access to the Grafana portal and the permission to use the same data source.
On the other hand, if there is a direct connection from the user to the database, each user that is allowed to access the database should have its own database credentials.
An external tool may request a JDBC connection to connect to the metrics database. If so, go to https://jdbc.postgresql.org/documentation/head/connect.html to find out how to compose the JDBC connection string given the parameters above.
Additional Settings When Defining the PostgreSQL Data Source
- If the external tool has a TimescaleDB option, enable it so that the tool can suggest and use the features provided by this PostgreSQL extension.
- Set the following connection limits in the external tool:
- Maximum number of open connections: 2
- Maximum number of idle connections: 1
- Maximum lifetime of a connection: 14,400 seconds (= 4 hours)