]> granicus.if.org Git - icinga2/commitdiff
Deprecate the client 'bottom up' mode w/ node update-config
authorMichael Friedrich <michael.friedrich@icinga.com>
Wed, 23 Nov 2016 14:33:28 +0000 (15:33 +0100)
committerMichael Friedrich <michael.friedrich@icinga.com>
Wed, 23 Nov 2016 14:33:28 +0000 (15:33 +0100)
This includes deprecation warnings and migration documentation.

fixes #13255

23 files changed:
doc/11-cli-commands.md
doc/6-distributed-monitoring.md
icinga-app/icinga.cpp
lib/cli/clicommand.cpp
lib/cli/clicommand.hpp
lib/cli/nodeaddcommand.cpp
lib/cli/nodeaddcommand.hpp
lib/cli/nodeblackandwhitelistcommand.cpp
lib/cli/nodeblackandwhitelistcommand.hpp
lib/cli/nodelistcommand.cpp
lib/cli/nodelistcommand.hpp
lib/cli/noderemovecommand.cpp
lib/cli/noderemovecommand.hpp
lib/cli/nodesetcommand.cpp
lib/cli/nodesetcommand.hpp
lib/cli/nodeupdateconfigcommand.cpp
lib/cli/nodeupdateconfigcommand.hpp
lib/cli/repositoryclearchangescommand.cpp
lib/cli/repositoryclearchangescommand.hpp
lib/cli/repositorycommitcommand.cpp
lib/cli/repositorycommitcommand.hpp
lib/cli/repositoryobjectcommand.cpp
lib/cli/repositoryobjectcommand.hpp

index 93019e86c559d7680498389fc7b977189db3c420..75a6d1266dc5a7e22db411b798890bdc3a1b6835 100644 (file)
@@ -12,29 +12,30 @@ Run `icinga2` without any arguments to get a list of all available global
 options.
 
     # icinga2
-    icinga2 - The Icinga 2 network monitoring daemon (version: v2.5.0)
-
+    icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.0)
+    
     Usage:
       icinga2 <command> [<arguments>]
-
+    
     Supported commands:
+      * api setup (setup for api)
       * console (Icinga console)
       * daemon (starts Icinga 2)
       * feature disable (disables specified feature)
       * feature enable (enables specified feature)
       * feature list (lists all enabled features)
-      * node add (add node)
-      * node blacklist add (adds a new blacklist filter)
-      * node blacklist list (lists all blacklist filters)
-      * node blacklist remove (removes a blacklist filter)
-      * node list (lists all nodes)
-      * node remove (removes node)
-      * node set (set node attributes)
+      * node add (add node) (DEPRECATED)
+      * node blacklist add (adds a new blacklist filter) (DEPRECATED)
+      * node blacklist list (lists all blacklist filters) (DEPRECATED)
+      * node blacklist remove (removes a blacklist filter) (DEPRECATED)
+      * node list (lists all nodes) (DEPRECATED)
+      * node remove (removes node) (DEPRECATED)
+      * node set (set node attributes) (DEPRECATED)
       * node setup (set up node)
-      * node update-config (update node config)
-      * node whitelist add (adds a new whitelist filter)
-      * node whitelist list (lists all whitelist filters)
-      * node whitelist remove (removes a whitelist filter)
+      * node update-config (update node config) (DEPRECATED)
+      * node whitelist add (adds a new whitelist filter) (DEPRECATED)
+      * node whitelist list (lists all whitelist filters) (DEPRECATED)
+      * node whitelist remove (removes a whitelist filter) (DEPRECATED)
       * node wizard (wizard for node setup)
       * object list (lists all objects)
       * pki new-ca (sets up a new CA)
@@ -43,38 +44,39 @@ options.
       * pki save-cert (saves another Icinga 2 instance's certificate)
       * pki sign-csr (signs a CSR)
       * pki ticket (generates a ticket)
-      * repository clear-changes (clear uncommitted repository changes)
-      * repository commit (commit repository changes)
-      * repository endpoint add (adds a new Endpoint object)
-      * repository endpoint list (lists all Endpoint objects)
-      * repository endpoint remove (removes a Endpoint object)
-      * repository host add (adds a new Host object)
-      * repository host list (lists all Host objects)
-      * repository host remove (removes a Host object)
-      * repository service add (adds a new Service object)
-      * repository service list (lists all Service objects)
-      * repository service remove (removes a Service object)
-      * repository zone add (adds a new Zone object)
-      * repository zone list (lists all Zone objects)
-      * repository zone remove (removes a Zone object)
+      * repository clear-changes (clear uncommitted repository changes) (DEPRECATED)
+      * repository commit (commit repository changes) (DEPRECATED)
+      * repository endpoint add (adds a new Endpoint object) (DEPRECATED)
+      * repository endpoint list (lists all Endpoint objects) (DEPRECATED)
+      * repository endpoint remove (removes a Endpoint object) (DEPRECATED)
+      * repository host add (adds a new Host object) (DEPRECATED)
+      * repository host list (lists all Host objects) (DEPRECATED)
+      * repository host remove (removes a Host object) (DEPRECATED)
+      * repository service add (adds a new Service object) (DEPRECATED)
+      * repository service list (lists all Service objects) (DEPRECATED)
+      * repository service remove (removes a Service object) (DEPRECATED)
+      * repository zone add (adds a new Zone object) (DEPRECATED)
+      * repository zone list (lists all Zone objects) (DEPRECATED)
+      * repository zone remove (removes a Zone object) (DEPRECATED)
       * troubleshoot (collect information for troubleshooting)
       * variable get (gets a variable)
       * variable list (lists all variables)
-
+    
     Global options:
-      -h [ --help ]          show this help message
-      -V [ --version ]       show version information
-      --color                use VT100 color codes even when stdout is not a
-                             terminal
-      -D [ --define ] arg    define a constant
-      -a [ --app ] arg       application library name (default: icinga)
-      -l [ --library ] arg   load a library
-      -I [ --include ] arg   add include search directory
-      -x [ --log-level ] arg specify the log level for the console log
-
-    Command options:
-
-       Report bugs at <https://dev.icinga.org/>
+      -h [ --help ]             show this help message
+      -V [ --version ]          show version information
+      --color                   use VT100 color codes even when stdout is not a
+                                terminal
+      -D [ --define ] arg       define a constant
+      -a [ --app ] arg          application library name (default: icinga)
+      -l [ --library ] arg      load a library
+      -I [ --include ] arg      add include search directory
+      -x [ --log-level ] arg    specify the log level for the console log.
+                                The valid value is either debug, notice,
+                                information (default), warning, or critical
+      -X [ --script-debugger ]  whether to enable the script debugger
+    
+    Report bugs at <https://dev.icinga.org/>
     Icinga home page: <https://www.icinga.org/>
 
 
@@ -83,8 +85,7 @@ options.
 Bash Auto-Completion (pressing `<TAB>`) is provided only for the corresponding context.
 
 While `--config` will suggest and auto-complete files and directories on disk,
-`feature enable` will only suggest disabled features. `repository` will know
-about object specific attributes, and so on. Try it yourself.
+`feature enable` will only suggest disabled features. Try it yourself.
 
 RPM and Debian packages install the bash completion files into
 `/etc/bash_completion.d/icinga2`.
@@ -103,6 +104,13 @@ Debian/Ubuntu:
 
     # apt-get install bash-completion
 
+Ensure that the `bash-completion.d` directory is added to your shell
+environment. You can manually source the icinga2 bash-completion file
+into your current session and test it:
+
+    # source /etc/bash-completion.d/icinga2
+
+
 ## <a id="cli-commands-global-options"></a> Icinga 2 CLI Global Options
 
 ### Application Type
@@ -137,7 +145,7 @@ added.
 
 ## <a id="cli-command-console"></a> CLI command: Console
 
-The CLI command `console` can be used to evaluate Icinga config expressions, e.g. to test
+The CLI command `console` can be used to evaluate Icinga config expressions, e.g. to test
 [functions](17-language-reference.md#functions).
 
     $ icinga2 console
@@ -167,7 +175,9 @@ are required for executing config expressions and auto-completion.
 
 You can specify the API URL using the `--connect` parameter.
 
-Although the password can be specified there process arguments on UNIX platforms are usually visible to other users (e.g. through `ps`). In order to securely specify the user credentials the console supports two environment variables:
+Although the password can be specified there process arguments on UNIX platforms are
+usually visible to other users (e.g. through `ps`). In order to securely specify the
+user credentials the console supports two environment variables:
 
   Environment variable | Description
   ---------------------|-------------
@@ -177,7 +187,7 @@ Although the password can be specified there process arguments on UNIX platforms
 Here's an example:
 
     $ ICINGA2_API_PASSWORD=icinga icinga2 console --connect 'https://root@localhost:5665/'
-    Icinga 2 (version: v2.4.0)
+    Icinga 2 (version: v2.6.0)
     <1> =>
 
 Once connected you can inspect variables and execute other expressions by entering them at the prompt:
@@ -214,9 +224,13 @@ Once connected you can inspect variables and execute other expressions by enteri
     <3> =>
 
 
-You can use the `--eval` parameter to evaluate a single expression in batch mode. Using the `--file` option you can specify a file which should be evaluated. The output format for batch mode is JSON.
+You can use the `--eval` parameter to evaluate a single expression in batch mode.
+Using the `--file` option you can specify a file which should be evaluated.
+The output format for batch mode is JSON.
 
-The `--syntax-only` option can be used in combination with `--eval` or `--file` to check a script for syntax errors. In this mode the script is parsed to identify syntax errors but not evaluated.
+The `--syntax-only` option can be used in combination with `--eval` or `--file`
+to check a script for syntax errors. In this mode the script is parsed to identify
+syntax errors but not evaluated.
 
 Here's an example that retrieves the command that was used by Icinga to check the `example.localdomain` host:
 
@@ -237,39 +251,43 @@ The CLI command `daemon` provides the functionality to start/stop Icinga 2.
 Furthermore it provides the [configuration validation](11-cli-commands.md#config-validation).
 
     # icinga2 daemon --help
-    icinga2 - The Icinga 2 network monitoring daemon (version: v2.5.0)
-
+    icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.0)
+    
     Usage:
       icinga2 daemon [<arguments>]
-
+    
     Starts Icinga 2.
-
+    
     Global options:
-      -h [ --help ]          show this help message
-      -V [ --version ]       show version information
-      --color                use VT100 color codes even when stdout is not a
-                             terminal
-      -D [ --define ] arg    define a constant
-      -a [ --app ] arg       application library name (default: icinga)
-      -l [ --library ] arg   load a library
-      -I [ --include ] arg   add include search directory
-      -x [ --log-level ] arg specify the log level for the console log
-
+      -h [ --help ]             show this help message
+      -V [ --version ]          show version information
+      --color                   use VT100 color codes even when stdout is not a
+                                terminal
+      -D [ --define ] arg       define a constant
+      -a [ --app ] arg          application library name (default: icinga)
+      -l [ --library ] arg      load a library
+      -I [ --include ] arg      add include search directory
+      -x [ --log-level ] arg    specify the log level for the console log.
+                                The valid value is either debug, notice,
+                                information (default), warning, or critical
+      -X [ --script-debugger ]  whether to enable the script debugger
+    
     Command options:
-      -c [ --config ] arg   parse a configuration file
-      -z [ --no-config ]    start without a configuration file
-      -C [ --validate ]     exit after validating the configuration
-      -e [ --errorlog ] arg log fatal errors to the specified log file (only works
-                            in combination with --daemonize)
-      -d [ --daemonize ]    detach from the controlling terminal
-
+      -c [ --config ] arg       parse a configuration file
+      -z [ --no-config ]        start without a configuration file
+      -C [ --validate ]         exit after validating the configuration
+      -e [ --errorlog ] arg     log fatal errors to the specified log file (only
+                                works in combination with --daemonize)
+      -d [ --daemonize ]        detach from the controlling terminal
+    
     Report bugs at <https://dev.icinga.org/>
     Icinga home page: <https://www.icinga.org/>
 
+
 ### Config Files
 
 Using the `--config` option you can specify one or more configuration files.
-Config files are processed in the order they're specified on the command-line.
+Configuration files are processed in the order they're specified on the command-line.
 
 When no configuration file is specified and the `--no-config` is not used
 Icinga 2 automatically falls back to using the configuration file
@@ -281,69 +299,78 @@ The `--validate` option can be used to check if your configuration files
 contain errors. If any errors are found, the exit status is 1, otherwise 0
 is returned. More details in the [configuration validation](11-cli-commands.md#config-validation) chapter.
 
-
 ## <a id="cli-command-feature"></a> CLI command: Feature
 
 The `feature enable` and `feature disable` commands can be used to enable and disable features:
 
     # icinga2 feature disable <tab>
-    checker       --color       --define      --help        --include     --library     --log-level   mainlog       notification  --version
-
+    --app              --define           --include          --log-level        --version          checker            graphite           mainlog
+    --color            --help             --library          --script-debugger  api                command            ido-mysql          notification
+    
     # icinga2 feature enable <tab>
-    api           command       debuglog      graphite      icingastatus  ido-pgsql     --library     --log-level   statusdata    --version
-    --color       compatlog     --define      --help        ido-mysql     --include     livestatus    perfdata      syslog
+    --app              --define           --include          --log-level        --version          debuglog           ido-pgsql          livestatus         perfdata           syslog
+    --color            --help             --library          --script-debugger  compatlog          gelf               influxdb           opentsdb           statusdata
 
 The `feature list` command shows which features are currently enabled:
 
     # icinga2 feature list
-    Disabled features: agent command compatlog debuglog gelf graphite icingastatus notification perfdata statusdata syslog
-    Enabled features: api checker livestatus mainlog
+    Disabled features: compatlog debuglog gelf ido-pgsql influxdb livestatus opentsdb perfdata statusdata syslog
+    Enabled features: api checker command graphite ido-mysql mainlog notification
 
 
 ## <a id="cli-command-node"></a> CLI command: Node
 
+> **Warning**
+>
+> This CLI command and its sub commands except for `setup` and `wizard`
+> have been deprecated in v2.6 and will be
+> removed in future releases.
+>
+> Make sure to follow the release announcements on the [Icinga website](https://www.icinga.com).
+
 Provides the functionality to install and manage master and client
 nodes in a [distributed monitoring](6-distributed-monitoring.md#distributed-monitoring) scenario.
 
-
     # icinga2 node --help
-    icinga2 - The Icinga 2 network monitoring daemon (version: v2.5.0)
-
+    icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.0)
+    
     Usage:
       icinga2 <command> [<arguments>]
-
+    
     Supported commands:
-      * node add (add node)
-      * node blacklist add (adds a new blacklist filter)
-      * node blacklist list (lists all blacklist filters)
-      * node blacklist remove (removes a blacklist filter)
-      * node list (lists all nodes)
-      * node remove (removes node)
-      * node set (set node attributes)
+      * node add (add node) (DEPRECATED)
+      * node blacklist add (adds a new blacklist filter) (DEPRECATED)
+      * node blacklist list (lists all blacklist filters) (DEPRECATED)
+      * node blacklist remove (removes a blacklist filter) (DEPRECATED)
+      * node list (lists all nodes) (DEPRECATED)
+      * node remove (removes node) (DEPRECATED)
+      * node set (set node attributes) (DEPRECATED)
       * node setup (set up node)
-      * node update-config (update node config)
-      * node whitelist add (adds a new whitelist filter)
-      * node whitelist list (lists all whitelist filters)
-      * node whitelist remove (removes a whitelist filter)
+      * node update-config (update node config) (DEPRECATED)
+      * node whitelist add (adds a new whitelist filter) (DEPRECATED)
+      * node whitelist list (lists all whitelist filters) (DEPRECATED)
+      * node whitelist remove (removes a whitelist filter) (DEPRECATED)
       * node wizard (wizard for node setup)
-
+    
     Global options:
-      -h [ --help ]          show this help message
-      -V [ --version ]       show version information
-      --color                use VT100 color codes even when stdout is not a
-                             terminal
-      -D [ --define ] arg    define a constant
-      -a [ --app ] arg       application library name (default: icinga)
-      -l [ --library ] arg   load a library
-      -I [ --include ] arg   add include search directory
-      -x [ --log-level ] arg specify the log level for the console log
-
-    Command options:
-
+      -h [ --help ]             show this help message
+      -V [ --version ]          show version information
+      --color                   use VT100 color codes even when stdout is not a
+                                terminal
+      -D [ --define ] arg       define a constant
+      -a [ --app ] arg          application library name (default: icinga)
+      -l [ --library ] arg      load a library
+      -I [ --include ] arg      add include search directory
+      -x [ --log-level ] arg    specify the log level for the console log.
+                                The valid value is either debug, notice,
+                                information (default), warning, or critical
+      -X [ --script-debugger ]  whether to enable the script debugger
+    
     Report bugs at <https://dev.icinga.org/>
     Icinga home page: <https://www.icinga.org/>
 
 
+
 ## <a id="cli-command-object"></a> CLI command: Object
 
 The `object` CLI command can be used to list all configuration objects and their
@@ -353,51 +380,51 @@ That way you can also identify which objects have been created from your [apply
 More information can be found in the [troubleshooting](15-troubleshooting.md#list-configuration-objects) section.
 
     # icinga2 object --help
-    icinga2 - The Icinga 2 network monitoring daemon (version: v2.5.0)
-
+    icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.0)
+    
     Usage:
       icinga2 <command> [<arguments>]
-
+    
     Supported commands:
       * object list (lists all objects)
-
+    
     Global options:
-      -h [ --help ]          show this help message
-      -V [ --version ]       show version information
-      --color                use VT100 color codes even when stdout is not a
-                             terminal
-      -D [ --define ] arg    define a constant
-      -a [ --app ] arg       application library name (default: icinga)
-      -l [ --library ] arg   load a library
-      -I [ --include ] arg   add include search directory
-      -x [ --log-level ] arg specify the log level for the console log
-
-    Command options:
-
+      -h [ --help ]             show this help message
+      -V [ --version ]          show version information
+      --color                   use VT100 color codes even when stdout is not a
+                                terminal
+      -D [ --define ] arg       define a constant
+      -a [ --app ] arg          application library name (default: icinga)
+      -l [ --library ] arg      load a library
+      -I [ --include ] arg      add include search directory
+      -x [ --log-level ] arg    specify the log level for the console log.
+                                The valid value is either debug, notice,
+                                information (default), warning, or critical
+      -X [ --script-debugger ]  whether to enable the script debugger
+    
     Report bugs at <https://dev.icinga.org/>
     Icinga home page: <https://www.icinga.org/>
 
-
-
 ## <a id="cli-command-pki"></a> CLI command: Pki
 
 Provides the CLI commands to
 
-* generate a new local CA
+* generate a new certificate authority (CA)
 * generate a new CSR or self-signed certificate
 * sign a CSR and return a certificate
 * save a master certificate manually
 * request a signed certificate from the master
 * generate a new ticket for the client setup
 
-This functionality is used by the [node setup/wizard](11-cli-commands.md#cli-command-pki) CLI commands too.
+This functionality is used by the [node setup/wizard](11-cli-commands.md#cli-command-node) CLI commands.
+You will need them in the [distributed monitoring chapter](6-distributed-monitoring.md#distributed-monitoring).
 
     # icinga2 pki --help
-    icinga2 - The Icinga 2 network monitoring daemon (version: v2.5.0)
-
+    icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.0)
+    
     Usage:
       icinga2 <command> [<arguments>]
-
+    
     Supported commands:
       * pki new-ca (sets up a new CA)
       * pki new-cert (creates a new CSR)
@@ -405,63 +432,75 @@ This functionality is used by the [node setup/wizard](11-cli-commands.md#cli-com
       * pki save-cert (saves another Icinga 2 instance's certificate)
       * pki sign-csr (signs a CSR)
       * pki ticket (generates a ticket)
-
+    
     Global options:
-      -h [ --help ]          show this help message
-      -V [ --version ]       show version information
-      --color                use VT100 color codes even when stdout is not a
-                             terminal
-      -D [ --define ] arg    define a constant
-      -a [ --app ] arg       application library name (default: icinga)
-      -l [ --library ] arg   load a library
-      -I [ --include ] arg   add include search directory
-      -x [ --log-level ] arg specify the log level for the console log
-
-    Command options:
-
+      -h [ --help ]             show this help message
+      -V [ --version ]          show version information
+      --color                   use VT100 color codes even when stdout is not a
+                                terminal
+      -D [ --define ] arg       define a constant
+      -a [ --app ] arg          application library name (default: icinga)
+      -l [ --library ] arg      load a library
+      -I [ --include ] arg      add include search directory
+      -x [ --log-level ] arg    specify the log level for the console log.
+                                The valid value is either debug, notice,
+                                information (default), warning, or critical
+      -X [ --script-debugger ]  whether to enable the script debugger
+    
     Report bugs at <https://dev.icinga.org/>
     Icinga home page: <https://www.icinga.org/>
 
-
 ## <a id="cli-command-repository"></a> CLI command: Repository
 
-This command is not supported anymore. Parts of its functionality
+> **Warning**
+>
+> This CLI command has been deprecated in v2.6 and will be
+> removed in future releases.
+>
+> Make sure to follow the release announcements on the [Icinga website](https://www.icinga.com).
+
+This command is experimental and not finished as public CLI command. Parts of its functionality
 are used in the [node update-config](11-cli-commands.md#cli-command-node) cli command.
 
 ## <a id="cli-command-troubleshoot"></a> CLI command: Troubleshoot
 
-Collects basic information like version, paths, log files and crash reports for troubleshooting purposes and prints them to a file or the console. See [troubleshooting](15-troubleshooting.md#troubleshooting-information-required).
+Collects basic information like version, paths, log files and crash reports for troubleshooting
+purposes and prints them to a file or the console. See [troubleshooting](15-troubleshooting.md#troubleshooting-information-required).
 
 Its output defaults to a file named `troubleshooting-[TIMESTAMP].log` so it won't overwrite older troubleshooting files.
 
-> **Note**
-> Keep in mind that this tool can not collect information from other icinga2 nodes, you will have to run it on
-> each of one of you instances.
-> This is only a tool to collect information to help others help you, it will not attempt to fix anything.
-
+Keep in mind that this tool can not collect information from other icinga2 nodes, you will have to run it on
+each of one of you instances.
+This is only a tool to collect information to help others help you, it will not attempt to fix anything.
 
     # icinga2 troubleshoot --help
-    icinga2 - The Icinga 2 network monitoring daemon (version: v2.2.0-551-g1d0f6ed)
-
+    icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.0)
+    
     Usage:
       icinga2 troubleshoot [<arguments>]
-
+    
+    Collect logs and other relevant information for troubleshooting purposes.
+    
     Global options:
-      -h [ --help ]          show this help message
-      -V [ --version ]      show version information
-      --color                use VT100 color codes even when stdout is not aterminal
-      -D [ --define ] arg    define a constant
-      -a [ --app ] arg       application library name (default: icinga)
-      -l [ --library ] arg   load a library
-      -I [ --include ] arg   add include search directory
-      -x [ --log-level ] arg specify the log level for the console log
-
+      -h [ --help ]             show this help message
+      -V [ --version ]          show version information
+      --color                   use VT100 color codes even when stdout is not a
+                                terminal
+      -D [ --define ] arg       define a constant
+      -a [ --app ] arg          application library name (default: icinga)
+      -l [ --library ] arg      load a library
+      -I [ --include ] arg      add include search directory
+      -x [ --log-level ] arg    specify the log level for the console log.
+                                The valid value is either debug, notice,
+                                information (default), warning, or critical
+      -X [ --script-debugger ]  whether to enable the script debugger
+    
     Command options:
-      -c [ --console ]       print to console instead of file
-      -o [ --output ] arg    path to output file
-      --include-vars         print variables to separate file
-      --inluce-objects       print object to separate file
-
+      -c [ --console ]          print to console instead of file
+      -o [ --output ] arg       path to output file
+      --include-objects         Print the whole objectfile (like `object list`)
+      --include-vars            Print all Variables (like `variable list`)
+    
     Report bugs at <https://dev.icinga.org/>
     Icinga home page: <https://www.icinga.org/>
 
@@ -470,32 +509,32 @@ Its output defaults to a file named `troubleshooting-[TIMESTAMP].log` so it won'
 Lists all configured variables (constants) in a similar fashion like [object list](11-cli-commands.md#cli-command-object).
 
     # icinga2 variable --help
-    icinga2 - The Icinga 2 network monitoring daemon (version: v2.5.0)
-
+    icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.0)
+    
     Usage:
       icinga2 <command> [<arguments>]
-
+    
     Supported commands:
       * variable get (gets a variable)
       * variable list (lists all variables)
-
+    
     Global options:
-      -h [ --help ]          show this help message
-      -V [ --version ]       show version information
-      --color                use VT100 color codes even when stdout is not a
-                             terminal
-      -D [ --define ] arg    define a constant
-      -a [ --app ] arg       application library name (default: icinga)
-      -l [ --library ] arg   load a library
-      -I [ --include ] arg   add include search directory
-      -x [ --log-level ] arg specify the log level for the console log
-
-    Command options:
-
+      -h [ --help ]             show this help message
+      -V [ --version ]          show version information
+      --color                   use VT100 color codes even when stdout is not a
+                                terminal
+      -D [ --define ] arg       define a constant
+      -a [ --app ] arg          application library name (default: icinga)
+      -l [ --library ] arg      load a library
+      -I [ --include ] arg      add include search directory
+      -x [ --log-level ] arg    specify the log level for the console log.
+                                The valid value is either debug, notice,
+                                information (default), warning, or critical
+      -X [ --script-debugger ]  whether to enable the script debugger
+    
     Report bugs at <https://dev.icinga.org/>
     Icinga home page: <https://www.icinga.org/>
 
-
 ## <a id="enable-features"></a> Enabling/Disabling Features
 
 Icinga 2 provides configuration files for some commonly used features. These
@@ -616,17 +655,13 @@ Example filtered by `Service` objects with the name `ping*`:
 
 ## <a id="config-change-reload"></a> Reload on Configuration Changes
 
-Everytime you have changed your configuration you should first tell Icinga 2
+Every time you have changed your configuration you should first tell Icinga 2
 to [validate](11-cli-commands.md#config-validation). If there are no validation errors, you can
 safely reload the Icinga 2 daemon.
 
-    # /etc/init.d/icinga2 reload
+    # systemctl reload icinga2
 
-> **Note**
->
-> The `reload` action will send the `SIGHUP` signal to the Icinga 2 daemon
-> which will validate the configuration in a separate process and not stop
-> the other events like check execution, notifications, etc.
->
-> Details can be found [here](22-migrating-from-icinga-1x.md#differences-1x-2-real-reload).
+The `reload` action will send the `SIGHUP` signal to the Icinga 2 daemon
+which will validate the configuration in a separate process and not stop
+the other events like check execution, notifications, etc.
 
index e97f39410904139f4b1cbd0e03b832bdbbd7a43c..2e08ac4d67ca10162955e1311f9d2c567ec6717b 100644 (file)
@@ -512,12 +512,11 @@ checks, send notifications, etc.
 
 Two different modes are available for synchronizing the host/service object's configuration between nodes and for executing checks:
 
-* [Top down](6-distributed-monitoring.md#distributed-monitoring-top-down): This mode sends the configuration and commands from the master to the child zones.
-* [Bottom up](6-distributed-monitoring.md#distributed-monitoring-bottom-up): This mode leaves the configuration on the child nodes and requires an import on the parent nodes.
+The preferred mode is the [top down](6-distributed-monitoring.md#distributed-monitoring-top-down) approach.
+This mode sends the configuration and commands from the master to the child zones.
 
-The next sections describe the differences and how to set up the two modes.
-Read them carefully before you decide on one of the two options -- do not
-mix them, as this will make things unnecessarily complicated.
+The [bottom up](6-distributed-monitoring.md#distributed-monitoring-bottom-up) has been **deprecated in v2.6 and will be removed in future releases**.
+This mode leaves the configuration files on the child nodes and requires an import on the parent nodes.
 
 **Note**: Check results are always sent from the child nodes to the parent nodes.
 This happens automatically and is ensured by the cluster protocol.
@@ -566,6 +565,8 @@ Include the endpoint and zone configuration on **both** nodes in the file `/etc/
 
 The endpoint configuration could look like this, for example:
 
+    [root@icinga2-client1.localdomain /]# vim /etc/icinga2/zones.conf
+
     object Endpoint "icinga2-master1.localdomain" {
       host = "192.168.56.101"
     }
@@ -581,6 +582,8 @@ is to use the client's FQDN for all object names.
 
 The `master` zone is a parent of the `icinga2-client2.localdomain` zone:
 
+    [root@icinga2-client1.localdomain /]# vim /etc/icinga2/zones.conf
+
     object Zone "master" {
       endpoints = [ "icinga2-master1.localdomain" ] //array with endpoint names
     }
@@ -594,6 +597,8 @@ The `master` zone is a parent of the `icinga2-client2.localdomain` zone:
 In addition, add a [global zone](6-distributed-monitoring.md#distributed-monitoring-global-zone-config-sync)
 for syncing check commands later:
 
+    [root@icinga2-client1.localdomain /]# vim /etc/icinga2/zones.conf
+
     object Zone "global-templates" {
       global = true
     }
@@ -725,6 +730,8 @@ Include the endpoint and zone configuration on **both** nodes in the file `/etc/
 
 The endpoint configuration could look like this:
 
+    [root@icinga2-client1.localdomain /]# vim /etc/icinga2/zones.conf
+
     object Endpoint "icinga2-master1.localdomain" {
       host = "192.168.56.101"
     }
@@ -740,6 +747,8 @@ is to use the client's FQDN for all object names.
 
 The `master` zone is a parent of the `icinga2-client1.localdomain` zone:
 
+    [root@icinga2-client1.localdomain /]# vim /etc/icinga2/zones.conf
+
     object Zone "master" {
       endpoints = [ "icinga2-master1.localdomain" ] //array with endpoint names
     }
@@ -846,6 +855,13 @@ section where you can find detailed information on extending the setup.
 
 ### <a id="distributed-monitoring-bottom-up"></a> Bottom Up Import
 
+> **Warning**
+>
+> This mode has been deprecated in v2.6. You are strongly advised to
+> migrate your existing configuration files to the [top down mode](6-distributed-monitoring.md#distributed-monitoring-top-down).
+>
+> Make sure to follow the release announcements on the [Icinga website](https://www.icinga.com).
+
 This mode requires that you manage the configuration on the client itself.
 Edit the configuration files in `/etc/icinga2/conf.d` or any other
 directory included in the `icinga2.conf` file.
@@ -871,6 +887,8 @@ On the master node, you can list and import the configuration sent from all the
 This example shows all client services on the master node `icinga2-master1.localdomain`:
 
     [root@icinga2-master1.localdomain /]# icinga2 node list
+    Warning: CLI command 'node list' is DEPRECATED! Please read the Changelog.
+
     Node 'icinga2-client1.localdomain' (last seen: Sun Aug 14 11:19:14 2016)
         * Host 'icinga2-client1.localdomain'
             * Service 'disk'
@@ -902,6 +920,8 @@ in order to receive check results from the clients. Therefore
 you need to invoke the `node update-config` command:
 
     [root@icinga2-master1.localdomain /]# icinga2 node update-config
+    Warning: CLI command 'node update-config' is DEPRECATED! Please read the Changelog.
+
     information/cli: Updating node configuration for
     ...
 
@@ -941,6 +961,226 @@ and fix it. This will help with additional notification apply rules
 or group memberships required for Icinga Web 2 and addons.
 
 
+#### <a id="distributed-monitoring-bottom-up-migration-top-down"></a> Bottom Up Migration to Top Down
+
+The bottom up mode has been deprecated and you should be prepared to migrate
+your clients to the existing [top down mode](6-distributed-monitoring.md#distributed-monitoring-top-down).
+
+The bottom up mode generates configuration files on the master node underneath
+the `/etc/icinga2/repository.d` directory. This is achieved by running the
+`node update-config` CLI command and depends on manual user interaction.
+
+Unless you are changing something on the client which requires to run the
+CLI command the configuration files in `repository.d` remain untouched.
+
+The Icinga 2 client generates an object repository from local configuration
+(usually included in `conf.d` by default) and syncs that to the master. The
+`node update-config` CLI command parses these repository files from the `/var/lib/icinga2/api/repository`
+directory and generates the `repository.d` configuration files. In addition to
+that blacklist and whitelist settings are evaluated.
+
+Those CLI commands also hide the fact that each client needs its own `Zone`
+and `Endpoint` object as described [here](6-distributed-monitoring.md#distributed-monitoring-roles).
+
+If you are certain that the master node has an up-to-date `repository.d`
+ensure that all your clients **do not include conf.d in their icinga2.conf**
+configuration file.
+
+**Steps on each client**:
+
+Comment or remove the `include recursive "conf.d"` line.
+
+    [root@icinga2-client1.localdomain /]# vim /etc/icinga2/icinga2.conf
+
+    //include_recursive "conf.d"
+
+In addition to that add a [global zone](6-distributed-monitoring.md#distributed-monitoring-global-zone-config-sync)
+for syncing check commands later:
+
+    [root@icinga2-client1.localdomain /]# vim /etc/icinga2/zones.conf
+
+    object Zone "global-templates" {
+      global = true
+    }
+
+Edit the `api` feature on the client `icinga2-client2.localdomain` in
+the `/etc/icinga2/features-enabled/api.conf` file and make sure to set
+`accept_commands` and `accept_config` to `true`:
+
+    [root@icinga2-client1.localdomain /]# vim /etc/icinga2/features-enabled/api.conf
+
+    object ApiListener "api" {
+       //...
+       accept_commands = true
+       accept_config = true
+    }
+
+Now it is time to validate the configuration and to restart the Icinga 2 daemon
+on the client host `icinga2-client1.localdomain`.
+
+Example on CentOS 7:
+
+    [root@icinga2-client1.localdomain /]# icinga2 daemon -C
+    [root@icinga2-client1.localdomain /]# systemctl restart icinga2
+
+
+**Steps on the configuration master node**:
+
+The migration strategy will guide you to use the client(s) as
+[top down command endpoint](6-distributed-monitoring.md#distributed-monitoring-top-down-command-endpoint).
+
+The `repository.d` directory is organised as a tree of object type directories.
+
+    [root@icinga2-master1.localdomain /]# tree /etc/icinga2/repository.d
+    repository.d/
+    â”œâ”€â”€ README
+    â”œâ”€â”€ endpoints
+    â”‚   â””── icinga2-client1.localdomain.conf
+    â”œâ”€â”€ hosts
+    â”‚   â”œâ”€â”€ icinga2-client1.localdomain
+    â”‚   â”‚   â”œâ”€â”€ disk\ C%3A.conf
+    â”‚   â”‚   â”œâ”€â”€ disk.conf
+    â”‚   â”‚   â”œâ”€â”€ icinga.conf
+    â”‚   â”‚   â”œâ”€â”€ load.conf
+    â”‚   â”‚   â”œâ”€â”€ ping4.conf
+    â”‚   â”‚   â”œâ”€â”€ ping6.conf
+    â”‚   â”‚   â”œâ”€â”€ procs.conf
+    â”‚   â”‚   â”œâ”€â”€ swap.conf
+    â”‚   â”‚   â””── users.conf
+    â”‚   â””── icinga2-client1.localdomain.conf
+    â””── zones
+        â””── icinga2-client1.localdomain.conf
+
+The `endpoints` and `zones` directories contain the required connection
+information for your client. Decide whether to add the configuration
+objects to your `zones.conf` file or keep them as is.
+
+The `hosts` directory contains a `.conf` file for the host object
+and a directory with the same name as the host with service configuration
+files, in this example `hosts/icinga2-client1.localdomain`.
+
+The simplest migration path is to merge the Zone, Endpoint, Host and Service
+object configuration into one new file called `<FQDN>.conf`, for example
+`icinga2-client2.localdomain.conf`.
+
+Therefore create a new file in your master's zone directory in `zones.d`.
+In this example we assume that the zone is called `master`.
+
+Use the information provided by the configuration files `/etc/icinga2/repository.d/zones/icinga2-client1.localdomain.conf`
+and `/etc/icinga2/repository.d/endpoints/icinga2-client1.localdomain.conf`.
+
+    [root@icinga2-master1.localdomain /]# vim /etc/icinga2/zones.d/master/icinga2-client1.localdomain.conf
+
+    object Zone "icinga2-client2.localdomain" {
+      endpoints = [ "icinga2-client2.localdomain" ]
+      parent = "master" //defined in zones.conf
+    }
+    
+    object Endpoint "icinga2-client2.localdomain" {
+      //set the host attribute if the master should connect to the client endpoint
+    }
+
+Now fetch the Host object information located in the `/etc/icinga2/repository.d/hosts/icinga2-client1.localdomain.conf`
+file and adopt it for your needs. One common disadvantage of the bottom up mode is that
+the host object attributes are not synced from the client to the master. Log onto your client
+and manually copy the required attributes into a new host object.
+
+Change the `check_command` attribute to `hostalive` to just ping the host. If you want to keep the
+client connection check `cluster-zone`, you need to add the `cluster_zone` custom attribute.
+
+In addition to that add a new custom attribute called `client_endpoint` which stores
+the command endpoint information. In case you need to learn more details please refer to
+the [top down command endpoint](6-distributed-monitoring.md#distributed-monitoring-top-down-command-endpoint)
+chapter.
+
+    [root@icinga2-master1.localdomain /]# vim /etc/icinga2/zones.d/master/icinga2-client1.localdomain.conf
+
+    object Host "icinga2-client1.localdomain.conf" {
+      //check_command = "hostalive"
+      check_command = "cluster-zone"
+      vars.cluster_zone = name //host name must be the same as the client's zone name
+
+      vars.client_endpoint = name //host name must be the same as the client's endpoint name
+      vars.os = "Linux" //added for group membership
+    }
+
+Extract the service objects from the configuration files in the
+`/etc/icinga2/repository.d/hosts/icinga2-client1.localdomain` directory
+and add them into the `/etc/icinga2/zones.d/master/icinga2-client1.localdomain.conf`
+file.
+
+Best practice is to use a generic [service apply rule](3-monitoring-basics.md#using-apply)
+for each service. Identify common services on your hosts and modify the apply rules for
+your own needs.
+
+Add the services to the generic `services.conf` file in `/etc/icinga2/zones.d/master`.
+
+Change the `check_command` attribute to the actual `CheckCommand` object which should
+be executed. This information is available on the client in the `conf.d` directory.
+Make sure to also extract all required custom attributes from the client and add them
+to the service object e.g. check command thresholds for [disk](10-icinga-template-library.md#plugin-check-command-disk).
+
+Remove the `zone` attribute from all services. Specify the `command_endpoint` attribute
+for all service checks which should be run locally on the client, for example `disk`.
+
+    [root@icinga2-master1.localdomain /]# mkdir -p /etc/icinga2/zones.d/master
+    [root@icinga2-master1.localdomain /]# vim /etc/icinga2/zones.d/master/services.conf
+
+    apply Service "disk" {
+      check_command = "disk" //modified
+      vars.disk_wfree = "10%" //copied from client
+      vars.disk_cfree = "5%"  //copied from client
+
+      command_endpoint = host.vars.client_endpoint
+
+      assign where host.vars.client_endpoint //create service objects for all clients with command endpoint
+    }
+
+The `ping4` service should be executed on the master node itself. That is why
+you must not add the `command_endpoint` attribute here.
+
+    [root@icinga2-master1.localdomain /]# vim /etc/icinga2/zones.d/master/services.conf
+
+    apply Service "ping4" {
+      check_command = "ping4" //modified
+      vars.ping_wrta = 200 //copied from client
+      vars.ping_crta = 500 //copied from client
+
+      assign where host.address
+    }
+
+In case you have been using custom CheckCommand definitions on your client
+you must sync them again using a global zone.
+
+Ensure that the global zone definition is already there in your `zones.conf`
+file.
+
+    [root@icinga2-master1.localdomain /]# vim /etc/icinga2/zones.conf
+
+    object Zone "global-templates" {
+      global = true
+    }
+
+Put existing CheckCommand definitions into `/etc/icinga2/zones.d/global-templates/commands.conf`.
+
+    [root@icinga2-master1.localdomain /]# mkdir -p /etc/icinga2/zones.d/global-templates
+    [root@icinga2-master1.localdomain /]# vim /etc/icinga2/zones.d/global-templates/commands.conf
+
+    object CheckCommand "my-check" {
+      //...
+    }
+
+Now validate the configuration and restart Icinga 2.
+
+    [root@icinga2-master1.localdomain /]# icinga2 daemon -C
+    [root@icinga2-master1.localdomain /]# systemctl restart icinga2
+
+In case you have additional apply rules in place and have trouble with duplicated objects please
+adopt and merge them accordingly.
+
+If you are eager to start fresh instead you might take a look into the
+[Icinga Director](https://github.com/icinga/icingaweb2-module-director).
+
 ## <a id="distributed-monitoring-scenarios"></a> Scenarios
 
 The following examples should give you an idea on how to build your own
index dd956bb9b234682dde5d796d270591e33310565b..3721d2436879648672a77ea297e65a3361fbd10b 100644 (file)
@@ -321,7 +321,7 @@ int Main(void)
 
                        if ((!command || vm.count("help")) && !vm.count("version")) {
                                std::cout << "Usage:" << std::endl
-                                   << "  " << argv[0] << " ";
+                                   << "  " << Utility::BaseName(argv[0]) << " ";
 
                                if (cmdname.IsEmpty())
                                        std::cout << "<command>";
index 74d129c77831f5dd867a51619c41e310096046c1..cf215465fff9df63b00bc6ce67744fac9bbe191c 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "cli/clicommand.hpp"
 #include "base/logger.hpp"
+#include "base/console.hpp"
 #include "base/type.hpp"
 #include "base/serializer.hpp"
 #include <boost/algorithm/string/join.hpp>
@@ -105,6 +106,11 @@ bool CLICommand::IsHidden(void) const
        return false;
 }
 
+bool CLICommand::IsDeprecated(void) const
+{
+       return false;
+}
+
 boost::mutex& CLICommand::GetRegistryMutex(void)
 {
        static boost::mutex mtx;
@@ -217,6 +223,12 @@ found_command:
        adesc.add(visibleDesc);
        adesc.add(hiddenDesc);
 
+       if (command && command->IsDeprecated()) {
+               std::cerr << ConsoleColorTag(Console_ForegroundRed | Console_Bold)
+                   << "Warning: CLI command '" << cmdname << "' is DEPRECATED! Please read the Changelog."
+                   << ConsoleColorTag(Console_Normal) << std::endl << std::endl;
+       }
+
        po::store(po::command_line_parser(argc - arg_end, argv + arg_end).options(adesc).positional(positionalDesc).run(), vm);
        po::notify(vm);
 
@@ -305,8 +317,11 @@ void CLICommand::ShowCommands(int argc, char **argv, po::options_description *vi
                                if (cname.Find(aword) == 0)
                                        std::cout << cname << "\n";
                        }
-               } else
-                       std::cout << "  * " << boost::algorithm::join(vname, " ") << " (" << kv.second->GetShortDescription() << ")" << std::endl;
+               } else {
+                       std::cout << "  * " << boost::algorithm::join(vname, " ")
+                           << " (" << kv.second->GetShortDescription() << ")"
+                           << (kv.second->IsDeprecated() ? " (DEPRECATED)" : "") << std::endl;
+               }
        }
 
        if (!autocomplete)
index d1adad28ff9f98d37eabf8e6c08299030371b62c..2305aac6884a08c3d4485bea3f94d9054d0d8ae9 100644 (file)
@@ -59,6 +59,7 @@ public:
        virtual int GetMinArguments(void) const;
        virtual int GetMaxArguments(void) const;
        virtual bool IsHidden(void) const;
+       virtual bool IsDeprecated(void) const;
        virtual void InitParameters(boost::program_options::options_description& visibleDesc,
            boost::program_options::options_description& hiddenDesc) const;
        virtual ImpersonationLevel GetImpersonationLevel(void) const;
index cfcc330e86b5631fb585dde89cb4696654a84978..6f0bae5133de37c2627bd8323eb6d35159a8b2c0 100644 (file)
@@ -47,6 +47,11 @@ int NodeAddCommand::GetMinArguments(void) const
        return 1;
 }
 
+bool NodeAddCommand::IsDeprecated(void) const
+{
+       return true;
+}
+
 /**
  * The entry point for the "node add" CLI command.
  *
index bfa32f6414427e5bbeb2573f8add46ac063204a6..ad2958096bd666c831412fc34fd796305701e440 100644 (file)
@@ -37,6 +37,7 @@ public:
 
        virtual String GetDescription(void) const override;
        virtual String GetShortDescription(void) const override;
+       virtual bool IsDeprecated(void) const override;
        virtual int GetMinArguments(void) const override;
        virtual int Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const override;
 };
index ec43ba819f2fa5ef9fdd18bf510202ed8fe872c9..01ceefd677e443ac3612eb08789e6df038652813 100644 (file)
@@ -84,6 +84,11 @@ String BlackAndWhitelistCommand::GetShortDescription(void) const
        return description;
 }
 
+bool BlackAndWhitelistCommand::IsDeprecated(void) const
+{
+       return true;
+}
+
 void BlackAndWhitelistCommand::InitParameters(boost::program_options::options_description& visibleDesc,
     boost::program_options::options_description& hiddenDesc) const
 {
index cb34f7dbd3402e5ac2a5ccd1c4d400ddad4efecb..5c883023ee58040103817c2c38e4483497310840 100644 (file)
@@ -47,6 +47,7 @@ public:
 
        virtual String GetDescription(void) const override;
        virtual String GetShortDescription(void) const override;
+       virtual bool IsDeprecated(void) const override;
        virtual void InitParameters(boost::program_options::options_description& visibleDesc,
            boost::program_options::options_description& hiddenDesc) const override;
        virtual int Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const override;
index 3074b25231cf09636776c5700be918d131df2c42..6154116c7902d0db16472bee8fe3fe2fb2228ad8 100644 (file)
@@ -43,6 +43,11 @@ String NodeListCommand::GetShortDescription(void) const
        return "lists all nodes";
 }
 
+bool NodeListCommand::IsDeprecated(void) const
+{
+       return true;
+}
+
 void NodeListCommand::InitParameters(boost::program_options::options_description& visibleDesc,
     boost::program_options::options_description& hiddenDesc) const
 {
index 13026e7f15d05e7223f05bef7c7e656722cb4fd4..33e732b86e9f6df0d40ccdc1058b2e5cdd124c82 100644 (file)
@@ -37,6 +37,7 @@ public:
 
        virtual String GetDescription(void) const override;
        virtual String GetShortDescription(void) const override;
+       virtual bool IsDeprecated(void) const override;
        virtual void InitParameters(boost::program_options::options_description& visibleDesc,
            boost::program_options::options_description& hiddenDesc) const override;
        virtual int Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const override;
index cbdcc37b12daae349334813259844fcb7f0e78de..fa084c29308097fb54d9f4e32e37ffc7ba90dd71 100644 (file)
@@ -57,6 +57,11 @@ int NodeRemoveCommand::GetMaxArguments(void) const
        return -1;
 }
 
+bool NodeRemoveCommand::IsDeprecated(void) const
+{
+       return true;
+}
+
 /**
  * The entry point for the "node remove" CLI command.
  *
index c6a4f85ee5c2e2da6d48565239093f0d6a0a88a7..4371d7ef046cda082e45719aa01a7d31f1443091 100644 (file)
@@ -37,6 +37,7 @@ public:
 
        virtual String GetDescription(void) const override;
        virtual String GetShortDescription(void) const override;
+       virtual bool IsDeprecated(void) const override;
        virtual int GetMinArguments(void) const override;
        virtual int GetMaxArguments(void) const override;
        virtual std::vector<String> GetPositionalSuggestions(const String& word) const override;
index d786f8bed18a46159692eb5432d9730c316684c1..321931e704f2c392cc66752e935256e539eaf779 100644 (file)
@@ -56,6 +56,11 @@ int NodeSetCommand::GetMinArguments(void) const
        return 1;
 }
 
+bool NodeSetCommand::IsDeprecated(void) const
+{
+       return true;
+}
+
 /**
  * The entry point for the "node set" CLI command.
  *
index 4e31fc9ad012f78670b2c059bbeb609d53feda69..2e493b717cdaa99f0739dae1042f19b248558e9b 100644 (file)
@@ -38,6 +38,7 @@ public:
        virtual String GetDescription(void) const override;
        virtual String GetShortDescription(void) const override;
        virtual int GetMinArguments(void) const override;
+       virtual bool IsDeprecated(void) const override;
        virtual void InitParameters(boost::program_options::options_description& visibleDesc,
            boost::program_options::options_description& hiddenDesc) const override;
        virtual int Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const override;
index c9ba63772aa7033735cdcfd2c49d44945f88740c..8e7444fa575809961b26dc8ccbb652b6b159f5a0 100644 (file)
@@ -53,6 +53,11 @@ ImpersonationLevel NodeUpdateConfigCommand::GetImpersonationLevel(void) const
        return ImpersonateRoot;
 }
 
+bool NodeUpdateConfigCommand::IsDeprecated(void) const
+{
+       return true;
+}
+
 /**
  * The entry point for the "node update-config" CLI command.
  *
index 9dfcb0f55a891f8fcd11764ddad9567106dc7dfc..03af2cafd7baaf73083ce4db25f6bb526cdb373e 100644 (file)
@@ -37,6 +37,7 @@ public:
 
        virtual String GetDescription(void) const override;
        virtual String GetShortDescription(void) const override;
+       virtual bool IsDeprecated(void) const override;
        virtual int Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const override;
        virtual ImpersonationLevel GetImpersonationLevel(void) const override;
 };
index c0ae7baffc24c4c88098340c662a1ed8557e1968..439b170fb1c1d70d2409e99e0e765a72aac99eaf 100644 (file)
@@ -45,6 +45,11 @@ ImpersonationLevel RepositoryClearChangesCommand::GetImpersonationLevel(void) co
        return ImpersonateRoot;
 }
 
+bool RepositoryClearChangesCommand::IsDeprecated(void) const
+{
+       return true;
+}
+
 /**
  * The entry point for the "repository clear-changes" CLI command.
  *
index ee3f480029de847e143488fd5d4203bd75c2c7b9..956927aee3fe3115cb53f853b0566683ab4df583 100644 (file)
@@ -40,6 +40,7 @@ public:
 
        virtual String GetDescription(void) const override;
        virtual String GetShortDescription(void) const override;
+       virtual bool IsDeprecated(void) const override;
        virtual ImpersonationLevel GetImpersonationLevel(void) const override;
        virtual int Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const override;
 };
index 57e6f750ded7e57da50b022ad7c9f020fb75ab44..b796222c2ac6b303aa712abcaf9ce1eb224ba1f5 100644 (file)
@@ -52,6 +52,11 @@ ImpersonationLevel RepositoryCommitCommand::GetImpersonationLevel(void) const
        return ImpersonateRoot;
 }
 
+bool RepositoryCommitCommand::IsDeprecated(void) const
+{
+       return true;
+}
+
 /**
  * The entry point for the "repository commit" CLI command.
  *
index 611d2e139ae102d7c3abd16c65f49dac80ef2450..5141d6d3964f22e8a0eea7a29fa396e3e0f7820b 100644 (file)
@@ -40,6 +40,7 @@ public:
 
        virtual String GetDescription(void) const override;
        virtual String GetShortDescription(void) const override;
+       virtual bool IsDeprecated(void) const override;
        virtual void InitParameters(boost::program_options::options_description& visibleDesc,
            boost::program_options::options_description& hiddenDesc) const override;
        virtual ImpersonationLevel GetImpersonationLevel(void) const override;
index e2768d643779c471e37018ac88a5844db26d813c..db0c18e313c8ce947061501728c3fb6dd25b33b2 100644 (file)
@@ -95,6 +95,11 @@ String RepositoryObjectCommand::GetShortDescription(void) const
        return description;
 }
 
+bool RepositoryObjectCommand::IsDeprecated(void) const
+{
+       return true;
+}
+
 void RepositoryObjectCommand::InitParameters(boost::program_options::options_description& visibleDesc,
     boost::program_options::options_description& hiddenDesc) const
 {
index 4bad8362335ec18c7d5e569559f4877a2ff305d5..ba596d5f04be11fcf5da4af03f5e3c7b9bd2072a 100644 (file)
@@ -49,6 +49,7 @@ public:
        virtual String GetDescription(void) const override;
        virtual String GetShortDescription(void) const override;
        virtual int GetMaxArguments(void) const override;
+       virtual bool IsDeprecated(void) const override;
        virtual void InitParameters(boost::program_options::options_description& visibleDesc,
            boost::program_options::options_description& hiddenDesc) const override;
        virtual ImpersonationLevel GetImpersonationLevel(void) const override;