]> granicus.if.org Git - icinga2/blobdiff - doc/11-cli-commands.md
Merge pull request #7445 from Icinga/bugfix/ddos-reconnect-7444
[icinga2] / doc / 11-cli-commands.md
index 4cbfb86598cb0f0ebde1387ec825a3e6d5c832e0..7eac4247c344298a7b5995354f46d7ca507d5691 100644 (file)
@@ -21,6 +21,8 @@ Usage:
 Supported commands:
   * api setup (setup for API)
   * ca list (lists all certificate signing requests)
+  * ca restore (restores a removed certificate request)
+  * ca remove (removes an outstanding certificate request)  
   * ca sign (signs an outstanding certificate request)
   * console (Icinga debug console)
   * daemon (starts Icinga 2)
@@ -36,7 +38,6 @@ Supported commands:
   * pki save-cert (saves another Icinga 2 instance's certificate)
   * pki sign-csr (signs a CSR)
   * pki ticket (generates a ticket)
-  * troubleshoot (collect information for troubleshooting)
   * variable get (gets a variable)
   * variable list (lists all variables)
 
@@ -186,6 +187,8 @@ Usage:
 Supported commands:
   * ca list (lists all certificate signing requests)
   * ca sign (signs an outstanding certificate request)
+  * ca restore (restores a removed certificate request)
+  * ca remove (removes an outstanding certificate request)
 
 Global options:
   -h [ --help ]             show this help message
@@ -233,6 +236,7 @@ Command options:
   --all                     List all certificate signing requests, including
                             signed. Note: Old requests are automatically
                             cleaned by Icinga after 1 week.
+  --removed                 List all removed CSRs (for use with 'ca restore')
   --json                    encode output as JSON
 
 Report bugs at <https://github.com/Icinga/icinga2>
@@ -338,12 +342,12 @@ Icinga 2 (version: v2.11.0)
 Once connected you can inspect variables and execute other expressions by entering them at the prompt:
 
 ```
-<1> => var h = get_host("icinga2-client1.localdomain")
+<1> => var h = get_host("icinga2-agent1.localdomain")
 null
 <2> => h.last_check_result
 {
         active = true
-        check_source = "icinga2-client1.localdomain"
+        check_source = "icinga2-agent1.localdomain"
         command = [ "/usr/local/sbin/check_ping", "-H", "127.0.0.1", "-c", "5000,100%", "-w", "3000,80%" ]
         execution_end = 1446653527.174983
         execution_start = 1446653523.152673
@@ -378,10 +382,10 @@ 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 `icinga2-client1.localdomain` host:
+Here's an example that retrieves the command that was used by Icinga to check the `icinga2-agent1.localdomain` host:
 
 ```
-$ ICINGA2_API_PASSWORD=icinga icinga2 console --connect 'https://root@localhost:5665/' --eval 'get_host("icinga2-client1.localdomain").last_check_result.command' | python -m json.tool
+$ ICINGA2_API_PASSWORD=icinga icinga2 console --connect 'https://root@localhost:5665/' --eval 'get_host("icinga2-agent1.localdomain").last_check_result.command' | python -m json.tool
 [
     "/usr/local/sbin/check_ping",
     "-H",
@@ -597,50 +601,6 @@ Report bugs at <https://github.com/Icinga/icinga2>
 Icinga home page: <https://icinga.com/>
 ```
 
-## CLI command: Troubleshoot <a id="cli-command-troubleshoot"></a>
-
-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.
-
-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.11.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 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-objects         Print the whole objectfile (like `object list`)
-  --include-vars            Print all Variables (like `variable list`)
-
-Report bugs at <https://github.com/Icinga/icinga2>
-Icinga home page: <https://icinga.com/>
-```
-
 ## CLI command: Variable <a id="cli-command-variable"></a>
 
 Lists all configured variables (constants) in a similar fashion like [object list](11-cli-commands.md#cli-command-object).