next-generation web UI for icinga
Project homepage: https://icinga.com/
Description
Icinga Web 2 is the next generation open source monitoring web interface,
framework and command-line interface developed by the Icinga Project,
supporting Icinga 2, Icinga Core and any other monitoring backend
compatible with the Livestatus Protocol.
Package information
- Ports path
- net/icinga/web2
- Package architecture
- amd64
- Maintainer
- Stuart Henderson <stu.ports@spacehopper.org>
- Categories
- net, lang/php
- Available flavors
- None listed
Ports list build and test dependencies as well as runtime dependencies. pkg_add selects those needed for installation.
Direct dependencies
Runtime
- lang/php/8.4,-intl
- net/icinga/icinga-php-library
- net/icinga/icinga-php-thirdparty
- lang/php/8.4,-pdo_mysql php-pdo_mysql->=8.4,<8.5|php-pdo_pgsql->=8.4,<8.5
- lang/php/8.4 php->=8.4,<8.5
OpenBSD README
This README contains unresolved ports variables; replace them before using its commands.
+-----------------------------------------------------------------------
| Running icinga-web2 on OpenBSD
+-----------------------------------------------------------------------
Web User Interface
==================
The main Icinga 2 program should be configured first and certain features
enabled. Communication with Icinga Web 2 requires the "command" feature to
be enabled, and also some form of database connection, either old-style
IDO with the 'ido-mysql' or 'ido-pgsql' feature, or the newer Icinga DB
with the 'icingadb' feature. Consult documentation and pkg-readme for
Icinga 2 and Icinga DB for configuration details, database schema, etc.
Check with 'icinga2 feature list' that the relevant modules are enabled.
If using Icinga DB, install the 'icingadb-web' package via pkg_add.
If using IDO, install 'icinga-web2-module-monitoring'.
The majority of Icinga Web 2 configuration is web-based and simple,
but a few things will need to be setup FIRST.
- Consult PHP package documentation to configure PHP and enable modules.
- If using PostgreSQL, install and enable php-pgsql and php-pdo_pgsql.
- If using php-fpm, configure it to run scripts as the _icingaweb2
user, and set the /tmp directory. You may add this to ${SYSCONFDIR}/php-fpm.conf:
[icingaweb2]
user = _icingaweb2
group = _icingaweb2
listen = /var/www/run/php-fpm-icingaweb2.sock
listen.owner = www
listen.group = www
listen.mode = 0660
pm = dynamic
pm.max_children = 20
pm.start_servers = 4
pm.min_spare_servers = 2
pm.max_spare_servers = 5
chroot = /var/www
env[TMP] = /icinga-web2/tmp
env[TMPDIR] = /icinga-web2/tmp
(If instead of php-fpm you use Apache with mod_php, you will need to
add the userid running PHP scripts to the _icingaweb2 group).
- Configure your webserver to pass requests to icingaweb2's front
controller. An example for nginx (remember to "rcctl reload nginx"
after adding), using the above php-fpm section:
location ~ ^/icingaweb2/index\.php(.*)$ {
fastcgi_pass unix:run/php-fpm-icingaweb2.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /icinga-web2/public/index.php;
fastcgi_param ICINGAWEB_CONFIGDIR /etc/icingaweb2;
fastcgi_param REMOTE_USER $remote_user;
}
location ~ ^/icingaweb2(.+)? {
alias /var/www/icinga-web2/public;
index index.php;
try_files $1 $uri $uri/ /icingaweb2/index.php$is_args$args;
}
For Apache httpd, configuration files are provided in
/var/www/conf/modules.sample that can be symlinked to /var/www/conf/modules.
If you use mod_php, use this:
# ln -s ../modules.sample/icingaweb2.conf /var/www/conf/modules
Or if you use for php-fpm, use this:
# ln -s ../modules.sample/icingaweb2.fpm.conf /var/www/conf/modules
And reload:
# rcctl reload apache2
An example for base httpd(8), serving directly from the root using the
above php-fpm section:
server "icinga.example.com" {
listen on * tls port 443
tls {
certificate "/etc/ssl/icinga.example.com.crt"
key "/etc/ssl/private/icinga.example.com.key"
}
root "/icinga-web2/public"
directory index "index.php"
location "*.php*" {
fastcgi socket "/run/php-fpm-icingaweb2.sock"
fastcgi param ICINGAWEB_CONFIGDIR "/etc/icingaweb2"
}
location not found "*" {
request rewrite "/index.php?$QUERY_STRING"
}
}
- Using icingacli, create the config directory and a token to allow setup:
# /var/www/icinga-web2/bin/icingacli setup config directory --group _icingaweb2
# /var/www/icinga-web2/bin/icingacli setup token create
- Open the web interface http://localhost/icingaweb2/. Paste in the token
that was displayed on-screen in the above step and proceed to the web-based
part of the configuration.
Used by (4 dependency relationships)
Includes library, runtime, build and test dependencies.