From 0c3d246dbb43da9b537266dd1f2a65e52bc50cd4 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Wed, 16 Apr 2014 16:47:25 +0200 Subject: [PATCH] Update documentation for external commands. Refs #5956 Refs #5609 --- doc/3.08-external-commands.md | 4 +- doc/6.12-schemas.md | 2 + doc/6.13-external-commands-list,md | 147 +++++++++++++++++++ doc/8-differences-between-icinga-1x-and-2.md | 70 +++++++-- 4 files changed, 205 insertions(+), 18 deletions(-) create mode 100644 doc/6.13-external-commands-list,md diff --git a/doc/3.08-external-commands.md b/doc/3.08-external-commands.md index 83b88b6d0..85ac9a8b2 100644 --- a/doc/3.08-external-commands.md +++ b/doc/3.08-external-commands.md @@ -34,7 +34,7 @@ Debian packages use `nagios` as the default user and group name. Therefore chang ### External Command List -A list of currently supported external commands can be found on the -[Icinga Wiki](https://wiki.icinga.org/display/icinga2/External+Commands). +A list of currently supported external commands can be found [here](#external-commands-list-detail) + Detailed information on the commands and their required parameters can be found on the [Icinga 1.x documentation](http://docs.icinga.org/latest/en/extcommands2.html). diff --git a/doc/6.12-schemas.md b/doc/6.12-schemas.md index 21b5ffceb..ef501d630 100644 --- a/doc/6.12-schemas.md +++ b/doc/6.12-schemas.md @@ -82,6 +82,8 @@ A detailed list which table attributes are supported can be found here: [https:/ #### Livestatus COMMAND Queries +A list of available external commands and their parameters can be found [here](#external-commands-list-detail) + $ echo -e 'COMMAND ' | netcat 127.0.0.1 6558 diff --git a/doc/6.13-external-commands-list,md b/doc/6.13-external-commands-list,md new file mode 100644 index 000000000..f9d3e830e --- /dev/null +++ b/doc/6.13-external-commands-list,md @@ -0,0 +1,147 @@ +## External Commands List + +Additional details can be found in the [Icinga 1.x Documentation](http://docs.icinga.org/latest/en/extcommands2.html) + + Command name | Parameters | Description + ------------------------------------------|-----------------------------------|-------------------------- + PROCESS_HOST_CHECK_RESULT | ;;; (3) | + PROCESS_SERVICE_CHECK_RESULT | ;;;; (4) | + SCHEDULE_HOST_CHECK | ;; (2) | + SCHEDULE_FORCED_HOST_CHECK | ;; (2) | + SCHEDULE_SVC_CHECK | ;;; (3) | + SCHEDULE_FORCED_SVC_CHECK | ;;; (3) | + ENABLE_HOST_CHECK | ; (1) | + DISABLE_HOST_CHECK | ; (1) | + ENABLE_SVC_CHECK | ;; (2) | + DISABLE_SVC_CHECK | ;; (2) | + SHUTDOWN_PROCESS | (0) | + RESTART_PROCESS | (0) | + SCHEDULE_FORCED_HOST_SVC_CHECKS | ;; (2) | + SCHEDULE_HOST_SVC_CHECKS | ;; (2) | + ENABLE_HOST_SVC_CHECKS | ; (1) | + DISABLE_HOST_SVC_CHECKS | ; (1) | + ACKNOWLEDGE_SVC_PROBLEM | ;;;;;;; (7) | + ACKNOWLEDGE_SVC_PROBLEM_EXPIRE | ;;;;;;;; (8) | + REMOVE_SVC_ACKNOWLEDGEMENT | ;; (2) | + ACKNOWLEDGE_HOST_PROBLEM | ;;;;;; (6) | + ACKNOWLEDGE_HOST_PROBLEM_EXPIRE | ;;;;;;; (7) | + REMOVE_HOST_ACKNOWLEDGEMENT | ; (1) | + DISABLE_HOST_FLAP_DETECTION | ; (1) | + ENABLE_HOST_FLAP_DETECTION | ; (1) | + DISABLE_SVC_FLAP_DETECTION | ;; (2) | + ENABLE_SVC_FLAP_DETECTION | ;; (2) | + ENABLE_HOSTGROUP_SVC_CHECKS | ; (1) | + DISABLE_HOSTGROUP_SVC_CHECKS | ; (1) | + ENABLE_SERVICEGROUP_SVC_CHECKS | ; (1) | + DISABLE_SERVICEGROUP_SVC_CHECKS | ; (1) | + ENABLE_PASSIVE_HOST_CHECKS | ; (1) | + DISABLE_PASSIVE_HOST_CHECKS | ; (1) | + ENABLE_PASSIVE_SVC_CHECKS | ;; (2) | + DISABLE_PASSIVE_SVC_CHECKS | ;; (2) | + ENABLE_SERVICEGROUP_PASSIVE_SVC_CHECKS | ; (1) | + DISABLE_SERVICEGROUP_PASSIVE_SVC_CHECKS | ; (1) | + ENABLE_HOSTGROUP_PASSIVE_SVC_CHECKS | ; (1) | + DISABLE_HOSTGROUP_PASSIVE_SVC_CHECKS | ; (1) | + PROCESS_FILE | ;; (2) | + SCHEDULE_SVC_DOWNTIME | ;;;;;;;;; (9) | + DEL_SVC_DOWNTIME | ; (1) | + SCHEDULE_HOST_DOWNTIME | ;;;;;;;; (8) | + DEL_HOST_DOWNTIME | ; (1) | + SCHEDULE_HOST_SVC_DOWNTIME | ;;;;;;;; (8) | + SCHEDULE_HOSTGROUP_HOST_DOWNTIME | ;;;;;;;; (8) | + SCHEDULE_HOSTGROUP_SVC_DOWNTIME | ;;;;;;;; (8) | + SCHEDULE_SERVICEGROUP_HOST_DOWNTIME | ;;;;;;;; (8) | + SCHEDULE_SERVICEGROUP_SVC_DOWNTIME | ;;;;;;;; (8) | + ADD_HOST_COMMENT | ;;;; (4) | + DEL_HOST_COMMENT | ; (1) | + ADD_SVC_COMMENT | ;;;;; (5) | + DEL_SVC_COMMENT | ; (1) | + DEL_ALL_HOST_COMMENTS | ; (1) | + DEL_ALL_SVC_COMMENTS | ;; (2) | + SEND_CUSTOM_HOST_NOTIFICATION | ;;;; (4) | + SEND_CUSTOM_SVC_NOTIFICATION | ;;;;; (5) | + DELAY_HOST_NOTIFICATION | ;; (2) | + DELAY_SVC_NOTIFICATION | ;;; (3) | + ENABLE_HOST_NOTIFICATIONS | ; (1) | + DISABLE_HOST_NOTIFICATIONS | ; (1) | + ENABLE_SVC_NOTIFICATIONS | ;; (2) | + DISABLE_SVC_NOTIFICATIONS | ;; (2) | + DISABLE_HOSTGROUP_HOST_CHECKS | ; (1) | + DISABLE_HOSTGROUP_PASSIVE_HOST_CHECKS | ; (1) | + DISABLE_SERVICEGROUP_HOST_CHECKS | ; (1) | + DISABLE_SERVICEGROUP_PASSIVE_HOST_CHECKS | ; (1) | + ENABLE_HOSTGROUP_HOST_CHECKS | ; (1) | + ENABLE_HOSTGROUP_PASSIVE_HOST_CHECKS | ; (1) | + ENABLE_SERVICEGROUP_HOST_CHECKS | ; (1) | + ENABLE_SERVICEGROUP_PASSIVE_HOST_CHECKS | ; (1) | + ENABLE_NOTIFICATIONS | (0) | + DISABLE_NOTIFICATIONS | (0) | + ENABLE_FLAP_DETECTION | (0) | + DISABLE_FLAP_DETECTION | (0) | + ENABLE_EVENT_HANDLERS | (0) | + DISABLE_EVENT_HANDLERS | (0) | + ENABLE_PERFORMANCE_DATA | (0) | + DISABLE_PERFORMANCE_DATA | (0) | + START_EXECUTING_HOST_CHECKS | (0) | + STOP_EXECUTING_HOST_CHECKS | (0) | + START_EXECUTING_SVC_CHECKS | (0) | + STOP_EXECUTING_SVC_CHECKS | (0) | + CHANGE_SVC_MODATTR | ;;; (3) | + CHANGE_HOST_MODATTR | ;; (2) | + CHANGE_NORMAL_SVC_CHECK_INTERVAL | ;;; (3) | + CHANGE_NORMAL_HOST_CHECK_INTERVAL | ;; (2) | + CHANGE_RETRY_SVC_CHECK_INTERVAL | ;;; (3) | + CHANGE_RETRY_HOST_CHECK_INTERVAL | ;; (2) | + ENABLE_HOST_EVENT_HANDLER | ; (1) | + DISABLE_HOST_EVENT_HANDLER | ; (1) | + ENABLE_SVC_EVENT_HANDLER | ;; (2) | + DISABLE_SVC_EVENT_HANDLER | ;; (2) | + CHANGE_HOST_EVENT_HANDLER | ;; (2) | + CHANGE_SVC_EVENT_HANDLER | ;;; (3) | + CHANGE_HOST_CHECK_COMMAND | ;; (2) | + CHANGE_SVC_CHECK_COMMAND | ;;; (3) | + CHANGE_MAX_HOST_CHECK_ATTEMPTS | ;; (2) | + CHANGE_MAX_SVC_CHECK_ATTEMPTS | ;;; (3) | + CHANGE_HOST_CHECK_TIMEPERIOD | ;; (2) | + CHANGE_SVC_CHECK_TIMEPERIOD | ;;; | + CHANGE_CUSTOM_HOST_VAR | ;;; (3) | + CHANGE_CUSTOM_SVC_VAR | ;;;; (4) | + CHANGE_CUSTOM_USER_VAR | ;;; (3) | + CHANGE_CUSTOM_CHECKCOMMAND_VAR | ;;; (3) | + CHANGE_CUSTOM_EVENTCOMMAND_VAR | ;;; (3) | + CHANGE_CUSTOM_NOTIFICATIONCOMMAND_VAR | ;;; (3) | + ENABLE_HOSTGROUP_HOST_NOTIFICATIONS | ; (1) | + ENABLE_HOSTGROUP_SVC_NOTIFICATIONS | ; (1) | + DISABLE_HOSTGROUP_HOST_NOTIFICATIONS | ; (1) | + DISABLE_HOSTGROUP_SVC_NOTIFICATIONS | ; (1) | + ENABLE_SERVICEGROUP_HOST_NOTIFICATIONS | ; (1) | + DISABLE_SERVICEGROUP_HOST_NOTIFICATIONS | ; (1) | + ENABLE_SERVICEGROUP_SVC_NOTIFICATIONS | ; (1) | + DISABLE_SERVICEGROUP_SVC_NOTIFICATIONS | ; (1) | + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/8-differences-between-icinga-1x-and-2.md b/doc/8-differences-between-icinga-1x-and-2.md index de30a9703..187cfc327 100644 --- a/doc/8-differences-between-icinga-1x-and-2.md +++ b/doc/8-differences-between-icinga-1x-and-2.md @@ -165,24 +165,15 @@ account by Icinga 1.x Classic UI and Web. ## Custom Attributes Icinga 2 allows you to define custom attributes in the `vars` dictionary. - -### Action Url, Notes Url, Notes - -Icinga 1.x objects support configuration attributes not required as runtime -values but for external resources such as Icinga 1.x Classic UI or Web. The `notes`, `notes_url`, `action_url`, `icon_image`, `icon_image_alt` -attributes for host and service objects, additionally `statusmap_image` and -`2d_coords` for the host's representation in status maps. +attributes for host and service objects are still available in Icinga 2. + +### Statusmap Image, 2D Coords These attributes can be set using the `vars` dictionary in Icinga 2 `Host` or `Service` objects: vars = { - notes = "Icinga 2 is the best!" - notes_url = "http://docs.icinga.org" - action_url = "http://dev.icinga.org" - icon_image = "../../images/logos/Stats2.png" - icon_image_alt = "icinga2 alt icon text" "2d_coords" = "1,2" statusmap_image = "../../images/logos/icinga.gif" } @@ -227,8 +218,6 @@ and their users. ## Macros -TODO - Various object attributes and runtime variables can be accessed as macros in commands in Icinga 1.x - Icinga 2 supports all required [custom attributes](#custom-attributes). @@ -270,8 +259,6 @@ With the freely definable custom attributes in Icinga 2 it looks like this: ### Environment Macros -TODO - The global configuration setting `enable_environment_macros` does not exist in Icinga 2. @@ -353,6 +340,57 @@ Changes to global runtime macros: TIME | icinga.time +## External Commands + +`CHANGE_CUSTOM_CONTACT_VAR` was renamed to `CHANGE_CUSTOM_USER_VAR`. + +The following external commands are not supported: + + CHANGE_CONTACT_HOST_NOTIFICATION_TIMEPERIOD + CHANGE_HOST_NOTIFICATION_TIMEPERIOD + CHANGE_SVC_NOTIFICATION_TIMEPERIOD + DEL_DOWNTIME_BY_HOSTGROUP_NAME + DEL_DOWNTIME_BY_START_TIME_COMMENT + DISABLE_ALL_NOTIFICATIONS_BEYOND_HOST + DISABLE_CONTACT_HOST_NOTIFICATIONS + DISABLE_CONTACT_SVC_NOTIFICATIONS + DISABLE_CONTACTGROUP_HOST_NOTIFICATIONS + DISABLE_CONTACTGROUP_SVC_NOTIFICATIONS + DISABLE_FAILURE_PREDICTION + DISABLE_HOST_AND_CHILD_NOTIFICATIONS + DISABLE_HOST_FRESHNESS_CHECKS + DISABLE_HOST_SVC_NOTIFICATIONS + DISABLE_NOTIFICATIONS_EXPIRE_TIME + DISABLE_SERVICE_FRESHNESS_CHECKS + ENABLE_ALL_NOTIFICATIONS_BEYOND_HOST + ENABLE_CONTACT_HOST_NOTIFICATIONS + ENABLE_CONTACT_SVC_NOTIFICATIONS + ENABLE_CONTACTGROUP_HOST_NOTIFICATIONS + ENABLE_CONTACTGROUP_SVC_NOTIFICATIONS + ENABLE_FAILURE_PREDICTION + ENABLE_HOST_AND_CHILD_NOTIFICATIONS + ENABLE_HOST_FRESHNESS_CHECKS + ENABLE_HOST_SVC_NOTIFICATIONS + ENABLE_SERVICE_FRESHNESS_CHECKS + READ_STATE_INFORMATION + SAVE_STATE_INFORMATION + SCHEDULE_AND_PROPAGATE_HOST_DOWNTIME + SCHEDULE_AND_PROPAGATE_TRIGGERED_HOST_DOWNTIME + SET_HOST_NOTIFICATION_NUMBER + SET_SVC_NOTIFICATION_NUMBER + START_ACCEPTING_PASSIVE_HOST_CHECKS + START_ACCEPTING_PASSIVE_SVC_CHECKS + START_OBSESSING_OVER_HOST + START_OBSESSING_OVER_HOST_CHECKS + START_OBSESSING_OVER_SVC + START_OBSESSING_OVER_SVC_CHECKS + STOP_ACCEPTING_PASSIVE_HOST_CHECKS + STOP_ACCEPTING_PASSIVE_SVC_CHECKS + STOP_OBSESSING_OVER_HOST + STOP_OBSESSING_OVER_HOST_CHECKS + STOP_OBSESSING_OVER_SVC + STOP_OBSESSING_OVER_SVC_CHECKS + ## Checks ### Check Output -- 2.40.0