From d36bab0acccda89712dbcaff946ee91fd812624c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 2 Oct 2024 14:57:39 +0200 Subject: [PATCH 1/2] Add `From Source` section to installation docs --- doc/02-Installation.md | 26 ++++++++++++++++++++----- doc/02-Installation.md.d/From-Source.md | 23 ++++++++++++++++++++++ doc/03-Configuration.md | 2 +- 3 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 doc/02-Installation.md.d/From-Source.md diff --git a/doc/02-Installation.md b/doc/02-Installation.md index f2c2ab30c..46b20c5e2 100644 --- a/doc/02-Installation.md +++ b/doc/02-Installation.md @@ -25,6 +25,7 @@ which ships an up-to-date Redis® open source server version and is pre-configur keep latency between the components low. + ## Adding Icinga Package Repository @@ -243,6 +244,7 @@ yum install icingadb zypper install icingadb ``` + ## Setting up the Database @@ -315,20 +317,32 @@ psql -U icingadb icingadb < /usr/share/icingadb/schema/pgsql/schema.sql ## Configuring Icinga DB -Icinga DB installs its configuration file to `/etc/icingadb/config.yml`, -pre-populating most of the settings for a local setup. Before running Icinga DB, -adjust the Redis® and database credentials and, if necessary, the connection configuration. + +Create a local `config.yml` file using [the sample configuration](../config.example.yml). + +The Icinga DB package installs its configuration file to `/etc/icingadb/config.yml`. + +Most of the settings are pre-populated for a local setup. +Before running Icinga DB, adjust the Redis® and database credentials and, if necessary, the connection configuration. The configuration file explains general settings. All available settings can be found under [Configuration](03-Configuration.md). ## Running Icinga DB + +You can execute `icingadb` by running it with the locally accessible `config.yml` file: + +```bash +icingadb -config /path/to/config.yml +``` + The `icingadb` package automatically installs the necessary systemd unit files to run Icinga DB. Please run the following command to enable and start its service: ```bash systemctl enable --now icingadb ``` + ## Installing Icinga DB Web @@ -337,8 +351,7 @@ which connects to both Redis® and the database to display and work with the mon ![Icinga DB Web](images/icingadb-web.png) -The Icinga DB Web package is also included in the Icinga repository, and since it is already set up, -you have completed the instructions here and can proceed to +You have completed the instructions here and can proceed to [installing Icinga DB Web on Amazon Linux](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/01-Amazon-Linux/#installing-icinga-db-web-package), @@ -357,6 +370,9 @@ you have completed the instructions here and can proceed to [installing Icinga DB Web on Ubuntu](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/06-Ubuntu/#installing-icinga-db-web-package), + +[installing Icinga DB Web From Source](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/From-Source), + which will also guide you through the setup of the Icinga Web PHP framework, which is required to run the Icinga DB web module. Below is a preview of how the interface visualizes monitoring data and also supports dark and light mode: diff --git a/doc/02-Installation.md.d/From-Source.md b/doc/02-Installation.md.d/From-Source.md new file mode 100644 index 000000000..bd039354c --- /dev/null +++ b/doc/02-Installation.md.d/From-Source.md @@ -0,0 +1,23 @@ +# Installing Icinga DB from Source + +## Using `go install` + +You can build and install `icingadb` as follows: + +```bash +go install github.com/icinga/icingadb@latest +``` + +This should place the `icingadb` binary in your configured `$GOBIN` path which defaults to `$GOPATH/bin` or +`$HOME/go/bin` if the `GOPATH` environment variable is not set. + +## Build from Source + +Download or clone the source and run the following command from the source's root directory. + +```bash +go build -o icingadb cmd/icingadb/main.go +``` + + + diff --git a/doc/03-Configuration.md b/doc/03-Configuration.md index 472389483..093b9172b 100644 --- a/doc/03-Configuration.md +++ b/doc/03-Configuration.md @@ -1,6 +1,6 @@ # Configuration -The configuration is stored in `/etc/icingadb/config.yml`. +For package installations, the configuration is stored in `/etc/icingadb/config.yml`. See [config.example.yml](../config.example.yml) for an example configuration. ## Redis® Configuration From 40d67ea934e4508166256f04c40d1b5a9ae33055 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 7 Oct 2024 09:52:54 +0200 Subject: [PATCH 2/2] Adjust installation docs for centralized icinga.com doc injection Removes the package installation steps for the different operating systems to have them injected centrally by our icinga.com documentation tools instead, while maintaining readability and comprehensibility on GitHub and other viewers. --- doc/02-Installation.md | 252 ++------------------ doc/02-Installation.md.d/01-Amazon-Linux.md | 4 - doc/02-Installation.md.d/02-CentOS.md | 4 - doc/02-Installation.md.d/03-Debian.md | 4 - doc/02-Installation.md.d/04-RHEL.md | 4 - doc/02-Installation.md.d/05-SLES.md | 4 - doc/02-Installation.md.d/06-Ubuntu.md | 4 - 7 files changed, 21 insertions(+), 255 deletions(-) delete mode 100644 doc/02-Installation.md.d/01-Amazon-Linux.md delete mode 100644 doc/02-Installation.md.d/02-CentOS.md delete mode 100644 doc/02-Installation.md.d/03-Debian.md delete mode 100644 doc/02-Installation.md.d/04-RHEL.md delete mode 100644 doc/02-Installation.md.d/05-SLES.md delete mode 100644 doc/02-Installation.md.d/06-Ubuntu.md diff --git a/doc/02-Installation.md b/doc/02-Installation.md index 46b20c5e2..34fcb79e9 100644 --- a/doc/02-Installation.md +++ b/doc/02-Installation.md @@ -1,5 +1,4 @@ - # Installing Icinga DB The recommended way to install Icinga DB is to use prebuilt packages for @@ -24,228 +23,13 @@ which ships an up-to-date Redis® open source server version and is pre-configur we recommend to install it where the corresponding Icinga 2 node and Redis® server is running to keep latency between the components low. - - - -## Adding Icinga Package Repository - -The recommended way to install Icinga DB is to use prebuilt packages from our official release repository. - -!!! tip - - If you install Icinga DB on a node that has Icinga 2 or Icinga Web installed via packages, - proceed to [installing the Icinga DB package](#installing-icinga-db-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 update -apt -y install apt-transport-https wget - -wget -O icinga-archive-keyring.deb "https://packages.icinga.com/icinga-archive-keyring_latest+debian$( - . /etc/os-release; echo "$VERSION_ID" -).deb" - -apt install ./icinga-archive-keyring.deb - -DIST=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release); \ - echo "deb [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/debian icinga-${DIST} main" > \ - /etc/apt/sources.list.d/${DIST}-icinga.list - echo "deb-src [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/debian icinga-${DIST} main" >> \ - /etc/apt/sources.list.d/${DIST}-icinga.list - -apt 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 -``` - - - - - + +## Installing the Package -### Ubuntu Repository - - - -```bash -apt update -apt -y install apt-transport-https wget - -wget -O icinga-archive-keyring.deb "https://packages.icinga.com/icinga-archive-keyring_latest+ubuntu$( - . /etc/os-release; echo "$VERSION_ID" -).deb" - -apt install ./icinga-archive-keyring.deb - -. /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi; \ - echo "deb [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" > \ - /etc/apt/sources.list.d/${DIST}-icinga.list - echo "deb-src [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" >> \ - /etc/apt/sources.list.d/${DIST}-icinga.list - -apt update -``` - - - -## Installing Icinga DB Package - -Use your distribution's package manager to install the `icingadb` package as follows: - - - - -#### Amazon Linux 2 - - - -```bash -yum install icingadb -``` - - - - - - -#### CentOS - - -!!! info - - Note that installing Icinga DB is only supported on CentOS 7 as CentOS 8 is EOL. - -```bash -yum install icingadb -``` - - - - - - -#### Debian / Ubuntu - - - -```bash -apt install icingadb -``` - - - - - -#### RHEL 8 or Later - -```bash -dnf install icingadb -``` - -#### RHEL 7 - -```bash -yum install icingadb -``` - - - - - - -#### SLES - - - -```bash -zypper install icingadb -``` - - - +If the [repository](https://packages.icinga.com) is not configured yet, please add it first. +Then use your distribution's package manager to install the `icingadb` package +or install [from source](02-Installation.md.d/From-Source.md). + ## Setting up the Database @@ -353,22 +137,28 @@ which connects to both Redis® and the database to display and work with the mon You have completed the instructions here and can proceed to -[installing Icinga DB Web on Amazon Linux](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/01-Amazon-Linux/#installing-icinga-db-web-package), - - -[installing Icinga DB Web on CentOS](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/02-CentOS/#installing-icinga-db-web-package), +[installing Icinga DB Web on Amazon Linux](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/Amazon-Linux/#installing-icinga-db-web-package), -[installing Icinga DB Web on Debian](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/03-Debian/#installing-icinga-db-web-package), +[installing Icinga DB Web on Debian](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/Debian/#installing-icinga-db-web-package), + + +[installing Icinga DB Web on Fedora](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/Fedora/#installing-icinga-db-web-package), -[installing Icinga DB Web on RHEL](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/04-RHEL/#installing-icinga-db-web-package), +[installing Icinga DB Web on RHEL](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/RHEL/#installing-icinga-db-web-package), + + +[installing Icinga DB Web on Raspberry Pi Os](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/Raspberry-Pi-OS/#installing-icinga-db-web-package), -[installing Icinga DB Web on SLES](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/05-SLES/#installing-icinga-db-web-package), +[installing Icinga DB Web on SLES](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/SLES/#installing-icinga-db-web-package), -[installing Icinga DB Web on Ubuntu](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/06-Ubuntu/#installing-icinga-db-web-package), +[installing Icinga DB Web on Ubuntu](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/Ubuntu/#installing-icinga-db-web-package), + + +[installing Icinga DB Web on openSUSE](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/openSUSE/#installing-icinga-db-web-package), [installing Icinga DB Web From Source](https://icinga.com/docs/icinga-db-web/latest/doc/02-Installation/From-Source), @@ -378,4 +168,4 @@ which is required to run the Icinga DB web module. Below is a preview of how the interface visualizes monitoring data and also supports dark and light mode: ![Icinga DB Web](images/icingadb-dashboard.png) - + diff --git a/doc/02-Installation.md.d/01-Amazon-Linux.md b/doc/02-Installation.md.d/01-Amazon-Linux.md deleted file mode 100644 index 45a3286f4..000000000 --- a/doc/02-Installation.md.d/01-Amazon-Linux.md +++ /dev/null @@ -1,4 +0,0 @@ -# Installing Icinga DB on Amazon Linux - - - diff --git a/doc/02-Installation.md.d/02-CentOS.md b/doc/02-Installation.md.d/02-CentOS.md deleted file mode 100644 index 42ff36685..000000000 --- a/doc/02-Installation.md.d/02-CentOS.md +++ /dev/null @@ -1,4 +0,0 @@ -# Installing Icinga DB on CentOS - - - diff --git a/doc/02-Installation.md.d/03-Debian.md b/doc/02-Installation.md.d/03-Debian.md deleted file mode 100644 index 3eb3ba015..000000000 --- a/doc/02-Installation.md.d/03-Debian.md +++ /dev/null @@ -1,4 +0,0 @@ -# Installing Icinga DB on Debian - - - diff --git a/doc/02-Installation.md.d/04-RHEL.md b/doc/02-Installation.md.d/04-RHEL.md deleted file mode 100644 index 39cabce44..000000000 --- a/doc/02-Installation.md.d/04-RHEL.md +++ /dev/null @@ -1,4 +0,0 @@ -# Installing Icinga DB on RHEL - - - diff --git a/doc/02-Installation.md.d/05-SLES.md b/doc/02-Installation.md.d/05-SLES.md deleted file mode 100644 index e1915e88d..000000000 --- a/doc/02-Installation.md.d/05-SLES.md +++ /dev/null @@ -1,4 +0,0 @@ -# Installing Icinga DB on SLES - - - diff --git a/doc/02-Installation.md.d/06-Ubuntu.md b/doc/02-Installation.md.d/06-Ubuntu.md deleted file mode 100644 index d1ef557a9..000000000 --- a/doc/02-Installation.md.d/06-Ubuntu.md +++ /dev/null @@ -1,4 +0,0 @@ -# Installing Icinga DB on Ubuntu - - -