To run an event action, create a file that defines the commands to run when a specific event is registered.
You can specify any file name. The files must have a file extension of .sh.
In the file for running an event action, you can view information about the event that triggered an event action through environment variables. The following table shows the environment variables that you can specify in a file for running an event action.
Variable name |
Description |
---|---|
ANALYTICS_SOURCE |
Device name |
ANALYTICS_DEVICE |
Device type |
ANALYTICS_DESCRIPTION |
Message |
ANALYTICS_CATEGORY |
Category |
ANALYTICS_SEVERITY |
Level |
ANALYTICS_DATE |
Registration date |
ANALYTICS_EVENTID |
Event ID |
ANALYTICS_GROUPSnnn |
Group name. Specify 000 for nnn. |
ANALYTICS_NODEID |
Node ID |
ANALYTICS_COMPONENTID |
Component ID |
ANALYTICS_PERFCOMPONENTID |
Performance |
ANALYTICS_NAME |
Name of a host where Ops Center Analyzer is running |
Example of specifying an environment variable in Linux: ${ANALYTICS_SOURCE}