Smarts NCM/Linux: How to redirect database logging to syslog
search cancel

Smarts NCM/Linux: How to redirect database logging to syslog

book

Article ID: 331104

calendar_today

Updated On:

Products

VMware Smart Assurance

Environment

VMware Smart Assurance - NCM

Resolution

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:
  1. Open the postgresql.conf configuration file for editing in an appropriate editor. This file is found here:
$VOYENCE_HOME/db/controldb/data/postgresql.conf
  1. 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'

  1. 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
 
  1. Save and close the postgresql.conf file.
  2. 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.