This article explains how to redirect the output of Smarts NCM database logging to the Syslog (
$VOYENCE_HOME/cm/Syslog) instead of the default
database log ($VOYENCE_HOME/db/controldb/logs/server.postmaster).To redirect the Smarts NCM database logging to syslog in a Linux environment, do the following:-
Open the postgresql.conf configuration file for editing in an appropriate editor. This file is found here:
$VOYENCE_HOME/db/controldb/data/postgresql.conf
-
Make the following mandatory changes in the postgresql.conf file (if any of the following parameters are disabled, ensure that they are enabled).
log_destination = 'syslog'
logging_collector = on
# These are relevant when logging to syslog:
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'
-
After the above changes are done, uncomment/enable any of the following parameters in the same postgresql.conf file depending on your requirement:
log_statement=all
log_min_error_statement=ERROR
log_min_messages=ERROR
log_connections=on
log_disconnections=on
-
Save and close the postgresql.conf file.
-
Restart the controldb service
When the above actions are completed, any logs related to database operations will be directed to $VOYENCE_HOME/cm/Syslog, and not to the default database log of $VOYENCE_HOME/db/controldb/logs/server.postmaster.