diff --git a/doc/02-installation.md b/doc/02-installation.md index e955442fe..8efb4a5b9 100644 --- a/doc/02-installation.md +++ b/doc/02-installation.md @@ -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 - -Icinga 2 provides configuration examples for syntax highlighting using the `vim` and `nano` editors. - -### Using Vim - -Install the package `vim-icinga2` with your distribution's package manager. - - - -#### Debian / Ubuntu / Raspbian - -```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 -``` - - - - -#### CentOS - - -#### CentOS 8 -```bash -dnf install vim-icinga2 -``` - -#### CentOS 7 -```bash -yum install vim-icinga2 -``` - - - - -#### RHEL - -#### RHEL 8 -```bash -dnf install vim-icinga2 -``` - -#### RHEL 7 -```bash -yum install vim-icinga2 -``` - - - - -#### Fedora - -```bash -dnf install vim-icinga2 -``` - - - - -#### SLES / openSUSE - -```bash -zypper install vim-icinga2 -``` - - - - -#### Amazon Linux 2 - -```bash -yum install vim-icinga2 -``` - - -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 -``` - -![Vim with syntax highlighting](images/installation/vim-syntax.png "Vim with Icinga 2 syntax highlighting") - - -### Using Nano - -Install the package `nano-icinga2` with your distribution's package manager. - - - -#### Debian / Ubuntu / Raspbian - -**Note:** The syntax files are installed with the `icinga2-common` package already. - - - - -#### CentOS - - -#### CentOS 8 -```bash -dnf install nano-icinga2 -``` - -#### CentOS 7 -```bash -yum install nano-icinga2 -``` - - - - -#### RHEL - -#### RHEL 8 -```bash -dnf install nano-icinga2 -``` - -#### RHEL 7 -```bash -yum install nano-icinga2 -``` - - - - -#### Fedora - -```bash -dnf install nano-icinga2 -``` - - - - -#### SLES / openSUSE - -```bash -zypper install nano-icinga2 -``` - - - - -#### Amazon Linux 2 - -```bash -yum install nano-icinga2 -``` - - -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 -``` - -![Nano with syntax highlighting](images/installation/nano-syntax.png "Nano with Icinga 2 syntax highlighting") - ## Backup Ensure to include the following in your backups: diff --git a/doc/13-addons.md b/doc/13-addons.md index e212c3734..953b7f0bb 100644 --- a/doc/13-addons.md +++ b/doc/13-addons.md @@ -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 + +Icinga 2 provides configuration examples for syntax highlighting using the `vim` and `nano` editors. + +### Using Vim + +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 +``` + +![Vim with syntax highlighting](images/addons/vim-syntax.png "Vim with Icinga 2 syntax highlighting") + + +### Using Nano + +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 +``` + +![Nano with syntax highlighting](images/addons/nano-syntax.png "Nano with Icinga 2 syntax highlighting") ## Icinga Reporting @@ -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/). - - diff --git a/doc/images/installation/nano-syntax.png b/doc/images/addons/nano-syntax.png similarity index 100% rename from doc/images/installation/nano-syntax.png rename to doc/images/addons/nano-syntax.png diff --git a/doc/images/installation/vim-syntax.png b/doc/images/addons/vim-syntax.png similarity index 100% rename from doc/images/installation/vim-syntax.png rename to doc/images/addons/vim-syntax.png