Sending a Command (COMMAND)

Use a COMMAND action to send a command back to the host that sent the message that was matched. Contrast with the TCOMMAND action (see 4.17) and PASSWORD action (see 4.19). The text of the command is the action text.

You cannot use this action for a UNIX or other ANSI X3.64 connected system for which spo_ping monitoring has been specified.

See 4.2 for formatting information.

The action-text for a COMMAND action is the command that is sent to the host system that sent the matched message. The command text must be enclosed in quotation marks (“ “).

Example [SP-AMS]

The following partial example executes a shell script in the background on the host that sent a message; this action occurs when the message is matched:

ACTION COMMAND "sh /usr/scripts/sp-ams/ms-alert &"

Note: To send a command to a managed host other than the one that sent the matched message, use an EVENT-REPORT action with TYPE=CO. See 4.7.5.