mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Docs: Move API install instructions up
Almost every Icinga 2 node setup requires the Icinga 2 API, as Icinga Web connects to it, Icinga DB requires it, and although it's not clearly mentioned anywhere in the documentation at the moment, it enables the cluster communication functionality.
This commit is contained in:
parent
bd2118c4cd
commit
ebda4ffa28
@ -450,6 +450,36 @@ yum install nagios-plugins-all
|
||||
```
|
||||
<!-- {% endif %} -->
|
||||
|
||||
## Set up Icinga 2 REST API <a id="setting-up-rest-api"></a>
|
||||
|
||||
Icinga Web 2 requires the [REST API](12-icinga2-api.md#icinga2-api-setup) to send actions
|
||||
(reschedule check, etc.) and query object details.
|
||||
|
||||
You can run the CLI command `icinga2 api setup` to enable the
|
||||
`api` [feature](11-cli-commands.md#enable-features) and set up
|
||||
certificates as well as a new API user `root` with an auto-generated password in the
|
||||
`/etc/icinga2/conf.d/api-users.conf` configuration file:
|
||||
|
||||
```bash
|
||||
icinga2 api setup
|
||||
```
|
||||
|
||||
Edit the `api-users.conf` file and add a new ApiUser object. Specify the [permissions](12-icinga2-api.md#icinga2-api-permissions)
|
||||
attribute with minimal permissions required by Icinga Web 2.
|
||||
|
||||
```
|
||||
object ApiUser "icingaweb2" {
|
||||
password = "Wijsn8Z9eRs5E25d"
|
||||
permissions = [ "status/query", "actions/*", "objects/modify/*", "objects/query/*" ]
|
||||
}
|
||||
```
|
||||
|
||||
Restart Icinga 2 to activate the configuration.
|
||||
|
||||
```bash
|
||||
systemctl restart icinga2
|
||||
```
|
||||
|
||||
## Set up Database <a id="set-up-database"></a>
|
||||
|
||||
The IDO (Icinga Data Output) feature for Icinga 2 stores all configuration and status information into a database.
|
||||
@ -920,36 +950,6 @@ Restart Icinga 2.
|
||||
systemctl restart icinga2
|
||||
```
|
||||
|
||||
## Set up Icinga 2 REST API <a id="setting-up-rest-api"></a>
|
||||
|
||||
Icinga Web 2 requires the [REST API](12-icinga2-api.md#icinga2-api-setup) to send actions
|
||||
(reschedule check, etc.) and query object details.
|
||||
|
||||
You can run the CLI command `icinga2 api setup` to enable the
|
||||
`api` [feature](11-cli-commands.md#enable-features) and set up
|
||||
certificates as well as a new API user `root` with an auto-generated password in the
|
||||
`/etc/icinga2/conf.d/api-users.conf` configuration file:
|
||||
|
||||
```bash
|
||||
icinga2 api setup
|
||||
```
|
||||
|
||||
Edit the `api-users.conf` file and add a new ApiUser object. Specify the [permissions](12-icinga2-api.md#icinga2-api-permissions)
|
||||
attribute with minimal permissions required by Icinga Web 2.
|
||||
|
||||
```
|
||||
object ApiUser "icingaweb2" {
|
||||
password = "Wijsn8Z9eRs5E25d"
|
||||
permissions = [ "status/query", "actions/*", "objects/modify/*", "objects/query/*" ]
|
||||
}
|
||||
```
|
||||
|
||||
Restart Icinga 2 to activate the configuration.
|
||||
|
||||
```bash
|
||||
systemctl restart icinga2
|
||||
```
|
||||
|
||||
## Install Icinga Web 2
|
||||
|
||||
You are now ready to start the installation of Icinga Web 2. Please follow the
|
||||
|
Loading…
x
Reference in New Issue
Block a user