]> granicus.if.org Git - icinga2/blob - doc/11-cli-commands.md
Docs: Fix broken format for notes/tips in CLI command chapter
[icinga2] / doc / 11-cli-commands.md
1 # <a id="cli-commands"></a> Icinga 2 CLI Commands
2
3 Icinga 2 comes with a number of CLI commands which support bash autocompletion.
4
5 These CLI commands will allow you to use certain functionality
6 provided by and around Icinga 2.
7
8 Each CLI command provides its own help and usage information, so please
9 make sure to always run them with the `--help` parameter.
10
11 Run `icinga2` without any arguments to get a list of all available global
12 options.
13
14     # icinga2
15     icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.0)
16     
17     Usage:
18       icinga2 <command> [<arguments>]
19     
20     Supported commands:
21       * api setup (setup for api)
22       * console (Icinga console)
23       * daemon (starts Icinga 2)
24       * feature disable (disables specified feature)
25       * feature enable (enables specified feature)
26       * feature list (lists all enabled features)
27       * node add (add node) (DEPRECATED)
28       * node blacklist add (adds a new blacklist filter) (DEPRECATED)
29       * node blacklist list (lists all blacklist filters) (DEPRECATED)
30       * node blacklist remove (removes a blacklist filter) (DEPRECATED)
31       * node list (lists all nodes) (DEPRECATED)
32       * node remove (removes node) (DEPRECATED)
33       * node set (set node attributes) (DEPRECATED)
34       * node setup (set up node)
35       * node update-config (update node config) (DEPRECATED)
36       * node whitelist add (adds a new whitelist filter) (DEPRECATED)
37       * node whitelist list (lists all whitelist filters) (DEPRECATED)
38       * node whitelist remove (removes a whitelist filter) (DEPRECATED)
39       * node wizard (wizard for node setup)
40       * object list (lists all objects)
41       * pki new-ca (sets up a new CA)
42       * pki new-cert (creates a new CSR)
43       * pki request (requests a certificate)
44       * pki save-cert (saves another Icinga 2 instance's certificate)
45       * pki sign-csr (signs a CSR)
46       * pki ticket (generates a ticket)
47       * repository clear-changes (clear uncommitted repository changes) (DEPRECATED)
48       * repository commit (commit repository changes) (DEPRECATED)
49       * repository endpoint add (adds a new Endpoint object) (DEPRECATED)
50       * repository endpoint list (lists all Endpoint objects) (DEPRECATED)
51       * repository endpoint remove (removes a Endpoint object) (DEPRECATED)
52       * repository host add (adds a new Host object) (DEPRECATED)
53       * repository host list (lists all Host objects) (DEPRECATED)
54       * repository host remove (removes a Host object) (DEPRECATED)
55       * repository service add (adds a new Service object) (DEPRECATED)
56       * repository service list (lists all Service objects) (DEPRECATED)
57       * repository service remove (removes a Service object) (DEPRECATED)
58       * repository zone add (adds a new Zone object) (DEPRECATED)
59       * repository zone list (lists all Zone objects) (DEPRECATED)
60       * repository zone remove (removes a Zone object) (DEPRECATED)
61       * troubleshoot (collect information for troubleshooting)
62       * variable get (gets a variable)
63       * variable list (lists all variables)
64     
65     Global options:
66       -h [ --help ]             show this help message
67       -V [ --version ]          show version information
68       --color                   use VT100 color codes even when stdout is not a
69                                 terminal
70       -D [ --define ] arg       define a constant
71       -a [ --app ] arg          application library name (default: icinga)
72       -l [ --library ] arg      load a library
73       -I [ --include ] arg      add include search directory
74       -x [ --log-level ] arg    specify the log level for the console log.
75                                 The valid value is either debug, notice,
76                                 information (default), warning, or critical
77       -X [ --script-debugger ]  whether to enable the script debugger
78     
79     Report bugs at <https://github.com/Icinga/icinga2>
80     Icinga home page: <https://www.icinga.com/>
81
82
83 ## <a id="cli-commands-autocompletion"></a> Icinga 2 CLI Bash Autocompletion
84
85 Bash Auto-Completion (pressing `<TAB>`) is provided only for the corresponding context.
86
87 While `--config` suggests and auto-completes files and directories on disk,
88 `feature enable` only suggests disabled features.
89
90 RPM and Debian packages install the bash completion files into
91 `/etc/bash_completion.d/icinga2`.
92
93 You need to install the `bash-completion` package if not already installed.
94
95 RHEL/CentOS/Fedora:
96
97     # yum install bash-completion
98
99 SUSE:
100
101     # zypper install bash-completion
102
103 Debian/Ubuntu:
104
105     # apt-get install bash-completion
106
107 Ensure that the `bash-completion.d` directory is added to your shell
108 environment. You can manually source the icinga2 bash-completion file
109 into your current session and test it:
110
111     # source /etc/bash-completion.d/icinga2
112
113
114 ## <a id="cli-commands-global-options"></a> Icinga 2 CLI Global Options
115
116 ### Application Type
117
118 By default the `icinga2` binary loads the `icinga` library. A different application type
119 can be specified with the `--app` command-line option.
120 Note: This is not needed by the average Icinga user, only developers.
121
122 ### Libraries
123
124 Instead of loading libraries using the [`library` config directive](17-language-reference.md#library)
125 you can also use the `--library` command-line option.
126 Note: This is not needed by the average Icinga user, only developers.
127
128 ### Constants
129
130 [Global constants](17-language-reference.md#constants) can be set using the `--define` command-line option.
131
132 ### <a id="config-include-path"></a> Config Include Path
133
134 When including files you can specify that the include search path should be
135 checked. You can do this by putting your configuration file name in angle
136 brackets like this:
137
138     include <test.conf>
139
140 This causes Icinga 2 to search its include path for the configuration file
141 `test.conf`. By default the installation path for the [Icinga Template Library](10-icinga-template-library.md#icinga-template-library)
142 is the only search directory.
143
144 Using the `--include` command-line option additional search directories can be
145 added.
146
147
148 ## <a id="cli-command-console"></a> CLI command: Console
149
150 The CLI command `console` can be used to debug and evaluate Icinga 2 config expressions,
151 e.g. to test [functions](17-language-reference.md#functions) in your local sandbox.
152
153     $ icinga2 console
154     Icinga 2 (version: v2.6.0)
155     <1> => function test(name) {
156     <1> ..   log("Hello " + name)
157     <1> .. }
158     null
159     <2> => test("World")
160     information/config: Hello World
161     null
162     <3> =>
163
164 Further usage examples can be found in the [library reference](18-library-reference.md#library-reference) chapter.
165
166 On operating systems without the `libedit` library installed there is no
167 support for line-editing or a command history. However you can
168 use the `rlwrap` program if you require those features:
169
170     $ rlwrap icinga2 console
171
172 The debug console can be used to connect to a running Icinga 2 instance using
173 the [REST API](12-icinga2-api.md#icinga2-api). [API permissions](12-icinga2-api.md#icinga2-api-permissions)
174 are required for executing config expressions and auto-completion.
175
176 > **Note**
177 >
178 > The debug console does not currently support SSL certificate verification.
179 >
180 > Runtime modifications are not validated and might cause the Icinga 2
181 > daemon to crash or behave in an unexpected way. Use these runtime changes
182 > at your own risk and rather *inspect and debug objects read-only*.
183
184 You can specify the API URL using the `--connect` parameter.
185
186 Although the password can be specified there process arguments on UNIX platforms are
187 usually visible to other users (e.g. through `ps`). In order to securely specify the
188 user credentials the debug console supports two environment variables:
189
190   Environment variable | Description
191   ---------------------|-------------
192   ICINGA2_API_USERNAME | The API username.
193   ICINGA2_API_PASSWORD | The API password.
194
195 Here's an example:
196
197     $ ICINGA2_API_PASSWORD=icinga icinga2 console --connect 'https://root@localhost:5665/'
198     Icinga 2 (version: v2.6.0)
199     <1> =>
200
201 Once connected you can inspect variables and execute other expressions by entering them at the prompt:
202
203     <1> => var h = get_host("example.localdomain")
204     null
205     <2> => h.last_check_result
206     {
207             active = true
208             check_source = "example.localdomain"
209             command = [ "/usr/local/sbin/check_ping", "-H", "127.0.0.1", "-c", "5000,100%", "-w", "3000,80%" ]
210             execution_end = 1446653527.174983
211             execution_start = 1446653523.152673
212             exit_status = 0.000000
213             output = "PING OK - Packet loss = 0%, RTA = 0.11 ms"
214             performance_data = [ "rta=0.114000ms;3000.000000;5000.000000;0.000000", "pl=0%;80;100;0" ]
215             schedule_end = 1446653527.175133
216             schedule_start = 1446653583.150000
217             state = 0.000000
218             type = "CheckResult"
219             vars_after = {
220                     attempt = 1.000000
221                     reachable = true
222                     state = 0.000000
223                     state_type = 1.000000
224             }
225             vars_before = {
226                     attempt = 1.000000
227                     reachable = true
228                     state = 0.000000
229                     state_type = 1.000000
230             }
231     }
232     <3> =>
233
234
235 You can use the `--eval` parameter to evaluate a single expression in batch mode.
236 Using the `--file` option you can specify a file which should be evaluated.
237 The output format for batch mode is JSON.
238
239 The `--syntax-only` option can be used in combination with `--eval` or `--file`
240 to check a script for syntax errors. In this mode the script is parsed to identify
241 syntax errors but not evaluated.
242
243 Here's an example that retrieves the command that was used by Icinga to check the `example.localdomain` host:
244
245     $ ICINGA2_API_PASSWORD=icinga icinga2 console --connect 'https://root@localhost:5665/' --eval 'get_host("example.localdomain").last_check_result.command' | python -m json.tool
246     [
247         "/usr/local/sbin/check_ping",
248         "-H",
249         "127.0.0.1",
250         "-c",
251         "5000,100%",
252         "-w",
253         "3000,80%"
254     ]
255
256 ## <a id="cli-command-daemon"></a> CLI command: Daemon
257
258 The CLI command `daemon` provides the functionality to start/stop Icinga 2.
259 Furthermore it allows to run the [configuration validation](11-cli-commands.md#config-validation).
260
261     # icinga2 daemon --help
262     icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.0)
263     
264     Usage:
265       icinga2 daemon [<arguments>]
266     
267     Starts Icinga 2.
268     
269     Global options:
270       -h [ --help ]             show this help message
271       -V [ --version ]          show version information
272       --color                   use VT100 color codes even when stdout is not a
273                                 terminal
274       -D [ --define ] arg       define a constant
275       -a [ --app ] arg          application library name (default: icinga)
276       -l [ --library ] arg      load a library
277       -I [ --include ] arg      add include search directory
278       -x [ --log-level ] arg    specify the log level for the console log.
279                                 The valid value is either debug, notice,
280                                 information (default), warning, or critical
281       -X [ --script-debugger ]  whether to enable the script debugger
282     
283     Command options:
284       -c [ --config ] arg       parse a configuration file
285       -z [ --no-config ]        start without a configuration file
286       -C [ --validate ]         exit after validating the configuration
287       -e [ --errorlog ] arg     log fatal errors to the specified log file (only
288                                 works in combination with --daemonize)
289       -d [ --daemonize ]        detach from the controlling terminal
290     
291     Report bugs at <https://github.com/Icinga/icinga2>
292     Icinga home page: <https://www.icinga.com/>
293
294
295 ### Config Files
296
297 You can specify one or more configuration files with the `--config` option.
298 Configuration files are processed in the order they're specified on the command-line.
299
300 When no configuration file is specified and the `--no-config` is not used
301 Icinga 2 automatically falls back to using the configuration file
302 `SysconfDir + "/icinga2/icinga2.conf"` (where SysconfDir is usually `/etc`).
303
304 ### Config Validation
305
306 The `--validate` option can be used to check if configuration files
307 contain errors. If any errors are found, the exit status is 1, otherwise 0
308 is returned. More details in the [configuration validation](11-cli-commands.md#config-validation) chapter.
309
310 ## <a id="cli-command-feature"></a> CLI command: Feature
311
312 The `feature enable` and `feature disable` commands can be used to enable and disable features:
313
314     # icinga2 feature disable <tab>
315     --app              --define           --include          --log-level        --version          checker            graphite           mainlog
316     --color            --help             --library          --script-debugger  api                command            ido-mysql          notification
317     
318     # icinga2 feature enable <tab>
319     --app              --define           --include          --log-level        --version          debuglog           ido-pgsql          livestatus         perfdata           syslog
320     --color            --help             --library          --script-debugger  compatlog          gelf               influxdb           opentsdb           statusdata
321
322 The `feature list` command shows which features are currently enabled:
323
324     # icinga2 feature list
325     Disabled features: compatlog debuglog gelf ido-pgsql influxdb livestatus opentsdb perfdata statusdata syslog
326     Enabled features: api checker command graphite ido-mysql mainlog notification
327
328
329 ## <a id="cli-command-node"></a> CLI command: Node
330
331 > **Warning**
332 >
333 > This CLI command and its sub commands except for `setup` and `wizard`
334 > have been deprecated in v2.6 and will be
335 > removed in future releases.
336 >
337 > Make sure to follow the release announcements on the [Icinga website](https://www.icinga.com).
338
339 Provides the functionality to install and manage master and client
340 nodes in a [distributed monitoring](6-distributed-monitoring.md#distributed-monitoring) scenario.
341
342     # icinga2 node --help
343     icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.0)
344     
345     Usage:
346       icinga2 <command> [<arguments>]
347     
348     Supported commands:
349       * node add (add node) (DEPRECATED)
350       * node blacklist add (adds a new blacklist filter) (DEPRECATED)
351       * node blacklist list (lists all blacklist filters) (DEPRECATED)
352       * node blacklist remove (removes a blacklist filter) (DEPRECATED)
353       * node list (lists all nodes) (DEPRECATED)
354       * node remove (removes node) (DEPRECATED)
355       * node set (set node attributes) (DEPRECATED)
356       * node setup (set up node)
357       * node update-config (update node config) (DEPRECATED)
358       * node whitelist add (adds a new whitelist filter) (DEPRECATED)
359       * node whitelist list (lists all whitelist filters) (DEPRECATED)
360       * node whitelist remove (removes a whitelist filter) (DEPRECATED)
361       * node wizard (wizard for node setup)
362     
363     Global options:
364       -h [ --help ]             show this help message
365       -V [ --version ]          show version information
366       --color                   use VT100 color codes even when stdout is not a
367                                 terminal
368       -D [ --define ] arg       define a constant
369       -a [ --app ] arg          application library name (default: icinga)
370       -l [ --library ] arg      load a library
371       -I [ --include ] arg      add include search directory
372       -x [ --log-level ] arg    specify the log level for the console log.
373                                 The valid value is either debug, notice,
374                                 information (default), warning, or critical
375       -X [ --script-debugger ]  whether to enable the script debugger
376     
377     Report bugs at <https://github.com/Icinga/icinga2>
378     Icinga home page: <https://www.icinga.com/>
379
380
381
382 ## <a id="cli-command-object"></a> CLI command: Object
383
384 The `object` CLI command can be used to list all configuration objects and their
385 attributes. The command also shows where each of the attributes was modified and as such
386 provides debug information for further configuration problem analysis.
387 That way you can also identify which objects have been created from your [apply rules](17-language-reference.md#apply).
388
389 Runtime modifications via the [REST API](12-icinga2-api.md#icinga2-api-config-objects)
390 are not immediately updated. Furthermore there is a known issue with
391 [group assign expressions](17-language-reference.md#group-assign) which are not reflected in the host object output.
392 You need to restart Icinga 2 in order to update the `icinga2.debug` cache file.
393
394 More information can be found in the [troubleshooting](15-troubleshooting.md#list-configuration-objects) section.
395
396     # icinga2 object --help
397     icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.0)
398     
399     Usage:
400       icinga2 <command> [<arguments>]
401     
402     Supported commands:
403       * object list (lists all objects)
404     
405     Global options:
406       -h [ --help ]             show this help message
407       -V [ --version ]          show version information
408       --color                   use VT100 color codes even when stdout is not a
409                                 terminal
410       -D [ --define ] arg       define a constant
411       -a [ --app ] arg          application library name (default: icinga)
412       -l [ --library ] arg      load a library
413       -I [ --include ] arg      add include search directory
414       -x [ --log-level ] arg    specify the log level for the console log.
415                                 The valid value is either debug, notice,
416                                 information (default), warning, or critical
417       -X [ --script-debugger ]  whether to enable the script debugger
418     
419     Report bugs at <https://github.com/Icinga/icinga2>
420     Icinga home page: <https://www.icinga.com/>
421
422 ## <a id="cli-command-pki"></a> CLI command: Pki
423
424 Provides the CLI commands to
425
426 * generate a new certificate authority (CA)
427 * generate a new CSR or self-signed certificate
428 * sign a CSR and return a certificate
429 * save a master certificate manually
430 * request a signed certificate from the master
431 * generate a new ticket for the client setup
432
433 This functionality is used by the [node setup/wizard](11-cli-commands.md#cli-command-node) CLI commands.
434 You will need them in the [distributed monitoring chapter](6-distributed-monitoring.md#distributed-monitoring).
435
436     # icinga2 pki --help
437     icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.0)
438     
439     Usage:
440       icinga2 <command> [<arguments>]
441     
442     Supported commands:
443       * pki new-ca (sets up a new CA)
444       * pki new-cert (creates a new CSR)
445       * pki request (requests a certificate)
446       * pki save-cert (saves another Icinga 2 instance's certificate)
447       * pki sign-csr (signs a CSR)
448       * pki ticket (generates a ticket)
449     
450     Global options:
451       -h [ --help ]             show this help message
452       -V [ --version ]          show version information
453       --color                   use VT100 color codes even when stdout is not a
454                                 terminal
455       -D [ --define ] arg       define a constant
456       -a [ --app ] arg          application library name (default: icinga)
457       -l [ --library ] arg      load a library
458       -I [ --include ] arg      add include search directory
459       -x [ --log-level ] arg    specify the log level for the console log.
460                                 The valid value is either debug, notice,
461                                 information (default), warning, or critical
462       -X [ --script-debugger ]  whether to enable the script debugger
463     
464     Report bugs at <https://github.com/Icinga/icinga2>
465     Icinga home page: <https://www.icinga.com/>
466
467 ## <a id="cli-command-repository"></a> CLI command: Repository
468
469 > **Warning**
470 >
471 > This CLI command has been deprecated in v2.6 and will be
472 > removed in future releases.
473 >
474 > Make sure to follow the release announcements on the [Icinga website](https://www.icinga.com).
475
476 This command is experimental and not finished as public CLI command. Parts of its functionality
477 are used in the [node update-config](11-cli-commands.md#cli-command-node) cli command.
478
479 ## <a id="cli-command-troubleshoot"></a> CLI command: Troubleshoot
480
481 Collects basic information like version, paths, log files and crash reports for troubleshooting
482 purposes and prints them to a file or the console. See [troubleshooting](15-troubleshooting.md#troubleshooting-information-required).
483
484 Its output defaults to a file named `troubleshooting-[TIMESTAMP].log` so it won't overwrite older troubleshooting files.
485
486 Keep in mind that this tool can not collect information from other icinga2 nodes, you will have to run it on
487 each of one of you instances.
488 This is only a tool to collect information to help others help you, it will not attempt to fix anything.
489
490     # icinga2 troubleshoot --help
491     icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.0)
492     
493     Usage:
494       icinga2 troubleshoot [<arguments>]
495     
496     Collect logs and other relevant information for troubleshooting purposes.
497     
498     Global options:
499       -h [ --help ]             show this help message
500       -V [ --version ]          show version information
501       --color                   use VT100 color codes even when stdout is not a
502                                 terminal
503       -D [ --define ] arg       define a constant
504       -a [ --app ] arg          application library name (default: icinga)
505       -l [ --library ] arg      load a library
506       -I [ --include ] arg      add include search directory
507       -x [ --log-level ] arg    specify the log level for the console log.
508                                 The valid value is either debug, notice,
509                                 information (default), warning, or critical
510       -X [ --script-debugger ]  whether to enable the script debugger
511     
512     Command options:
513       -c [ --console ]          print to console instead of file
514       -o [ --output ] arg       path to output file
515       --include-objects         Print the whole objectfile (like `object list`)
516       --include-vars            Print all Variables (like `variable list`)
517     
518     Report bugs at <https://github.com/Icinga/icinga2>
519     Icinga home page: <https://www.icinga.com/>
520
521 ## <a id="cli-command-variable"></a> CLI command: Variable
522
523 Lists all configured variables (constants) in a similar fashion like [object list](11-cli-commands.md#cli-command-object).
524
525     # icinga2 variable --help
526     icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.0)
527     
528     Usage:
529       icinga2 <command> [<arguments>]
530     
531     Supported commands:
532       * variable get (gets a variable)
533       * variable list (lists all variables)
534     
535     Global options:
536       -h [ --help ]             show this help message
537       -V [ --version ]          show version information
538       --color                   use VT100 color codes even when stdout is not a
539                                 terminal
540       -D [ --define ] arg       define a constant
541       -a [ --app ] arg          application library name (default: icinga)
542       -l [ --library ] arg      load a library
543       -I [ --include ] arg      add include search directory
544       -x [ --log-level ] arg    specify the log level for the console log.
545                                 The valid value is either debug, notice,
546                                 information (default), warning, or critical
547       -X [ --script-debugger ]  whether to enable the script debugger
548     
549     Report bugs at <https://github.com/Icinga/icinga2>
550     Icinga home page: <https://www.icinga.com/>
551
552 ## <a id="enable-features"></a> Enabling/Disabling Features
553
554 Icinga 2 provides configuration files for some commonly used features. These
555 are installed in the `/etc/icinga2/features-available` directory and can be
556 enabled and disabled using the `icinga2 feature enable` and `icinga2 feature disable`
557 [CLI commands](11-cli-commands.md#cli-command-feature), respectively.
558
559 The `icinga2 feature enable` CLI command creates symlinks in the
560 `/etc/icinga2/features-enabled` directory which is included by default
561 in the example configuration file.
562
563 You can view a list of enabled and disabled features:
564
565     # icinga2 feature list
566     Disabled features: api command compatlog debuglog graphite icingastatus ido-mysql ido-pgsql livestatus notification perfdata statusdata syslog
567     Enabled features: checker mainlog notification
568
569 Using the `icinga2 feature enable` command you can enable features:
570
571     # icinga2 feature enable graphite
572     Enabling feature graphite. Make sure to restart Icinga 2 for these changes to take effect.
573
574
575 You can disable features using the `icinga2 feature disable` command:
576
577     # icinga2 feature disable ido-mysql livestatus
578     Disabling feature ido-mysql. Make sure to restart Icinga 2 for these changes to take effect.
579     Disabling feature livestatus. Make sure to restart Icinga 2 for these changes to take effect.
580
581
582 The `icinga2 feature enable` and `icinga2 feature disable` commands do not
583 restart Icinga 2. You will need to restart Icinga 2 using the init script
584 after enabling or disabling features.
585
586
587
588 ## <a id="config-validation"></a> Configuration Validation
589
590 Once you've edited the configuration files make sure to tell Icinga 2 to validate
591 the configuration changes. Icinga 2 will log any configuration error including
592 a hint on the file, the line number and the affected configuration line itself.
593
594 The following example creates an apply rule without any `assign` condition.
595
596     apply Service "5872-ping4" {
597       import "generic-service"
598       check_command = "ping4"
599       //assign where match("5872-*", host.name)
600     }
601
602 Validate the configuration with the init script option `checkconfig`:
603
604     # /etc/init.d/icinga2 checkconfig
605
606 **Note**: Using [systemd](2-getting-started.md#systemd-service) you need to manually validate the configuration using
607 the CLI command below.
608
609     # icinga2 daemon -C
610
611     [2014-05-22 17:07:25 +0200] critical/ConfigItem: Location:
612     /etc/icinga2/conf.d/tests/5872.conf(5): }
613     /etc/icinga2/conf.d/tests/5872.conf(6):
614     /etc/icinga2/conf.d/tests/5872.conf(7): apply Service "5872-ping4" {
615                                             ^^^^^^^^^^^^^
616     /etc/icinga2/conf.d/tests/5872.conf(8):   import "test-generic-service"
617     /etc/icinga2/conf.d/tests/5872.conf(9):   check_command = "ping4"
618
619     Config error: 'apply' is missing 'assign'
620     [2014-05-22 17:07:25 +0200] critical/ConfigItem: 1 errors, 0 warnings.
621     Icinga 2 detected configuration errors.
622
623 If you encounter errors during configuration validation, please make sure
624 to read the [troubleshooting](15-troubleshooting.md#troubleshooting) chapter.
625
626 You can also use the [CLI command](11-cli-commands.md#cli-command-object) `icinga2 object list`
627 after validation passes to analyze object attributes, inheritance or created
628 objects by apply rules.
629 Find more on troubleshooting with `object list` in [this chapter](15-troubleshooting.md#list-configuration-objects).
630
631 Example filtered by `Service` objects with the name `ping*`:
632
633     # icinga2 object list --type Service --name *ping*
634     Object 'icinga.com!ping4' of type 'Service':
635       * __name = 'icinga.com!ping4'
636       * check_command = 'ping4'
637         % = modified in '/etc/icinga2/conf.d/services.conf', lines 17:3-17:25
638       * check_interval = 60
639         % = modified in '/etc/icinga2/conf.d/templates.conf', lines 28:3-28:21
640       * host_name = 'icinga.com'
641         % = modified in '/etc/icinga2/conf.d/services.conf', lines 14:1-14:21
642       * max_check_attempts = 3
643         % = modified in '/etc/icinga2/conf.d/templates.conf', lines 27:3-27:24
644       * name = 'ping4'
645         % = modified in '/etc/icinga2/conf.d/services.conf', lines 14:1-14:21
646       * retry_interval = 30
647         % = modified in '/etc/icinga2/conf.d/templates.conf', lines 29:3-29:22
648       * templates = [ 'ping4', 'generic-service' ]
649         % += modified in '/etc/icinga2/conf.d/services.conf', lines 14:1-14:21
650         % += modified in '/etc/icinga2/conf.d/templates.conf', lines 26:1-30:1
651       * type = 'Service'
652       * vars
653         % += modified in '/etc/icinga2/conf.d/services.conf', lines 18:3-18:19
654         * sla = '24x7'
655           % = modified in '/etc/icinga2/conf.d/services.conf', lines 18:3-18:19
656
657
658
659 ## <a id="config-change-reload"></a> Reload on Configuration Changes
660
661 Every time you have changed your configuration you should first tell Icinga 2
662 to [validate](11-cli-commands.md#config-validation). If there are no validation errors, you can
663 safely reload the Icinga 2 daemon.
664
665     # systemctl reload icinga2
666
667 The `reload` action will send the `SIGHUP` signal to the Icinga 2 daemon
668 which will validate the configuration in a separate process and not stop
669 the other events like check execution, notifications, etc.
670