]> granicus.if.org Git - icinga2/blobdiff - doc/11-cli-commands.md
ITL: Fix missing double quote in ssl-cert CheckCommand
[icinga2] / doc / 11-cli-commands.md
index 9b3301f998dbd48206d505e093c9dca498cf6b10..1068be4f6eda63cbc805572c28b3d4d7c429f66a 100644 (file)
@@ -3,7 +3,7 @@
 Icinga 2 comes with a number of CLI commands which support bash autocompletion.
 
 These CLI commands will allow you to use certain functionality
-provided by and around the Icinga 2 daemon.
+provided by and around Icinga 2.
 
 Each CLI command provides its own help and usage information, so please
 make sure to always run them with the `--help` parameter.
@@ -84,13 +84,13 @@ 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. Try it yourself.
+While `--config` suggests and auto-completes files and directories on disk,
+`feature enable` only suggests disabled features.
 
 RPM and Debian packages install the bash completion files into
 `/etc/bash_completion.d/icinga2`.
 
-You will need to install the `bash-completion` package if not already installed.
+You need to install the `bash-completion` package if not already installed.
 
 RHEL/CentOS/Fedora:
 
@@ -117,11 +117,13 @@ into your current session and test it:
 
 By default the `icinga2` binary loads the `icinga` library. A different application type
 can be specified with the `--app` command-line option.
+Note: This is not needed by the average Icinga user, only developers.
 
 ### Libraries
 
 Instead of loading libraries using the [`library` config directive](17-language-reference.md#library)
 you can also use the `--library` command-line option.
+Note: This is not needed by the average Icinga user, only developers.
 
 ### Constants
 
@@ -135,8 +137,8 @@ brackets like this:
 
     include <test.conf>
 
-This would cause Icinga 2 to search its include path for the configuration file
-`test.conf`. By default the installation path for the Icinga Template Library
+This causes Icinga 2 to search its include path for the configuration file
+`test.conf`. By default the installation path for the [Icinga Template Library](10-icinga-template-library.md#icinga-template-library)
 is the only search directory.
 
 Using the `--include` command-line option additional search directories can be
@@ -145,11 +147,11 @@ added.
 
 ## <a id="cli-command-console"></a> CLI command: Console
 
-The CLI command `console` can be used to evaluate Icinga 2 config expressions, e.g. to test
-[functions](17-language-reference.md#functions).
+The CLI command `console` can be used to debug and evaluate Icinga 2 config expressions,
+e.g. to test [functions](17-language-reference.md#functions) in your local sandbox.
 
     $ icinga2 console
-    Icinga 2 (version: v2.4.0)
+    Icinga 2 (version: v2.6.0)
     <1> => function test(name) {
     <1> ..   log("Hello " + name)
     <1> .. }
@@ -159,6 +161,7 @@ The CLI command `console` can be used to evaluate Icinga 2 config expressions, e
     null
     <3> =>
 
+Further usage examples can be found in the [library reference](18-library-reference.md#library-reference) chapter.
 
 On operating systems without the `libedit` library installed there is no
 support for line-editing or a command history. However you can
@@ -166,18 +169,23 @@ use the `rlwrap` program if you require those features:
 
     $ rlwrap icinga2 console
 
-The `console` can be used to connect to a running Icinga 2 instance using
+The debug console can be used to connect to a running Icinga 2 instance using
 the [REST API](12-icinga2-api.md#icinga2-api). [API permissions](12-icinga2-api.md#icinga2-api-permissions)
 are required for executing config expressions and auto-completion.
 
 > **Note**
-> The console does not currently support SSL certificate verification.
+>
+> The debug console does not currently support SSL certificate verification.
+>
+> Runtime modifications are not validated and might cause the Icinga 2
+> daemon to crash or behave in an unexpected way. Use these runtime changes
+> at your own risk and rather *inspect and debug objects read-only*.
 
 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:
+user credentials the debug console supports two environment variables:
 
   Environment variable | Description
   ---------------------|-------------
@@ -248,7 +256,7 @@ Here's an example that retrieves the command that was used by Icinga to check th
 ## <a id="cli-command-daemon"></a> CLI command: Daemon
 
 The CLI command `daemon` provides the functionality to start/stop Icinga 2.
-Furthermore it provides the [configuration validation](11-cli-commands.md#config-validation).
+Furthermore it allows to run the [configuration validation](11-cli-commands.md#config-validation).
 
     # icinga2 daemon --help
     icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.0)
@@ -286,7 +294,7 @@ Furthermore it provides the [configuration validation](11-cli-commands.md#config
 
 ### Config Files
 
-Using the `--config` option you can specify one or more configuration files.
+You can specify one or more configuration files with the `--config` option.
 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
@@ -295,7 +303,7 @@ Icinga 2 automatically falls back to using the configuration file
 
 ### Config Validation
 
-The `--validate` option can be used to check if your configuration files
+The `--validate` option can be used to check if 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.
 
@@ -374,9 +382,15 @@ nodes in a [distributed monitoring](6-distributed-monitoring.md#distributed-moni
 ## <a id="cli-command-object"></a> CLI command: Object
 
 The `object` CLI command can be used to list all configuration objects and their
-attributes. The command also shows where each of the attributes was modified.
+attributes. The command also shows where each of the attributes was modified and as such
+provides debug information for further configuration problem analysis.
 That way you can also identify which objects have been created from your [apply rules](17-language-reference.md#apply).
 
+Runtime modifications via the [REST API](12-icinga2-api.md#icinga2-api-config-objects)
+are not immediately updated. Furthermore there is a known issue with
+[group assign expressions](17-language-reference.md#group-assign) which are not reflected in the host object output.
+You need to restart Icinga 2 in order to update the `icinga2.debug` cache file.
+
 More information can be found in the [troubleshooting](15-troubleshooting.md#list-configuration-objects) section.
 
     # icinga2 object --help