mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-07 20:25:08 +02:00
Docs: Move syntax highlighting section to addons chapter
This commit is contained in:
parent
c8fe060885
commit
9d64b47d79
doc
@ -653,192 +653,6 @@ You are now ready to start the installation of Icinga Web 2. Please follow the
|
||||
If you're using Icinga DB, follow the [installation instructions](https://icinga.com/docs/icinga-db/latest/icinga-db-web/doc/02-Installation/)
|
||||
to install and enable the Icinga DB Web module.
|
||||
|
||||
## Syntax Highlighting <a id="configuration-syntax-highlighting"></a>
|
||||
|
||||
Icinga 2 provides configuration examples for syntax highlighting using the `vim` and `nano` editors.
|
||||
|
||||
### Using Vim <a id="configuration-syntax-highlighting-vim"></a>
|
||||
|
||||
Install the package `vim-icinga2` with your distribution's package manager.
|
||||
|
||||
<!-- {% if debian or ubuntu or raspbian%} -->
|
||||
<!-- {% if not icingaDocs %} -->
|
||||
#### Debian / Ubuntu / Raspbian
|
||||
<!-- {% endif %} -->
|
||||
```bash
|
||||
apt-get install vim-icinga2 vim-addon-manager
|
||||
vim-addon-manager -w install icinga2
|
||||
Info: installing removed addon 'icinga2' to /var/lib/vim/addons
|
||||
```
|
||||
<!-- {% endif %} -->
|
||||
|
||||
<!-- {% if centos %} -->
|
||||
<!-- {% if not icingaDocs %} -->
|
||||
#### CentOS
|
||||
<!-- {% endif %} -->
|
||||
|
||||
#### CentOS 8
|
||||
```bash
|
||||
dnf install vim-icinga2
|
||||
```
|
||||
|
||||
#### CentOS 7
|
||||
```bash
|
||||
yum install vim-icinga2
|
||||
```
|
||||
<!-- {% endif %} -->
|
||||
|
||||
<!-- {% if rhel %} -->
|
||||
<!-- {% if not icingaDocs %} -->
|
||||
#### RHEL
|
||||
<!-- {% endif %} -->
|
||||
#### RHEL 8
|
||||
```bash
|
||||
dnf install vim-icinga2
|
||||
```
|
||||
|
||||
#### RHEL 7
|
||||
```bash
|
||||
yum install vim-icinga2
|
||||
```
|
||||
<!-- {% endif %} -->
|
||||
|
||||
<!-- {% if fedora %} -->
|
||||
<!-- {% if not icingaDocs %} -->
|
||||
#### Fedora
|
||||
<!-- {% endif %} -->
|
||||
```bash
|
||||
dnf install vim-icinga2
|
||||
```
|
||||
<!-- {% endif %} -->
|
||||
|
||||
<!-- {% if sles or opensuse %} -->
|
||||
<!-- {% if not icingaDocs %} -->
|
||||
#### SLES / openSUSE
|
||||
<!-- {% endif %} -->
|
||||
```bash
|
||||
zypper install vim-icinga2
|
||||
```
|
||||
<!-- {% endif %} -->
|
||||
|
||||
<!-- {% if amazon_linux %} -->
|
||||
<!-- {% if not icingaDocs %} -->
|
||||
#### Amazon Linux 2
|
||||
<!-- {% endif %} -->
|
||||
```bash
|
||||
yum install vim-icinga2
|
||||
```
|
||||
<!-- {% endif %} -->
|
||||
|
||||
Ensure that syntax highlighting is enabled e.g. by editing the user's `vimrc`
|
||||
configuration file:
|
||||
|
||||
```
|
||||
# vim ~/.vimrc
|
||||
syntax on
|
||||
```
|
||||
|
||||
Test it:
|
||||
|
||||
```bash
|
||||
vim /etc/icinga2/conf.d/templates.conf
|
||||
```
|
||||
|
||||

|
||||
|
||||
|
||||
### Using Nano <a id="configuration-syntax-highlighting-nano"></a>
|
||||
|
||||
Install the package `nano-icinga2` with your distribution's package manager.
|
||||
|
||||
<!-- {% if debian or ubuntu or raspbian %} -->
|
||||
<!-- {% if not icingaDocs %} -->
|
||||
#### Debian / Ubuntu / Raspbian
|
||||
<!-- {% endif %} -->
|
||||
**Note:** The syntax files are installed with the `icinga2-common` package already.
|
||||
<!-- {% endif %} -->
|
||||
|
||||
<!-- {% if centos %} -->
|
||||
<!-- {% if not icingaDocs %} -->
|
||||
#### CentOS
|
||||
<!-- {% endif %} -->
|
||||
|
||||
#### CentOS 8
|
||||
```bash
|
||||
dnf install nano-icinga2
|
||||
```
|
||||
|
||||
#### CentOS 7
|
||||
```bash
|
||||
yum install nano-icinga2
|
||||
```
|
||||
<!-- {% endif %} -->
|
||||
|
||||
<!-- {% if rhel %} -->
|
||||
<!-- {% if not icingaDocs %} -->
|
||||
#### RHEL
|
||||
<!-- {% endif %} -->
|
||||
#### RHEL 8
|
||||
```bash
|
||||
dnf install nano-icinga2
|
||||
```
|
||||
|
||||
#### RHEL 7
|
||||
```bash
|
||||
yum install nano-icinga2
|
||||
```
|
||||
<!-- {% endif %} -->
|
||||
|
||||
<!-- {% if fedora %} -->
|
||||
<!-- {% if not icingaDocs %} -->
|
||||
#### Fedora
|
||||
<!-- {% endif %} -->
|
||||
```bash
|
||||
dnf install nano-icinga2
|
||||
```
|
||||
<!-- {% endif %} -->
|
||||
|
||||
<!-- {% if sles or opensuse %} -->
|
||||
<!-- {% if not icingaDocs %} -->
|
||||
#### SLES / openSUSE
|
||||
<!-- {% endif %} -->
|
||||
```bash
|
||||
zypper install nano-icinga2
|
||||
```
|
||||
<!-- {% endif %} -->
|
||||
|
||||
<!-- {% if amazon_linux %} -->
|
||||
<!-- {% if not icingaDocs %} -->
|
||||
#### Amazon Linux 2
|
||||
<!-- {% endif %} -->
|
||||
```bash
|
||||
yum install nano-icinga2
|
||||
```
|
||||
<!-- {% endif %} -->
|
||||
|
||||
Copy the `/etc/nanorc` sample file to your home directory.
|
||||
|
||||
```bash
|
||||
cp /etc/nanorc ~/.nanorc
|
||||
```
|
||||
|
||||
Include the `icinga2.nanorc` file.
|
||||
|
||||
```
|
||||
$ vim ~/.nanorc
|
||||
|
||||
## Icinga 2
|
||||
include "/usr/share/nano/icinga2.nanorc"
|
||||
```
|
||||
|
||||
Test it:
|
||||
|
||||
```bash
|
||||
nano /etc/icinga2/conf.d/templates.conf
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Backup <a id="install-backup"></a>
|
||||
|
||||
Ensure to include the following in your backups:
|
||||
|
@ -3,6 +3,59 @@
|
||||
For an uptodate overview of all integrations and modules,
|
||||
please visit [https://icinga.com/products/](https://icinga.com/products/).
|
||||
|
||||
## Syntax Highlighting <a id="configuration-syntax-highlighting"></a>
|
||||
|
||||
Icinga 2 provides configuration examples for syntax highlighting using the `vim` and `nano` editors.
|
||||
|
||||
### Using Vim <a id="configuration-syntax-highlighting-vim"></a>
|
||||
|
||||
Install the package `vim-icinga2` with your distribution's package manager.
|
||||
|
||||
Ensure that syntax highlighting is enabled e.g. by editing the user's `vimrc`
|
||||
configuration file:
|
||||
|
||||
```
|
||||
# vim ~/.vimrc
|
||||
syntax on
|
||||
```
|
||||
|
||||
Test it:
|
||||
|
||||
```bash
|
||||
vim /etc/icinga2/conf.d/templates.conf
|
||||
```
|
||||
|
||||

|
||||
|
||||
|
||||
### Using Nano <a id="configuration-syntax-highlighting-nano"></a>
|
||||
|
||||
Install the package `nano-icinga2` with your distribution's package manager.
|
||||
|
||||
**Note:** On Debian, Ubuntu and Raspbian, the syntax files are installed with the `icinga2-common` package already.
|
||||
|
||||
Copy the `/etc/nanorc` sample file to your home directory.
|
||||
|
||||
```bash
|
||||
cp /etc/nanorc ~/.nanorc
|
||||
```
|
||||
|
||||
Include the `icinga2.nanorc` file.
|
||||
|
||||
```
|
||||
$ vim ~/.nanorc
|
||||
|
||||
## Icinga 2
|
||||
include "/usr/share/nano/icinga2.nanorc"
|
||||
```
|
||||
|
||||
Test it:
|
||||
|
||||
```bash
|
||||
nano /etc/icinga2/conf.d/templates.conf
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Icinga Reporting <a id="addons-reporting"></a>
|
||||
|
||||
@ -203,5 +256,3 @@ Checkout these specific integrations:
|
||||
|
||||
If you're looking for different config management integrations -- we're happy
|
||||
to add them upstream, so please get in touch with the [Icinga team](https://icinga.com/community/).
|
||||
|
||||
|
||||
|
Before ![]() (image error) Size: 48 KiB After ![]() (image error) Size: 48 KiB ![]() ![]() |
Before ![]() (image error) Size: 38 KiB After ![]() (image error) Size: 38 KiB ![]() ![]() |
Loading…
x
Reference in New Issue
Block a user