Smarts:SAM Trying to customize directory for SM_Monitor data, however, SM_Monitor not writing logs to the correct location; sm_monitor writing to /local/logs directory with no sm_monitor sub-directory
book
Article ID: 331770
calendar_today
Updated On:
Products
VMware Smart Assurance
Issue/Introduction
Symptoms:
User unable to create sm_monitor data under a custom directory as required.
sm_monitor data not appearing in sm_monitor sub-directory under /local/logs.
Environment
VMware Smart Assurance - SMARTS
Cause
The issue here is that SM_WRITEABLE is set in local-custom/conf/runcmd_env.sh.
SM_WRITEABLE should be set in local/conf/runcmd_env.sh because the sm_monitor binary is not aware of the custom-local/conf/runcmd_env.sh.
If SM_WRITEABLE is set in the wrong directory,the sm_monitor script to log to the standard local/logs directory instead of the custom-local/logs directory.
Resolution
Setting a custom SM_WRITEABLE location in the standard local/conf/runcmd_env.sh would resolve the issue for one domain manager but the problem would remain in any other domain managers that do not use that particular custom location.
To work around this limitation, create a custom shell script per domain to wrap around the sm_monitor binary and set the correct SM_WRITEABLE location for the duration of that scripts execution. Then reference this script in a cron job instead of directly referencing the sm_monitor command.
Example: 3 IP domains using 3 separate custom-local directories: