Smarts Notif Syslog adapter: Enable Debug For Use With "if (debug) {print(time().ASLNAME" Print Statements
search cancel

Smarts Notif Syslog adapter: Enable Debug For Use With "if (debug) {print(time().ASLNAME" Print Statements

book

Article ID: 315729

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Provide instructions to enable debug for the Notif-Syslog adapter


Symptoms:

I am working on syslog messages and need to find out what log file all the asl print statements go to or what needs to be configured in the asl file.

 

 do {

    if (debug) {print(time().ASLNAME."HOST = ".HOST);}

    if (debug) {print(time().ASLNAME."MESSAGE_TYPE = ".MESSAGE_TYPE);}

    if (debug) {print(time().ASLNAME."MESSAGE = ".MESSAGE);}

    if (debug) {print(time().ASLNAME."TWOLINE = ".TWOLINE);}

    }


Environment

VMware Smart Assurance - SMARTS

Cause

In the print statements the Notif Syslog Adapter the print statements in the example check if debug = true, in order to print.

Resolution

Steps for enabling the debug parameter in the Notif Syslog Adapter 

1.   Open the BaseDir/SAM/rules/icoi-syslog/Notif-SysLog_mgr.asl
2.    Find the debug=False statement,
3.    Change the False to True 
4.    Save file.
5.    Restart the Notif Adapter service to implement the change.

The "if (debug)" print statements will now show in the log file set in the --output option of the sm_adapter command.


Additional Information

Impact/Risks:

Low. Debugging is enabled for troubleshooting.