Macro
Macros add the ability to utilize attribute values within Event Definitions, Notifications, and Blueprints.
Overview
Macros are commonly used in Event Definitions, Notifications, and Blueprints. The macro variables are replaced with the relevant information at run time. For example, if you added “Processor Utilization at time of Event was {Attribute.CurrentValue}” to an Event Notification, this would be translated whenever the Event occurs so that you would receive a message stating “Processor Utilization at time of event was 99.995%.”
For practical scenarios using Macros, see Notification Examples.
Available Macros
Macro | Description |
{CI} | Name of the Configuration Item the Event was fired on. |
{CI.SERVICENOW_CMDB_SYS_ID} | Unique ID of the CI in the ServiceNow CMDB. |
{DATE} | Date the Event occurred. |
{TIME} | Time the Event occurred. |
{IPADDRESS} | IP Address of the CI where the Event occurred. |
Event Definition Macros | Description |
{EVENT.NAME} | Name of the Event Definition. |
{EVENT_DEFINITION.ID} | Name of the Event, Aggregate Event Definition, or Policy. |
{EVENT.SEVERITY} | Severity of the Event. |
{EVENT.ID} | Unique ID of the Event. |
{EVENT.STATUS} | Status of the Event–OK or Failed. |
{EVENT.STATUS_VALUE} | Status of the Event in numeric format–0 = OK, 1 = Failed. |
{EVALUATIONS.LASTVALUE} | Last value of the Event evaluation. |
{EVENT.REMEDIATION_URL} | URL entered in the Event Definition’s Remediation URL field. |
{EVENT.COMMENT} | Comment entered for the associated Event Definition. Useful for providing instructions or recommended fixes in the case an Event occurs. |
{EVENT.CUSTOM_1} {EVENT.CUSTOM_2} {EVENT.CUSTOM_3} {EVENT.CUSTOM_4} {EVENT.CUSTOM_5} |
Values entered for the custom field of an Event Definition (five custom fields are available). |
Attribute Macros | Description |
{ATTRIBUTE.CURRENTVALUE} | Current value of the Attribute associated with the Event Definition. |
{ATTRIBUTE.NAME} | Name of the Attribute associated with the Event Definition. |
Configuration Item Macros | Description |
{CI_INFO.CONTACT} {CI_INFO.DEVICETYPE} {CI_INFO.HARDWARE} {CI_INFO.NAME} {CI_INFO.LOCATION} {CI_INFO.MACADDRESS} {CI_INFO.NOTES} {CI_INFO.OS} {CI_INFO.SERIALNO} {CI_INFO.SOFTWARE} {CI_INFO.TAG} |
Values for the specified profile fields of the Configuration Item associated with this Event. |
Blueprint Macros | Description |
{CI_CPU.NAME} | Name of the CPU. |
{CI_CPU.INDEX} | |
{CI_CPU.INTERFACE} | |
{CI_CPU.INTERFACE.DESCRIPTION} | |
{CI_CPU.INTERFACE.NAME} | |
{CI_STORAGE.FILESYSTEM} | |
{CI_STORAGE.MULTIPLIER} | |
{CI_NETAPP.AGGREGATE_NAME} | Name of the NetApp aggregate. |
{CI_NETAPP.VOLUME_NAME} |