From 79b7691867e5bfb8d8e4d53a02e3894e1fba3924 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 22 Sep 2022 14:57:54 +0200 Subject: [PATCH] Docs: recommend to install from packages --- README.md | 2 +- doc/02-Installation.md | 245 ++++++++++++++++++-- doc/02-Installation.md.d/01-Amazon-Linux.md | 3 + doc/02-Installation.md.d/02-CentOS.md | 3 + doc/02-Installation.md.d/03-Debian.md | 3 + doc/02-Installation.md.d/04-RHEL.md | 3 + doc/02-Installation.md.d/05-SLES.md | 3 + doc/02-Installation.md.d/06-Ubuntu.md | 3 + doc/02-Installation.md.d/07-From-Source.md | 3 + 9 files changed, 251 insertions(+), 17 deletions(-) create mode 100644 doc/02-Installation.md.d/01-Amazon-Linux.md create mode 100644 doc/02-Installation.md.d/02-CentOS.md create mode 100644 doc/02-Installation.md.d/03-Debian.md create mode 100644 doc/02-Installation.md.d/04-RHEL.md create mode 100644 doc/02-Installation.md.d/05-SLES.md create mode 100644 doc/02-Installation.md.d/06-Ubuntu.md create mode 100644 doc/02-Installation.md.d/07-From-Source.md diff --git a/README.md b/README.md index e3512117..786037fe 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ the monitoring module. ## Documentation -* [Installation](doc/02-Installation.md) +* [Installation](https://icinga.com/docs/icinga-web-graphite-integration/latest/doc/02-Installation/) * [Configuration](doc/03-Configuration.md) * [Templates](doc/04-Templates.md) * [Demonstration](doc/06-Demonstration.md) diff --git a/doc/02-Installation.md b/doc/02-Installation.md index 75d7f405..9d6838ba 100644 --- a/doc/02-Installation.md +++ b/doc/02-Installation.md @@ -1,15 +1,16 @@ -# Installation + +# Installing the Icinga Web Graphite Integration +The recommended way is to use prebuilt packages for +all supported platforms from our official release repository. +Please follow the steps listed for your target operating system, +which guide you through setting up the repository and installation. + + ## Requirements -* PHP (>= 7.2) -* Icinga Web (>= 2.9) -* Icinga Web libraries: - * [Icinga PHP Library (ipl)](https://github.com/Icinga/icinga-php-library) (>= 0.9) - * [Icinga PHP Thirdparty](https://github.com/Icinga/icinga-php-thirdparty) (>= 0.11) -* Icinga Web modules: - * The `monitoring` or `icingadb` module needs to be configured and enabled. -* Graphite and Graphite Web +* Graphite +* Graphite Web ## Prepare Icinga 2 @@ -33,15 +34,227 @@ And then restart Icinga2. Enabling thresholds is not a hard requirement. However, some templates look better if they are able to render a max value or similar. + +## Adding Icinga Package Repository + +The recommended way to install Icinga products is to use prebuilt packages from our official release repository. + +!!! tip + + If you perform the installation on a node that has Icinga 2, Icinga DB or Icinga Web installed via packages, + proceed to [installing the package](#installing-the-package) as the repository is already configured. + +Here's how to add the official release repository: + + + +### Amazon Linux 2 Repository + +!!! info + + A paid repository subscription is required for Amazon Linux 2 repositories. Get more information on + [icinga.com/subscription](https://icinga.com/subscription). + + Don't forget to fill in the username and password section with appropriate credentials in the local .repo file. + +```bash +rpm --import https://packages.icinga.com/icinga.key +wget https://packages.icinga.com/subscription/amazon/ICINGA-release.repo -O /etc/yum.repos.d/ICINGA-release.repo +``` + + + + +### CentOS Repository + +```bash +rpm --import https://packages.icinga.com/icinga.key +wget https://packages.icinga.com/centos/ICINGA-release.repo -O /etc/yum.repos.d/ICINGA-release.repo +``` + + + + +### Debian Repository + + +```bash +apt-get update +apt-get -y install apt-transport-https wget gnupg + +wget -O - https://packages.icinga.com/icinga.key | apt-key add - + +DIST=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release); \ + echo "deb https://packages.icinga.com/debian icinga-${DIST} main" > \ + /etc/apt/sources.list.d/${DIST}-icinga.list + echo "deb-src https://packages.icinga.com/debian icinga-${DIST} main" >> \ + /etc/apt/sources.list.d/${DIST}-icinga.list + +apt-get update +``` + + + + +### RHEL Repository + +!!! info + + A paid repository subscription is required for RHEL repositories. Get more information on + [icinga.com/subscription](https://icinga.com/subscription). + + Don't forget to fill in the username and password section with appropriate credentials in the local .repo file. + +```bash +rpm --import https://packages.icinga.com/icinga.key +wget https://packages.icinga.com/subscription/rhel/ICINGA-release.repo -O /etc/yum.repos.d/ICINGA-release.repo +``` + + + + +### SLES Repository + +!!! info + + A paid repository subscription is required for SLES repositories. Get more information on + [icinga.com/subscription](https://icinga.com/subscription). + + Don't forget to fill in the username and password section with appropriate credentials in the local .repo file. + +```bash +rpm --import https://packages.icinga.com/icinga.key + +zypper ar https://packages.icinga.com/subscription/sles/ICINGA-release.repo +zypper ref +``` + + + + +### Ubuntu Repository + + +```bash +apt-get update +apt-get -y install apt-transport-https wget gnupg + +wget -O - https://packages.icinga.com/icinga.key | apt-key add - + +. /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi; \ + echo "deb https://packages.icinga.com/ubuntu icinga-${DIST} main" > \ + /etc/apt/sources.list.d/${DIST}-icinga.list + echo "deb-src https://packages.icinga.com/ubuntu icinga-${DIST} main" >> \ + /etc/apt/sources.list.d/${DIST}-icinga.list + +apt-get update +``` + + +## Installing the Package + +Use your distribution's package manager to install the `icinga-graphite` package as follows: + + + +#### Amazon Linux 2 + +```bash +yum install icinga-graphite +``` + + + + +#### CentOS + +!!! info + + Note that the installation is only supported on CentOS 7 as CentOS 8 is EOL. + +```bash +yum install icinga-graphite +``` + + + + +#### Debian / Ubuntu + +```bash +apt-get install icinga-graphite +``` + + + +#### RHEL 8 or Later + +```bash +dnf install icinga-graphite +``` + +#### RHEL 7 + +```bash +yum install icinga-graphite +``` + + + + +#### SLES + +```bash +zypper install icinga-graphite +``` + + + + +## Installing the Icinga Web Graphite Integration from Source + + +Please see the Icinga Web documentation on +[how to install modules](https://icinga.com/docs/icinga-web-2/latest/doc/08-Modules/#installation) from source. +Make sure you use `graphite` as the module name. The following requirements must also be met. + +### Requirements -## Install the Icinga Web Graphite Integration +* PHP (≥7.2) +* [Icinga Web](https://github.com/Icinga/icingaweb2) (≥2.9) +* [Icinga DB Web](https://github.com/Icinga/icingadb-web) (≥1.0) +* [Icinga PHP Library (ipl)](https://github.com/Icinga/icinga-php-library) (≥0.9) +* [Icinga PHP Thirdparty](https://github.com/Icinga/icinga-php-thirdparty) (≥0.11) + -Install it [like any other module](https://icinga.com/docs/icinga-web-2/latest/doc/08-Modules/#installation). -Use `graphite` as name. +## Configuring the Icinga Web Graphite Integration + +The Icinga Web PHP framework is required to configure and run its Graphite Integration. +Package installations of `icinga-graphite` already set up the necessary dependencies. -## Further reading +If Icinga Web has not been installed or set up before, +you have completed the instructions here and can proceed to + +[install the web server on Amazon Linux](https://icinga.com/docs/icinga-web-2/latest/doc/02-Installation/06-Amazon-Linux/#install-the-web-server), + + +[install the web server on CentOS](https://icinga.com/docs/icinga-web-2/latest/doc/02-Installation/03-CentOS/#install-the-web-server), + + +[install the web server on Debian](https://icinga.com/docs/icinga-web-2/latest/doc/02-Installation/01-Debian/#install-the-web-server), + + +[install the web server on RHEL](https://icinga.com/docs/icinga-web-2/latest/doc/02-Installation/04-RHEL/#install-the-web-server), + + +[install the web server on SLES](https://icinga.com/docs/icinga-web-2/latest/doc/02-Installation/05-SLES/#install-the-web-server), + + +[install the web server on Ubuntu](https://icinga.com/docs/icinga-web-2/latest/doc/02-Installation/02-Ubuntu/#install-the-web-server), + +which will then take you to the web-based setup wizard, which also allows you to enable the Graphite Integration. + -* [Configuration](03-Configuration.md) -* [Templates](04-Templates.md) -* [Troubleshooting](05-Troubleshooting.md) +For Icinga Web setups already running, log in to Icinga Web with a privileged user and enable the Graphite Integration. + diff --git a/doc/02-Installation.md.d/01-Amazon-Linux.md b/doc/02-Installation.md.d/01-Amazon-Linux.md new file mode 100644 index 00000000..3a4b6fc6 --- /dev/null +++ b/doc/02-Installation.md.d/01-Amazon-Linux.md @@ -0,0 +1,3 @@ +# Installing the Icinga Web Graphite Integration on Amazon Linux + + diff --git a/doc/02-Installation.md.d/02-CentOS.md b/doc/02-Installation.md.d/02-CentOS.md new file mode 100644 index 00000000..2f22dae5 --- /dev/null +++ b/doc/02-Installation.md.d/02-CentOS.md @@ -0,0 +1,3 @@ +# Installing the Icinga Web Graphite Integration on CentOS + + diff --git a/doc/02-Installation.md.d/03-Debian.md b/doc/02-Installation.md.d/03-Debian.md new file mode 100644 index 00000000..464a8198 --- /dev/null +++ b/doc/02-Installation.md.d/03-Debian.md @@ -0,0 +1,3 @@ +# Installing the Icinga Web Graphite Integration on Debian + + diff --git a/doc/02-Installation.md.d/04-RHEL.md b/doc/02-Installation.md.d/04-RHEL.md new file mode 100644 index 00000000..9bb77ac3 --- /dev/null +++ b/doc/02-Installation.md.d/04-RHEL.md @@ -0,0 +1,3 @@ +# Installing the Icinga Web Graphite Integration on RHEL + + diff --git a/doc/02-Installation.md.d/05-SLES.md b/doc/02-Installation.md.d/05-SLES.md new file mode 100644 index 00000000..0ea3dbc6 --- /dev/null +++ b/doc/02-Installation.md.d/05-SLES.md @@ -0,0 +1,3 @@ +# Installing the Icinga Web Graphite Integration on SLES + + diff --git a/doc/02-Installation.md.d/06-Ubuntu.md b/doc/02-Installation.md.d/06-Ubuntu.md new file mode 100644 index 00000000..25868bc6 --- /dev/null +++ b/doc/02-Installation.md.d/06-Ubuntu.md @@ -0,0 +1,3 @@ +# Installing the Icinga Web Graphite Integration on Ubuntu + + diff --git a/doc/02-Installation.md.d/07-From-Source.md b/doc/02-Installation.md.d/07-From-Source.md new file mode 100644 index 00000000..02fbf574 --- /dev/null +++ b/doc/02-Installation.md.d/07-From-Source.md @@ -0,0 +1,3 @@ +# Installing the Icinga Web Graphite Integration from Source + +