Skip to content

Commit

Permalink
Docs: recommend to install from packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Al2Klimov committed Oct 26, 2022
1 parent bb4f592 commit 185d275
Show file tree
Hide file tree
Showing 9 changed files with 251 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
* [Development](doc/06-Development.md)
245 changes: 229 additions & 16 deletions doc/02-Installation.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Installation
<!-- {% if index %} -->
# Installing 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.

<!-- {% else %} -->
## 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

Expand All @@ -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.

<!-- {% if not from_source %} -->
## 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:

<!-- {% if amazon_linux %} -->
<!-- {% if not icingaDocs %} -->
### Amazon Linux 2 Repository
<!-- {% endif %} -->
!!! 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
```
<!-- {% endif %} -->

<!-- {% if centos %} -->
<!-- {% if not icingaDocs %} -->
### CentOS Repository
<!-- {% endif %} -->
```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
```
<!-- {% endif %} -->

<!-- {% if debian %} -->
<!-- {% if not icingaDocs %} -->
### Debian Repository
<!-- {% endif %} -->

```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
```
<!-- {% endif %} -->

<!-- {% if rhel %} -->
<!-- {% if not icingaDocs %} -->
### RHEL Repository
<!-- {% endif %} -->
!!! 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
```
<!-- {% endif %} -->

<!-- {% if sles %} -->
<!-- {% if not icingaDocs %} -->
### SLES Repository
<!-- {% endif %} -->
!!! 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
```
<!-- {% endif %} -->

<!-- {% if ubuntu %} -->
<!-- {% if not icingaDocs %} -->
### Ubuntu Repository
<!-- {% endif %} -->

```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
```
<!-- {% endif %} -->

## Installing Icinga Web Graphite Integration Package

Use your distribution's package manager to install the `icinga-graphite` package as follows:

<!-- {% if amazon_linux %} -->
<!-- {% if not icingaDocs %} -->
#### Amazon Linux 2
<!-- {% endif %} -->
```bash
yum install icinga-graphite
```
<!-- {% endif %} -->

<!-- {% if centos %} -->
<!-- {% if not icingaDocs %} -->
#### CentOS
<!-- {% endif %} -->
!!! info

Note that the installation is only supported on CentOS 7 as CentOS 8 is EOL.

```bash
yum install icinga-graphite
```
<!-- {% endif %} -->

<!-- {% if debian or ubuntu %} -->
<!-- {% if not icingaDocs %} -->
#### Debian / Ubuntu
<!-- {% endif %} -->
```bash
apt-get install icinga-graphite
```
<!-- {% endif %} -->

<!-- {% if rhel %} -->
#### RHEL 8 or Later

```bash
dnf install icinga-graphite
```

#### RHEL 7

```bash
yum install icinga-graphite
```
<!-- {% endif %} -->

<!-- {% if sles %} -->
<!-- {% if not icingaDocs %} -->
#### SLES
<!-- {% endif %} -->
```bash
zypper install icinga-graphite
```
<!-- {% endif %} -->

<!-- {% else %} --><!-- {# end if not from_source #} -->
<!-- {% if not icingaDocs %} -->
## Installing Icinga Web Graphite Integration from Source
<!-- {% endif %} -->

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)
<!-- {% endif %} --><!-- {# end else if not from_source #} -->

Install it [like any other module](https://icinga.com/docs/icinga-web-2/latest/doc/08-Modules/#installation).
Use `graphite` as name.
## Configuring Icinga Web Graphite Integration

<!-- {% if not from_source %} -->
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
<!-- {% if amazon_linux %} -->
[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),
<!-- {% endif %} -->
<!-- {% if centos %} -->
[install the web server on CentOS](https://icinga.com/docs/icinga-web-2/latest/doc/02-Installation/03-CentOS/#install-the-web-server),
<!-- {% endif %} -->
<!-- {% if debian %} -->
[install the web server on Debian](https://icinga.com/docs/icinga-web-2/latest/doc/02-Installation/01-Debian/#install-the-web-server),
<!-- {% endif %} -->
<!-- {% if rhel %} -->
[install the web server on RHEL](https://icinga.com/docs/icinga-web-2/latest/doc/02-Installation/04-RHEL/#install-the-web-server),
<!-- {% endif %} -->
<!-- {% if sles %} -->
[install the web server on SLES](https://icinga.com/docs/icinga-web-2/latest/doc/02-Installation/05-SLES/#install-the-web-server),
<!-- {% endif %} -->
<!-- {% if ubuntu %} -->
[install the web server on Ubuntu](https://icinga.com/docs/icinga-web-2/latest/doc/02-Installation/02-Ubuntu/#install-the-web-server),
<!-- {% endif %} -->
which will then take you to the web-based setup wizard, which also allows you to enable the Graphite Integration.
<!-- {% endif %} --><!-- {# end if not from_source #} -->

* [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.
<!-- {% endif %} --><!-- {# end else if index #} -->
3 changes: 3 additions & 0 deletions doc/02-Installation.md.d/01-Amazon-Linux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Installing the Icinga Web Graphite Integration on Amazon Linux
<!-- {% set amazon_linux = True %} -->
<!-- {% include "02-Installation.md" %} -->
3 changes: 3 additions & 0 deletions doc/02-Installation.md.d/02-CentOS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Installing the Icinga Web Graphite Integration on CentOS
<!-- {% set centos = True %} -->
<!-- {% include "02-Installation.md" %} -->
3 changes: 3 additions & 0 deletions doc/02-Installation.md.d/03-Debian.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Installing the Icinga Web Graphite Integration on Debian
<!-- {% set debian = True %} -->
<!-- {% include "02-Installation.md" %} -->
3 changes: 3 additions & 0 deletions doc/02-Installation.md.d/04-RHEL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Installing the Icinga Web Graphite Integration on RHEL
<!-- {% set rhel = True %} -->
<!-- {% include "02-Installation.md" %} -->
3 changes: 3 additions & 0 deletions doc/02-Installation.md.d/05-SLES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Installing the Icinga Web Graphite Integration on SLES
<!-- {% set sles = True %} -->
<!-- {% include "02-Installation.md" %} -->
3 changes: 3 additions & 0 deletions doc/02-Installation.md.d/06-Ubuntu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Installing the Icinga Web Graphite Integration on Ubuntu
<!-- {% set ubuntu = True %} -->
<!-- {% include "02-Installation.md" %} -->
3 changes: 3 additions & 0 deletions doc/02-Installation.md.d/07-From-Source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Installing the Icinga Web Graphite Integration from Source
<!-- {% set from_source = True %} -->
<!-- {% include "02-Installation.md" %} -->

0 comments on commit 185d275

Please sign in to comment.