Release: UIM 9.x
Component: UIM NAS
Database: MS SQL Server
1. Configure the emailgtw probe following the probe documentation.
emailgtw (Email Gateway) - Email Gateway (broadcom.com)
Note: No active/enabled emailgtw user profile is required for the emailgtw when using this method.
2. Open the NAS GUI -> Auto-Operator -> Scripts -> Right-click -> New, Script -> Create a new script profile using the attached script (dbquery_and_email.txt).
Note: The following lines will need to be modified as per your configuration and requirement (<>).
rc = database.open ("Driver={SQL Server}; Server=<db server hostname>; Database=<CA_UIM database name>; Uid=sa; Pwd=<sa pw>;")
rs = database.query("<database query>")
action.email("<to email address>","<report name used for email subject>",emailbody)
3. Run the script, confirm the query is successful and an email has been received.
4. If required this script can be configured to run on schedule using the nas probe. More information below.
NAS IM Configuration, The Scheduler Tab - The nas Auto-Operator Tab (broadcom.com)
Note: All testing should be carried out in a pre-production environment. The database query and frequency of the script schedule, may have an impact on NAS probe performance.
Cannot make a database query in a nas Pre-Processing script
NAS IM Configuration, The Scripts Tab - The nas Auto-Operator Tab (broadcom.com)