The Commands section lets you define check commands, notification commands, or special commands. It is from within this menu that you will create new commands to be used by service definitions to check values on remote devices. Usually, “command” refers to an APM plugin that provides specific functionality to do precise jobs such as pinging remote systems, or checking the HTTP status of a server.
A command definition is just that. It defines a command. Commands that can be defined include service checks, service notifications, service event handlers, host checks, host notifications, and host event handlers. Command definitions can contain macros and are directly linked to APM (Nagios) plugins that are used to provide specific functionality.
To create a Command definition you need to press the “Add” button and fill out the fields in red.
Command: This directive is the short name used to identify the command. It is referenced in contact, host, and service definitions (in the notification, check, and event handler directives), among other places.
Command line: This directive is used to define what is actually executed by APM when the command is used for service or host checks, notifications, or event handlers. Before the command line is executed, all valid macros are replaced with their respective values.
Macro “$USER1$” refers to the full path where the plugins reside on the blësk system. Macro “$USER2$” refers to the full path where Event Handler scripts are located. Usually, you use macros to avoid typing the full path of the plugin to be used.
Command type: This directive is used to differ checks and misc commands. It's an APM definition only.
Commands tagged as “check command” will be displayed in services and hosts as check commands.
Commands tagged as “misc command” will be displayed in contacts, services, and hosts as event commands. Unclassified commands will be displayed everywhere. This definition is only used to reduce the number of commands shown in the selection fields, and to provide a clearer view.