HA Configuration Syntax

The HA Configuration is used to configure High Availability, this is used to define the HA Pair and synchronization items.

SUBSYS HA

ENABLE HA (N|Y)
ADD PROGNOSIS_HA_PAIR (ID=<pair-name>, master=<host-name>, standby=<host-name>, haport=<port-number>)
ADD HA_PAIR_OPTIONS (ID=<pair-name>, p_set=<process-set-id>, conf_set=<conf-set-id>, threshold_set=<th-set-id>, database_set=<db-set-id>, file_set=<file-set-id>, folder_set=<folder-set-id>, max_file_size=<n>)

ADD SECONDARY_EXTRA_PROCESSES (<process-set-id> = <process-name.ext> | <process-name.ext> | ...)
ADD SECONDARY_EXCLUDE_SCONF (<conf-set-id> = <conf-name> | <conf-name> | ...)
ADD SECONDARY_THRESHOLD (<th-set-id> = <threshold-conf-name> | <threshold-conf-name> | ...)
ADD SECONDARY_DATABASE (<db-set-id> = <db-conf-name> | <db-conf-name> | ...)

ADD SYNC_FILE (<file-set-id> = <file-path\file-name> | <file-path\file-name> | ...)
ADD SYNC FOLDER (<folder-set-id> = <folder-path>, extensions=<.ext> | <.ext> | ...)

ADD DB_CONNECTION (id=<database-id>, 'driver={<odbc-driver-name>}', server=<ip-address>, port=<connection-port>, database=<database-name>)
ADD DB_NODE_INFO (nodename=\<node-name>,  write-connection-id=<database-id>, read-connection-id=<database-id>, ssl=none)

Syntax Elements

ENABLE HA

N|Y

Select Y (Yes) to enable or N (no) to disable High Availability.

ADD PROGNOSIS_HA_PAIR

This statement is used to configure a pair of Prognosis servers to be primary and secondary.

ID=<pair-name>

User-defined Id/name that is used to identify this HA pair.

master=<host-name>

Hostname of the server to be set as the 'Primary'.

standby=<host-name>

Hostname of the server to be set as the 'Secondary'.

masterstate=<active/passive>

Sets the master/primary server into active or passive mode

standbystate=<active/passive>

Sets the standby/secondary server into active or passive mode

haport=<port-number>

Port used by the synchronization process to communicate between the primary and secondary servers. This parameter needs to be the same on both the primary and secondary servers. If the value changed, this requires a Prognosis restart on the Prognosis HA Pair servers to re-establish the synchronization connection.

ADD HA_PAIR_OPTIONS

This statement is used add additional options to an existing HA pair.

ID=<pair-name>

Id or name of this HA pair as defined in the ADD PROGNOSIS_HA_PAIR statement.

p_set=<process-set-id>

Identifies the process options to be applied to the pair. These options are defined in the ADD SECONDARY_EXTRA_PROCESSES statement.

conf_set=<conf-set-id>

Identifies the configuration options to be applied to the pair. These options are defined in the ADD SECONDARY_EXCLUDE_SCONF statement.

threshold_set=<th-set-id>

Identifies the Threshold options to be applied to the pair. These options are defined in the ADD SECONDARY_THRESHOLD statement.

database_set=<db-set-id>

Identifies the database options to be applied to the pair. These options are defined in the ADD SECONDARY_DATABASE statement.

file_set=<file-set-id>

Identifies the file synchronization options as defined in the ADD SYNC_FILE statement.

folder_set=<folder-set-id>

Identifies the folder synchronization options as defined in the ADD SYNC_FOLDER statement.

max_file_size=<n>

Identifies the maximum file size that can be synchronized in megabytes. Default (and lowest value) is 1MB and can go up to 10MB however this is not configurable in the Web Application.

ADD SECONDARY_EXTRA_PROCESSES

By default, the passive server only runs processes that are needed for the basic functionality of Prognosis. If additional Prognosis processes are needed to be run on the passive server, then they can be configured with this statement. Once this is configured the process set can be used inside of a HA_PAIR_OPTIONS token.

<process-set-id>

User-defined id/name for this process set.

<process-name.ext>

Process name with file extension, e.g. process.exe. Multiple process names can be added with each one separated with the pipe ('|') character.

ADD SECONDARY_EXCLUDE_SCONF

By default, on a passive server all configurations will by synchronized from the active server, with the exception of the Prognosis Configuration. This statement allows for configurations not to be synchronized to the passive server from the active server. Similar to the SECONDARY_EXTRA_PROCESSES statement, once configured the <conf-set-id> parameter can be added to a HA_PAIR_OPTIONS token.

<conf-set-id>

User-defined id/name for this Configuration set.

 <conf-name>

Prognosis Configuration name. Multiple Configurations can be added with each one separated with the pipe ('|') character.

ADD SECONDARY_THRESHOLD

Threshold/Analyst configurations are synchronized between the active and passive servers. However, they will not be started/stopped unless they have this option configured and added to the HA_PAIR_OPTIONS token. Additionally, depending on the Threshold/Analyst, processes may need to be added to the SECONDARY_EXTRA_PROCESSES token for the Threshold/Analyst to run correctly.

<th-set-id>

User-defined id/name for this Threshold/Analyst set.

<threshold-or-analyst-conf-name>

Threshold/Analyst name. Multiple Thresholds/Analysts can be added with each one separated with the pipe ('|') character.

ADD SECONDARY_DATABASE

Database configurations are synchronized between active and passive servers. However, they will not collect any data unless they have been identified in this token and added as a set to the HA_PAIR_OPTIONS token. Note that enabling a database to run in this way usually implies that either a collector (and hence process) is also running on the passive server, or there is a process somewhere else that is pushing data to the passive server, otherwise no data should be collected.

<db-set-id>

User-defined id/name for this database set.

<db-conf-name>

Database name. Multiple Databases can be added with each one separated with the pipe ('|') character.

ADD SYNC_FILE

Files inside the Prognosis installation folder can be configured to be synchronized between the active and passive servers. By default, important files are already synchronized using an 'out of the box' file set, however additional files can be synchronized as required. Files under sub-folders can also be configured to synchronize, using the same syntax as a file path relative to the Prognosis installation folder. The files will be synchronized to identical locations in the folder structure as specified.

Limitations:

Files that are larger than 1MB will not be synchronized. This is to prevent excessive data from needing to be synchronized and potentially causing degradation of performance in the database. This can be configured up to 10MB with the max file size option, so that even more files can be synchronized.

<file-set-id>

User-defined id/name for this file set.

<file-path\file-name>

Path and file name. Multiple path\file names can be added with each one separated with the pipe ('|') character.

ADD SYNC FOLDER

Specifying folders instead of individual files is a potentially more convenient way of configuring file synchronization. Extensions must also be specified so that only the specific set of files within the folder can be configured for synchronization.

As with files, the 1MB file size limitation applies.

<folder-set-id>

User-defined id/name for this folder set.

<folder-path>

Folder name. Multiple folder names can be added with each one separated with the pipe ('|') character.

extensions=<.ext>

Only files with a specified extension within the nominated folders will be synchronized.

ADD DB_CONNECTION

This entry is OPTIONAL, if not supplied, then the default Database Connection will be assumed, 'driver={PrognosisPostgreSQL Unicode}', server=localhost, port=5432, database=prognosis.

This specifies the db connection string for read and write connections to PostgreSQL. For Prognosis nodes in a pair configured for HA mode, There should be two DB_CONNECTIONS, one for the primary and one for the secondary Prognosis/PostgreSQL servers.

id=<database-id>The database-id is used as a mapped key in DB_NODE_INFO for each primary and secondary server, see DB_NODE_INFO below.
'driver={<odbc-driver-name>}'Currently the only driver supported is PrognosisPostgreSQL Unicode
server=<server-address>This is the hostname or IP address of the PostgreSQL server, typically this is on the local Prognosis server.
port=<connection-port>This is the PostgreSQL connection port, the default is 5432. If PostgreSQL has been configured using a different port, then it must be specified here.
database=<database-name>This is the name of the database used for Prognosis data, the default is prognosis.

ADD DB_NODE_INFO

This entry is OPTIONAL and specifies which node in the DB_CONNECTION this Prognosis server can write to or read from. The 'write-connection-id' and 'read-connection-id' fields will be used to map to the 'id' field in DB_CONNECTION.

If database replication is enabled in PostgreSQL, the Prognosis passive node will not be able to write to its own database, therefore it will have separate write and read connections. The Prognosis 'active' node needs to have the same 'write-connection-id' and 'read-connection-id' to have the role of master in PostgreSQL.

nodename=\<node-name>Specify the Prognosis node name to apply the read and write attributes for.
write-connection-id=<database-id>Specify the DB_CONNECTION which will be used for all database writes, typically this will be the 'active' Prognosis server
read-connection-id=<database-id>Specify the DB_CONNECTION which will be used for all database reads, typically this will be the 'active' Prognosis server
ssl=<ssl-option>SSL specifies if the db connection is to use SSL or not. If enabled, then PostgreSQL SSL support must also be enabled in the pg_hba.conf file. For advanced users of PostgreSQL, more restrictive SSL options can be used here. The default is none.

Provide feedback on this article