Linux systems v4

Requirements

Glibc 2.5 or newer

Postgres and BDR3 report

As the user postgres, copy the Lasso binary into a folder.

Important

The same user that runs the Postgres server process must run the command. The user must have permission to write in the current working directory.

A standard Lasso run consists of:

    ./lasso

Lasso writes the output file in the current working directory.

Warning

Lasso needs to execute files from the temporary directory. If your system temporary directory is mounted with the noexec flag, the following error occurs:

    ./lasso: error while loading shared libraries:
    libz.so.1: failed to map segment from shared object:
    Operation not permitted

In that case, you can specify a different temporary file location using the TMPDIR environment variable:

    TMPDIR=/some/alternate/tmp/location ./lasso`
Important

When run on a local instance, Lasso requires a user that belongs to the pg_monitor role, which is available in Postgres 10 and later. Before 10, you must run as a superuser. For more information, see Default Rolesin the PostgreSQL documentation.

Lasso transparently gathers information related to all supported versions of EDB Postgres Distributed (PGD) and pglogical.

Barman report

Lasso can run on systems where Barman is installed. In that case, it gathers Barman-related information, as well as system information, that helps during analysis.

As the user barman, copy the Lasso binary into a folder.

Important

You must run the command as the same user that runs the Barman process, and you must have enough permission to write in the current working directory. If you installed Barman using RPM/DEB packages, Barman is configured to run as the user barman.

The Barman report is enabled by default if Lasso runs as the barman user and looks for configuration files in the expected locations, typically /etc/barman.conf. Enter man 5 barman for details.

In general, if you installed Barman using EDB-certified RPM and DEB packages, all you need to do is execute Lasso as the barman user.

Managing custom installations of Barman

If you have custom installations of Barman, you can enable the barman report by passing the --barman option to Lasso:

    ./lasso --barman

You can also point to a specific global configuration file by using the --barman-configuration option as follows:

    ./lasso --barman-configuration /opt/barman/barman.conf

Replication Manger (repmgr) report

Lasso can run on systems where repmgr is installed. In that case, it gathers repmgr-related information.

In general, if you installed repmgr using EDB-certified RPM and DEB packages, all you need to do is execute Lasso.

How Lasso finds the repmgr configuration file

Lasso uses the following approach while trying to identify the repmgr configuration file. It uses the first one it finds.

  1. Use the one provided through the --repmgr-configuration option, if given.
  2. Check the paths provided by packages. For example, in CentOS/RHEL packages, the configuration file is usually put under /etc/repmgr/<PG_VERSION>/repmgr.conf. Lasso inspects those folders, if they exist, in descending order, and uses the first repmgr configuration file that it finds.
  3. Check if a repmgr.conf file exists in the current directory.
  4. Check if a /etc/repmgr.conf file exists.
  5. Check the path given by pg_config --sysconfdir for the repmgr.conf file.
  6. Check the output of systemctl cat <service_name>, where <service_name> is any service whose name contains repmgr, and try to get the repmgr.conf file from the service unit file. It checks the units in descending order, just as it does in approach 2, and uses the first match.

Managing custom installations of repmgr

You can point to a specific repmgr configuration file by using the --repmgr-configuration option as follows:

    ./lasso --repmgr-configuration /opt/repmgr/repmgr.conf

This approach is preferred, as it guarantees Lasso will use the correct repmgr configuration file instead of trying to find it automatically.

Postres Enterprise Manager (PEM) report

Lasso can run on systems where PEM is installed. In that case, it also gathers PEM-related information, like some configuration files and information about services.

Lasso inspects the well-known paths for configuration files, as well as well-known service names. If you have custom PEM installations, Lasso doesn't gather the related information.

Failover Manager (EFM) report

Lasso can run on systems where EFM is installed. In that case, it gathers EFM-related information.

In general, if you installed EFM using EDB-certified RPM and DEB packages, all you need to do is execute Lasso.

How Lasso finds the EFM configuration file

Lasso uses the following approach while trying to identify the EFM configuration file. It uses the first one it finds.

  1. Use the one provided through the --efm-configuration option, if given.
  2. Check the paths provided by packages. The configuration file is usually put under /etc/edb/efm-<EFM_VERSION>/efm.properties. Lasso inspects those folders, if they exist, in descending order, and uses the first EFM configuration file that it finds.
  3. Check the output of systemctl cat <service_name>, where <service_name> is replaced with any service whose name starts with edb-efm-. Then try to get the efm.properties file from the service unit file. It checks the units in descending order, just as it does in approach 2, and uses the first match.

How Lasso finds the EFM binary

Lasso inspects the paths provided by packages. The binary file is usually put under /usr/edb/efm-<EFM_VERSION>/bin/efm. Lasso inspects these folders, if they exist, in descending order, and uses the first EFM binary file that it finds.

Managing custom installations of EFM

You can point to a specific EFM configuration file by using the --efm-configuration option, as follows:

    ./lasso --efm-configuration /opt/EFM/efm.properties

This approach is preferred, as it guarantees Lasso will use the correct EFM configuration file instead of trying to find it automatically.

Replication Server (xDB) report

Lasso can run on systems where xDB is installed. In that case, it gathers xDB-related information.

In general, if you installed xDB using EDB-certified RPM packages or the bitrock installer, all you need to do is execute Lasso.

How Lasso finds the xDB configuration file

Lasso uses the following approach while trying to identify the xDB configuration files. It uses the first one it finds.

  1. Use the ones provided through the --xdb-pubserver-configuration and --xdb-subserver-configuration options, if given.
  2. Check the paths provided by xDB 7 RPM package and bitrock installer. The configuration files are usually put under /etc/edb/xdb/etc. Lasso inspects this folder, if it exists, and uses the xdb_pubserver.conf and xdb_subserver.conf files found under that folder.
  3. Check the paths provided by xDB 6 RPM package and bitrock installer, which are usually /usr/ppas-xdb-<XDB_VERSION>/etc and /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/etc, respectively. Lasso inspects these folders and, if they exist, uses the xdb_pubserver.conf and xdb_subserver.conf files found under the folder. In the case of RPM packages, as there can be a lot of folders, they're inspected from newest XDB version to oldest.

How Lasso finds the xDB binary

Lasso uses the following approach while trying to identify the xDB binary file. It uses the first one it finds.

  1. Check the paths provided by xDB 7 RPM package and bitrock installer. The binary files are usually put under /etc/edb/xdb/bin. Lasso inspects this folder, if it exists, and uses the edb-repcli.jar file found under that folder.
  2. Check the paths provided by the xDB 6 RPM package and bitrock installer, which are usually /usr/ppas-xdb-<XDB_VERSION>/bin and /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/bin, respectively. Lasso inspects these folders and, if they exist, uses the edb-repcli.jar file found under the folder. In the case of RPM packages, as there can be a lot of folders, they're inspected from newest XDB version to oldest.

Managing custom installations of EFM

You can point to a specific xDB publication or subscription server configuration file by using the --xdb-pubserver-configuration and --xdb-subserver-configuration options, as follows:

    ./lasso --xdb-pubserver-configuration /opt/xDB/pubserver.conf --xdb-subserver-configuration /opt/xDB/subserver.conf

This approach is preferred, as it guarantees Lasso will use the correct xDB configuration files instead of trying to find it automatically.

PgBouncer report

Lasso can run on systems where PgBouncer is installed. In that case, it gathers PgBouncer-related information.

In general, if you installed PgBouncer using EDB-certified RPM and DEB packages, and PgBouncer instances are up and running, all you need to do is execute Lasso.

How Lasso finds the PgBouncer configuration file

Lasso uses the list of running processes to identify the PgBouncer processes and uses the configuration file retrieved from there.

You can also specify one or more PgBouncer configuration files through the Lasso argument --pgbouncer-configuration. It's mainly useful in scenarios where a PgBouncer instance isn't running or if Lasso can't detect the configuration file from the process list.

Lasso collects information from all identified PgBouncer instances.

HARP report

Lasso can run on systems where HARP is installed. In that case, it gathers HARP-related information.

In general, if you installed HARP using EDB-certified RPM and DEB packages, all you need to do is execute Lasso.

How Lasso finds the HARP configuration file

Lasso uses the following approach while trying to identify the HARP configuration file. It uses the first one it finds.

  1. Use the one provided through the --harp-configuration option, if given.
  2. Check if the /etc/harp/config.yml file exists.

Managing custom installations of HARP

You can point to a specific HARP configuration file by using the --harp-configuration option, as follows:

    ./lasso --harp-configuration /opt/harp/config.yml

This approach is preferred, as it guarantees Lasso will use the correct HARP configuration file instead of trying to find it automatically.

Running Lasso on a HARP proxy node

The HARP proxy nodes don't have a Postgres or EDB Postgres Advanced Server service running on them, as they're intended only as a proxy for connections coming in from the applications.

When using Lasso to gather information from a HARP proxy node, you must use the --system-only option so it doesn't try to connect to the database server.

etcd report

Lasso can run on systems where etcd is installed. In that case, it gathers etcd-related information.

How Lasso finds the etcd configuration file

Lasso uses the following approach while trying to identify the etcd configuration file. It uses the first one it finds.

  1. Use the one provided through --etcd-configuration option, if given.
  2. Check if the /etc/etcd/etcd.conf file exists.

System-only report

Lasso can also run on systems where Postgres or Barman aren't installed to gather all relevant information regarding the underlying operating system.

You can run a system-only report with the following command:

    ./lasso --system-only