This plugin requires an empty PostgreSQL database for its data. If you are using the GoCD PostgreSQL Addon, please note that the database schema that you use for analytics data should be separate from the scheme used by GoCD. It is recommended that you use PostgreSQL versions 9.6 or later.
Once you’ve installed the plugin and started the GoCD server, you can provide it with the credentials of your PostgreSQL database. To do this:
Login to GoCD server as an admin and navigate to Admin > Plugins
Find “GoCD Analytics Plugin” and click on the gear icon in that section to open the configuration page.
The configuration page looks like this:
You will need a license key to use this plugin. The license key will be available at the GoCD extensions site, from where this plugin was downloaded - in the description of the chosen plugin version.
Fill in the host, port, credentials, and database name of the PostgreSQL database schema mentioned earlier. Once you click “Save”, the plugin will validate the settings and if it can connect to the database, it will allow the save operation to succeed.
It is also possible to set advanced configuration parameters in this section by clicking on “Show advanced configuration”. The settings look like this:
The settings are:
Maximum active connections in pool (Optional): The plugin creates a connection pool for database access. This setting controls the number of active connections that it will hold. The default value of 10 does not need to be changed in normal circumstances.
Maximum idle connections in pool (Optional): The plugin creates a connection pool for database access. This setting controls the number of idle connections in that pool. The default value of 8 does not need to be changed in normal circumstances.
Maximum connection wait time (Optional): This is the amount of time (in milliseconds) that the pool will wait for the database to return a connection. The default value is -1, which represents “no timeout”. It does not need to be changed in normal circumstances.
Periodic cleanup time (Optional): The plugin deletes granular data at job, stage, and agent utilization levels that are older than 30 days, so as to ensure that the performance continues to be dependable. This happens every day at the time defined by this setting. The default value is
The plugin can be configured to enable secure communication between the plugin and the postgres database. To configure the plugin, click on the “Enable SSL” checkbox. The settings look like this:
SSL Mode: Indicates the verification level of the server certificate when SSL is used. This flag corresponds to the sslmode connection parameter which is passed on to
libpqlibrary used by Postgres. For more details, take a look at the libpq SSL support documentation.
Root Certificate: Absolute path to the root certificate file. This property needs to be configured if SSL connection is used. This file should be placed in the GoCD Server’s configuration directory. This property corresponds to the sslrootcert connection parameter which is passed on to PostgreSQL’s
Client Certificate: Absolute path to Client certificate file. The certificate in this file will be provided when Postgres server requests a trusted client certificate. This file should be placed in the GoCD Server’s configuration directory. This property corresponds to the sslcert connection parameter which is passed on to PostgreSQL’s
Client Key: Absolute path to RSA private key file for the client certificate. The key file should be placed in the GoCD Server’s configuration directory and must not allow any access to world or group (can be done using:
chmod 600 client.key). This property corresponds to the sslkey connection parameters which is passed on to PostgreSQL’s
Client PKCS8 Key: Absolute path to PKCS8 encoded client key file. This should be placed in the GoCD Server’s configuration directory. This file is required for a successful connection to be established when trusted client certificates are used for authentication. OpenSSL can be used to create a PKCS8 encoded file from an RSA key file by executing
openssl pkcs8 -topk8 -outform DER -in client.key -nocrypt > client_pkcs8.key
The GoCD Server’s config directory is usually
/etc/go on Linux and
C:\Program Files(x86)\Go Server\config on Windows. You can find the location of the GoCD Server installation here.