diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:29:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:29:16 +0000 |
commit | 8a985929ed84cdb458a13c66b25f84e41133b24f (patch) | |
tree | 102a3d6e3cb731c6d23263095d0098f99572626d /doc/02-Installation.md | |
parent | Adding upstream version 0.10.0. (diff) | |
download | icingaweb2-module-reporting-8a985929ed84cdb458a13c66b25f84e41133b24f.tar.xz icingaweb2-module-reporting-8a985929ed84cdb458a13c66b25f84e41133b24f.zip |
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/02-Installation.md')
-rw-r--r-- | doc/02-Installation.md | 69 |
1 files changed, 21 insertions, 48 deletions
diff --git a/doc/02-Installation.md b/doc/02-Installation.md index fe4b8e4..8b04fff 100644 --- a/doc/02-Installation.md +++ b/doc/02-Installation.md @@ -1,40 +1,42 @@ -# Installation +# Installing Icinga Reporting + +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 `reporting` as the module name. The following requirements must also be met. ## Requirements -* PHP (>= 7.0) -* Icinga Web 2 (>= 2.9) -* Icinga Web 2 libraries: - * [Icinga PHP Library (ipl)](https://github.com/Icinga/icinga-php-library) (>= 0.8) - * [Icinga PHP Thirdparty](https://github.com/Icinga/icinga-php-thirdparty) (>= 0.10) -* Icinga Web 2 modules: - * [Icinga PDF Export](https://github.com/Icinga/icingaweb2-module-pdfexport) (>= 0.10) -* MySQL / MariaDB or PostgreSQL +* PHP (≥7.2) +* MySQL or PostgreSQL PDO PHP libraries +* The following PHP modules must be installed: `mbstring` +* [Icinga Web](https://github.com/Icinga/icingaweb2) (≥2.9) +* [Icinga PHP Library (ipl)](https://github.com/Icinga/icinga-php-library) (≥0.13.0) +* [Icinga PHP Thirdparty](https://github.com/Icinga/icinga-php-thirdparty) (≥0.12.0) -## Database Setup +## Setting up the Database -### MySQL / MariaDB +### Setting up a MySQL or MariaDB Database -The module needs a MySQL/MariaDB database with the schema that's provided in the `etc/schema/mysql.sql` file. +The module needs a MySQL/MariaDB database with the schema that's provided in the `schema/mysql.schema.sql` file. -Example command for creating the MySQL/MariaDB database. Please change the password: +You can use the following sample command for creating the MySQL/MariaDB database. Please change the password: ``` CREATE DATABASE reporting; -GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON reporting.* TO reporting@localhost IDENTIFIED BY 'secret'; +GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE, ALTER, CREATE VIEW, INDEX, EXECUTE ON reporting.* TO reporting@localhost IDENTIFIED BY 'secret'; ``` After, you can import the schema using the following command: ``` -mysql -p -u root reporting < schema/mysql.sql +mysql -p -u root reporting < /usr/share/icingaweb2/modules/reporting/schema/mysql.schema.sql ``` -## PostgreSQL +## Setting up a PostgreSQL Database -The module needs a PostgreSQL database with the schema that's provided in the `etc/schema/postgresql.sql` file. +The module needs a PostgreSQL database with the schema that's provided in the `schema/pgsql.schema.sql` file. -Example command for creating the PostgreSQL database. Please change the password: +You can use the following sample command for creating the PostgreSQL database. Please change the password: ```sql CREATE USER reporting WITH PASSWORD 'secret'; @@ -48,36 +50,7 @@ CREATE DATABASE reporting After, you can import the schema using the following command: ``` -psql -U reporting reporting -a -f schema/postgresql.sql +psql -U reporting reporting -a -f /usr/share/icingaweb2/modules/reporting/schema/pgsql.schema.sql ``` -## Module Installation - -1. Install it [like any other module](https://icinga.com/docs/icinga-web-2/latest/doc/08-Modules/#installation). -Use `reporting` as name. - -2. Once you've set up the database, create a new Icinga Web 2 resource for it using the -`Configuration -> Application -> Resources` menu. Make sure that you set the character set to `utf8mb4`. - -3. The next step involves telling the Reporting module which database resource to use. This can be done in -`Configuration -> Modules -> reporting -> Backend`. If you've used `reporting` as name for the resource, -you can skip this step. - This concludes the installation. Now continue with the [configuration](03-Configuration.md). - -## Scheduler Daemon - -There is a daemon for generating and distributing reports on a schedule if configured: - -``` -icingacli reporting schedule run -``` - -This command schedules the execution of all applicable reports. - -You may configure this command as `systemd` service. Just copy the example service definition from -`config/systemd/icinga-reporting.service` to `/etc/systemd/system/icinga-reporting.service` and enable it afterwards: - -``` -systemctl enable icinga-reporting.service -``` |