Command

Name

Command -- Execute command

Synopsis

{ 'type'      : 'Command' , 
  'subents'   : [
                 {
                  'status'   : 'on' ,
                  'name'     : 'fooserver-xyz',
                  'command'  : '/usr/local/bin/fooserver-probe xyz.example.com',
                  'goodMesg' : 'fooserver xyz ok',
                  'badMesg'  : 'fooserver xyz bad',
                  'triggers' : [{ 'level' : 'warn', }, ],
                 },
                ]
}

Description

The Command Entity executes the given command.

Fields

name

A descriptive name for this subentity.

command

The command to execute. The full path should be specified to the command as the environment may be unknown. The program will run with the same user and permissions as the Agent it is configured to run from.

goodMesg

The message to send to the Server when the command succeeds.

badMesg

The message to send to the Server when the command fails.

Trigger

The Trigger fires if the command fails (returns non-zero status).