Splunk Forwarder agent Unable to read the GPDB logs due to permission issues
search cancel

Splunk Forwarder agent Unable to read the GPDB logs due to permission issues

book

Article ID: 296471

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

Customer requested the possibility to read Master / Standby Greenplum logs using the Splunk Forwarder agent. This agent runs as a Splunk user whereas log files in the pg_log subfolder of /data/master/gpseg-1 are owned by gpadmin.

Environment

Product Version: 5.21

Resolution

Create a soft link:

1. Stop Greenplum
gpstop -M fast

2. On mdw and smdw, rename $MASTER_DATA_DIRECTORY/pg_log to $MASTER_DATA_DIRECTORY/pg_log_save
mv $MASTER_DATA_DIRECTORY/pg_log $MASTER_DATA_DIRECTORY/pg_log_save 

3. On mdw and smdw, create the directory /data/gpdb_log
mkdir /data/gpdb_log

4. On mdw and smdw, create a symbolic link on /data/gpdb_log:
ln -s $MASTER_DATA_DIRECTORY/pg_log /data/gpdb_log

5. Restart Greenplum: the log files will be physically created in /data/gpdb_log