Ticket Actions facility


The power of the BMC Defender Server ticketing interface is greatly expanded by its ability to interface directly to third-party incident management systems. This is accomplished using the Ticket > Actions facility, that is executed each time that a ticket is automatically or manually opened, and each time that the ticket is subsequently modified.

The Ticket > Actions facility is similar to the Correlation > Actions facility except that the environmental variables instantiated for the batch file are slightly different, reflective of the current ticket information. The specific environmental variables are enumerated as follows:

T_UID

This is a unique identifier for the ticket. The value might be useful in interfacing with a third-party management system. The value is permanently associated with each particular ticket instance and never changes.

T_STATUS

This is the keyword Opened or Closed or Changed, indicating the current ticket operation by the system or user. The value of Changed indicates that the ticket has been changed (but not necessarily closed).

T_STATE

This is the keyword Opened or Closed indicating the current ticket state. 

Note

The T_STATUS value can be Changed and the current state can be either Opened or Closed (if you modify a closed ticket).

T_DATE_TIME

This is the time when the ticket was first opened, in YYYY/MM/DD HH:MM:SS format. This can generally be taken as the time of the last message, that caused the ticket to open initially.

T_TIME_NOW

This is the time of the action's execution in YYYY/MM/DD HH:MM:SS format. This is the same as the T_DATE_TIME value when the ticket is opened and reflects the time of any additional change or ticket closure.

T_TSTAMP

This is similar to the T_TIME_NOW value, but is the time of the action's execution represented as a long integer value, that might be of use in certain applications such as updating a relational database with information.

T_ASSIGNED_TO

This is a string indicating the current assignee for the ticket, as displayed on the top-level screen.  

T_SEVERITY

This is the severity of the ticket in text format. You can assign the severity in the alert definition, but can later change the severity to be any valid value.

T_SEVERITY_NUMBER

This is similar to the T_SEVERITY value, except that the former is the severity of the ticket in numeric format, where 0=emergency and 7=debug.

T_MESSAGE

This is the ticket message, identical to the message displayed by BMC Defender Server on the Tickets screen.

T_SUMMARY

This is similar to the value of T_MESSAGE, except that all punctuation marks are removed, spaces are collapsed, and the text is limited to 120 characters. This is mainly useful for entering text into a database table.

T_COMMENT

This is any text associated with the Resolution field of the ticket, under 256 characters, identical to the resolution text displayed by BMC Defender Server on the Tickets screen.

T_EXTURL

This is the URL to the BMC Defender Server that opened the ticket (including http: prefix). This value is useful for incorporating into e-mail messages, or otherwise referencing the particular BMC Defender Server

T_RELATED_ADDRESS

This is the address of the device that caused the ticket to be initially opened. This value is available only when the ticket is first opened. It is the address of the most recent message in the Related Messages for the ticket.

T_RELATED_DEVNAME

This is the device name corresponding to the T_RELATED_ADDRESS value, defined in the Device Information screen. If no device name is defined, this value is a zero length string.

T_RELATED_DEVDESC

This is the device description for the device corresponding to the T_RELATED_ADDRESS value, defined in the Device Information screen. If no device description is provided, this value is a zero length string.

T_RELATED_FACILITY

This is the textual facility of the message that caused the ticket to be initially opened. This value is available only when the message is first opened. It is the textual facility of the most recent message in the Related Messages for the ticket.

T_RELATED_SEVERITY

This is the textual severity of the message that caused the ticket to be initially opened. This value is available only when the message is first opened. It is the textual severity of the most recent message in the Related Messages for the ticket.

T_RELATED_USERNAME

This is a user name, parsed from the message that caused the ticket to be initially opened. This value is provided only if the related message contains a username that appears in the Messages > Users tab, otherwise there is no value.

T_RELATED_MESSAGE

This is the content of the message that caused the ticket to be initially opened. This value is available only when the message is first opened. It is the content of the most recent message in the Related Messages for the ticket.

T_RELATED_SUMMARY

This is similar to the value of T_RELATED_MESSAGE, except that all punctuation marks are removed, spaces are collapsed, and the text is limited to 120 characters. This is mainly useful for entering text into a database table.

T_ACTION_NAME

This is the value of the action name, configured on the Edit Ticket Action screen. This can be used as meta-data by the script, independent of any other arguments to the script.

T_SANITIZE

This value is either Yes or No, reflecting the value selectable at the bottom of the Edit Ticket Action screen. If Yes, then the value of environmental variables are sanitized (that is, special characters such as < > | and others are removed or substituted to assist with batch file programming. If set to No, then the message contains special characters. (See additional notes on sanitizing environmental variables.)

A template for ticket actions, TEMPLATE.bat is provided on the system within the BMC Defender Server t-actions directory. The batch file can be modified to launch external programs (such as the ARS Remedy RunMacro.exe program, or ASG ASF.exe program for working with the ASG IMPACT system.)

Notes

  • You can immediately execute any program within the batch file, such as Perl or Java, to take precise action on the ticket information.
  • It is easy to test the operation of a ticket action. Simply add a ticket to the system using the AddNew option. This causes the ticket action file to be executed, including the passage of proper data to the program. The results of the ticket program's execution (if any) is available through the View Debug Log File hyperlink for the action, available on the Ticket > Actions screen.

This section provides information about the following topics:

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*