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