To modify the agent properties for a new agent instance, open Foglight
- From the navigation pane, select: Dashboards | Administration | Agents | Agent Status. The Agent Status screen appears.
- Deploy the PostgreSQL agent package.
- Create a PostgreSQL agent instance.
- Click on a PostgreSQL agent type row. The selected row is highlighted with a yellow background.
- Click the Edit Properties button.
- Select Modify the default properties for this agent.
- Edit the agent properties for the PostgreSQL agent instance:
Setting Server Connection Parameters (mandatory)
Setting Collection Intervals (optional)
Setting DB Overrides (optional)
Setting Options (optional) - Click the Activate button.
This is a full list and explanation of the configurable properties of the Foglight for PostgreSQL agent. The Agent Installer Wizard provides access to the essential subset of available properties. To modify other properties or modify the agent configuration after creation, use the Agent Status dashboard.
Setting Connection Parameters (mandatory)
- IP or Hostname – Host where PostgreSQL database server is running. Default is “localhost”. (e.g. hostname or IP Address)
- Port – Port the PostgreSQL database is running. Default is 5432.
- Database - Name of PostgreSQL database for server data collection. The agent will monitor all databases by default, but this is the database that will be accessed for primary data collection.
- Username – User that can connect to the PostgreSQL server being monitored
- Password – Password of the user that can connect to the PostgreSQL server being monitored.
Setting SSL Connection Parameters (optional)
- SSL Mode – Sets SSL mode for JDBC connection and verification level for connection. For more information on mode levels, read the Configuring the Client section of the PostgreSQL JDBC documentation. If you are not using an SSL connection, set to disabled and ignore the rest of this section.
- Use Java Truststore – If set to true, the agent will look for the SSL certificates in the Java truststore. The certificates will need to be imported into the truststore first. Read the Using the Java Truststore section in Knowledgebase article 4229097 for more information. To access the certificates from the filesystem, set to false and use the fields below.
- SSLCert path – The full path of the certificate file.
- SSLKey path – The full path of the key file.
- SSLKeyPassword – If the key file is encrypted, provide the password here.
- SSLRootCert path – The full path of the SSL root certificate.
Setting Administration Options (optional)
The Administration options allow for certain server operations to be performed on the monitored server from the FMS console. These operations are restricted to Foglight users with the PostgreSQL Administrator role.
- Enable Administration – Allows server operations to be performed from the FMS console.
- Enable Explain Plans – Allows explain plans to be requested on demand through the FMS console. Does not require that Administration also be enabled.
- Enable Explain Analyze – If this is enabled, the Analyze option in the Explain Plan request form will be selectable. The EXPLAIN ANALYZE command will carry out the command on the server and return actual run times and other statistics. Administrators should be very careful when using this option.
- Admin User – User with the SUPERUSER privilege that is able to perform the enabled administrative operations. This user will only be used in order to carry out these operations, not for normal data collection.
- Admin Password – Password for the admin user.
Setting Collection Intervals (optional)
The Collection Interval fields in the agent properties are used to set the sample frequencies. You can turn off a collection by setting the interval to 0.
- DB List Refresh (min) – Checks for databases on the server in order to schedule collections for those databases. As databases are not often added or removed, this does not have to happen frequently. Set to 30 minutes by default.
- Availability – A basic heartbeat collection that checks whether the server is running and how long it takes to connect. Should happen frequently. Set to 60 seconds by default.
- Server and DBs – Collects data on server metrics and configuration as well as database-level statistics. Set to 300 seconds by default.
- Tables, Indexes, & Functions – Collects table, index, and function statistics from each database. Set to 300 seconds by default.
- Configuration - Collects server configuration. Set to 3600 seconds by default.
Top Tables Collection (optional)
The Table Collection section is used to configure collection of the top tables on the server.
- Enable Top Tables Collection – Enables the Top Tables collection. Can be disabled on a per-database basis in the DB Overrides section. Set to true by default.
- # of Top Tables (per DB) – Sets the number of tables to collect per database. Once a table is collected, it will continue to be collected even if it is no longer within the limit until the agent is restarted. Can be changed on a per-database basis in the DB Overrides section.
- Sort By – Sets the parameter that determines which tables to include in the collection. Ex: If this is set to Total Table Size and “# of Top Tables” is set to 100, the 100 largest tables from each database will be collected. Set to Scans (Count) by default.
Tables Report (optional)
The Tables Report section is used to configure a limited collection of tables based on one or several parameters. Tables collected in this manner will not be created as persistent topology objects and will only appear in the PostgreSQL Full Tables Report.
- Enable Table Reporting – Enables the Table Report collection. Can be disabled on a per-database basis in the DB Overrides section. Set to false by default. • Reporting Interval (hrs) – Sets the interval to collect information for the PostgreSQL Full Tables Report. Set to 12 hours by default.
- Required Parameters – Determines whether collected tables must satisfy all or any of the parameters specified in the Report Parameters setting. Set to All by default.
- Report Parameters – Parameters for the collection are set here. In the Parameter column, select one of several available parameters. The value of this for each table will be evaluated with the comparator and value column values. If the expression evaluates to true, the table will be included in the report (depending on whether it meets any or all of the parameters, configured in the previous setting). Ex: Table Size (Tuples) greater than or equal to 80 will match all tables that have at least 80 live tuples (inclusive).
Statement Tracking (optional)
If the pg_stat_statements module and extension is enabled in the PostgreSQL server, this section can be used to configure statement statistics tracking.
- Enable Statement Tracking – Enables or disables use of statement tracking.
- DB w/ pg_stat_statements view – While statement tracking is performed across all databases, the pg_stat_statements extension is only available in databases where it has been created. If one or multiple databases have the pg_stat_statements view, you may supply the name of any of them in this field.
- # of Top Statements – The number of statements for the agent to collect. If you wish to collect all of them, provide the number of the pg_stat_statements.max setting, or anything higher.
- Sort By – The statements are sorted in order to gather the # of top statements specified in the previous property. If all statements are being gathered, this field is unimportant. Otherwise, several self-explanatory options are available based on existing or calculated column data in the view.
Setting DB Overrides (optional)
The DB override properties allow you finer-grained control over database collections. If a database is not specified here, it will use the parameters set in the Collection Intervals section.
- Database Name – Name of the database where collections are being overridden.
- Exclude DB-level Stats – If set to true, database-wide statistics (aggregated from objects belonging to the database) will not be collected for this database.
- Exclude Tables – If set to true, statistics for individual tables belonging to the database will not be collected.
- Exclude Indexes – If set to true, statistics for individual indexes belonging to the database will not be collected.
- Exclude Functions – If set to true, statistics for individual functions belonging to the database will not be collected.
- Top Table Limit – Will override the number of tables collected for the Top Tables collection.
- Interval – This collection interval will override the default Tables, Indexes, and Functions setting in the Collection Intervals section for this database.
- Table Reporting – Will override the Enable Table Reporting. If set to true, the Table Report collection will be enabled for this database. If false, it will not.
Setting Options (optional)
- Enable Dynamic Memory Allocation – Enables dynamic memory allocation so that the agent will request additional memory from the FglAM based on the expected amount of data. Should not be used without recommendation from Quest Support. Set to false by default.
- Agent Host Name – The hostname property for the PostgreSQL server topology object is by default set to the connection parameter value defined above. However, you can override it with this setting. If you are monitoring the OS, it is important that the hostname provided by the PostgreSQL agent and OS agent match so that they can be linked.