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
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
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
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
#!/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
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
./sm_ems -s SAM-AGG1 notify Host Host1 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
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
Sample Output of the txt file above when EP action is invoked:
-------------------
SM_OBJ_scheduledForNotify=false
SM_OBJ_ShouldInactiveAutoArchive=false
SM_OBJ_UserDefined14=
SM_OBJ_UserDefined15=
SM_LOG_ROLL_SIZE=200M
SM_OBJ_UserDefined16=
XDG_SESSION_ID=497
SM_OBJ_ShouldAutoAcknowledge=false
SM_OBJ_UserDefined17=
SM_OBJ_Impact=0
SM_OBJ_EventType=DURABLE
HOSTNAME=vm-smts-centos**********
SM_OBJ_UserDefined10=
SELINUX_ROLE_REQUESTED=
SM_ALLOW_LEGACY_CRYPTO=TRUE
SM_OBJ_IsAggregatedBy=false
SM_OBJ_FirstScheduledAutoAcknowledge=0
SM_OBJ_UserDefined11=
SM_REMOTE_HOST=vm-smts-**************
SM_OBJ_UserDefined12=
SM_OBJ_SourceEventType=UNKNOWN
TERM=xterm
SHELL=/bin/bash
SM_OBJ_UserDefined13=
SM_OBJ_ServiceName=
HISTSIZE=1000
SSH_CLIENT=x.x.x.x 63853 22
SM_OBJ_AcknowledgmentTime=0
SM_OBJ_Acknowledged=false
SM_POBJ_PATH=ICS-AutoAction-Path-Test_ESC_P01-Smarts Events Alerts
SM_OBJ_FirstScheduledAutoClear=0
SM_OBJ_IsProblem=false
SELINUX_USE_CURRENT_RANGE=
SM_OBJ_UserDefined18=
SM_RUNCMD_DEPTH=1
SM_TLS_PROTOCOLS=+TLSv1.1
SM_POBJ_POLICY=ICS-AutoAction-Policy-Test_ESC_P01
SM_OBJ_UserDefined19=
SM_OBJ_InMaintenance=false
.......
...........