- Icinga Web 2 (>= 2.5)
- PHP (>= 5.6, preferably 7.x - 64bit only)
- php-soap
- php-pcntl (might already be built into your PHP binary)
- php-posix (on RHEL/CentOS this is php-process, or rh-php7x-php-process)
- MySQL (>= 5.6) or MariaDB (>= 5.5.3)
- The following Icinga modules must be installed and enabled:
- ipl (>=0.4.0)
- incubator (>=0.5.0)
- reactbundle (>=0.7.0)
Once you got Icinga Web 2 up and running, all required dependencies should
already be there. All, but php-soap
and php-posix
. They are available on
all major Linux distributions and can be installed with your package manager
(yum, apt...). Same goes also for non-Linux systems. Please do not forget to
restart your web server service afterwards.
Download the latest version and extract it to a folder named
vspheredb
in one of your Icinga Web 2 module path directories.
You might want to use a script as follows for this task:
ICINGAWEB_MODULEPATH="/usr/share/icingaweb2/modules"
REPO_URL="https://github.com/Icinga/icingaweb2-module-vspheredb"
TARGET_DIR="${ICINGAWEB_MODULEPATH}/vspheredb"
MODULE_VERSION="1.1.0"
URL="${REPO_URL}/archive/v${MODULE_VERSION}.tar.gz"
install -d -m 0755 "${TARGET_DIR}"
wget -q -O - "$URL" | tar xfz - -C "${TARGET_DIR}" --strip-components 1
Another convenient method is the installation directly from our GIT repository. Just clone the repository to one of your Icinga Web 2 module path directories. It will be immediately ready for use:
ICINGAWEB_MODULEPATH="/usr/share/icingaweb2/modules"
REPO_URL="https://github.com/Icinga/icingaweb2-module-vspheredb"
TARGET_DIR="${ICINGAWEB_MODULEPATH}/vspheredb"
git clone "${REPO_URL}" "${TARGET_DIR}"
You can now directly use our current GIT master or check out a specific version.
HINT: You should replace some-password
with a secure custom password.
mysql -e "CREATE DATABASE vspheredb CHARACTER SET 'utf8mb4' COLLATE utf8mb4_bin;
GRANT ALL ON vspheredb.* TO vspheredb@localhost IDENTIFIED BY 'some-password';"
In your web frontend please go to Configuration / Application / Resources
and create a new database resource pointing to your newly created database.
Please make sure that you choose utf8mb4
as an encoding.
Alternatively, you could also manally add a resource definition to your resources.ini:
[vSphereDB]
type = "db"
db = "mysql"
host = "localhost"
; port = 3306
dbname = "vspheredb"
username = "vspheredb"
password = "***"
charset = "utf8mb4"
In the module's config.ini (usually /etc/icingaweb2/modules/vspheredb/config.ini
)
you need to reference above DB connection:
[db]
resource = "vSphereDB"
Enable the vspheredb
module either on the CLI by running...
icingacli module enable vspheredb
...or go to your Icinga Web 2 frontend, choose Configuration
-> Modules
-> vspheredb
module - and enable
it:
Now please:
- Eventually SHIFT-Reload your browser window to get a fresh CSS/JS bundle
- Got to
Virtualization (VMware)
choose your DB resource and create the schema - Enable the background daemon (see below)
The preferred method of running the Background Daemon is via SystemD. We ship
a sample Unit File, so if you have an icingaweb2
User on your system all you
need to do is:
cp contrib/systemd/icinga-vspheredb.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable icinga-vspheredb
systemctl start icinga-vspheredb
Otherwise please use a member of the icingaweb2
group like apache
or
www-data
. You might also want to create a new dedicated User with read
permissions for /etc/icingaweb2
.
That's it, your daemon should now be running. Feel free to configure as many vCenter Servers as you want.
When not running SystemD you're on your own, the command you're looking for is:
/usr/bin/icingacli vspheredb daemon run