Smarts SAM: How to Setup an Escalation Policy (EP)
book
Article ID: 332145
calendar_today
Updated On:
Products
VMware Smart Assurance
Environment
VMware Smart Assurance - SMARTS
Resolution
Create SAM domain.
In the Example, I have created AGG SAM and PRES SAM. You may choose to create only one SAM domain. In this example, my Escalation Policy is at the PRES SAM level
If you choose to create two SAMs, subscribe the AGG SAM to PRES SAM
Create Escalation Policy
Open the Global Manager Admin Console
Right Click Escalation Policy , then select New
Policy Name: <Test_ESC_P01>
Click Edit Filter then create your notification filters for this Policy
Click OK
Now add Escalation Policy Path
Click your Policy <Test_ESC_P01>
Click Add Path
Path Name: <Smarts Events Alerts>
Click Edit Filter then create your notification filters for this Path
Create a test shell script to invoke escalation action
Via CLI, navigate to folder <BASEDIR>/SAM/smarts/actions/server/
Create file <touchFile.sh>
The above file should create a file called: Escalation_Policy.txt in /tmp/ directory
Add the lines below into touchFile.sh file:
#!/bin/sh #touch /tmp/Escalation_Policy.txt # #The below line will touch a file called Escalation_Policy.txt under the /tmp/ directory. # "env" will write the environment information into the file Escalation_Policy.txt #When a notification matches EP filter, all of that notification's properties which #Smarts tool is passing to this script will be dumped into the file Escalation_Policy.txt # env > /tmp/Escalation_Policy.txt
Make touchFile.sh executable
chmod +x touchFile.sh
Return to Admin Console to insert Level in your EP Path
Right Click your path <Smarts Events Alerts>
Select Level , then Click Insert
Click Tool Wizard , then enter Automatic Tool name <touchFile>
Select your shell script touchFile.sh from Program: list
Click Finish
From From Available Tools: , select <touchFile> tool and Add
Make sure <touchFile> is moved to Invoked Tools
Click OK
Right Click the path, then select Path and click Enable
Click Apply
From CLI smarts bin directory, send a sample notification to match your Escalation Policy
Send notification: ./sm_ems -s Kevin-SAM-AGG1 notify Host Kevin Down
Check the notification from SAM console to confirm that the notification is sent and reached our PRES SAM.
Check the PRES SAM audit logs to confirm the Escalation Policy worked and the script was invoked
Finally check /tmp/ directory to confirm the Escalation Policy action invoked the script and the script created the file Escalation_Policy.txt in this directory
Additional Information
touchFile.sh script is attached in this KB
#!/bin/sh #touch /tmp/Escalation_Policy.txt # #The below line will touch a file called Escalation_Policy.txt under the /tmp/ directory. # "env" will write the environment information into the file Escalation_Policy.txt #When a notification matches EP filter, all of that notification's properties which #Smarts tool is passing to this script will be dumped into the file Escalation_Policy.txt # env > /tmp/Escalation_Policy.txt