Upcoming Events

Installation

Requirements

  • Icinga Web 2 (>= 2.5)
  • PHP (>= 5.6, preferably 7.x)
  • php-soap
  • php-posix
  • MySQL (>= 5.6) or MariaDB (>= 5.5.3)
  • Icinga Web 2 modules:
  • reactbundle (>= 0.4) (Icinga Web 2 module)
  • Icinga PHP Library (ipl) (>= 0.1) (Icinga Web 2 module)
  • incubator (>= 0.1) (Icinga Web 2 module)
  • Icinga Director (>= v1.6 or current master)

Hint: this module will hook into Icinga Director, but shouldn’t depend on it at all. Currently it is based on some libraries provided by the Director, that’s why you need to have a very recent version installed. We will ship those libraries separately in the near future to get rid of this dependency.

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.

Installation from .tar.gz

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.0.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

Installation from GIT repository

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.

Database

Create an empty database on MariaDB (or MySQL)

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:

/etc/icingaweb2/resources.ini

[vSphereDB]
type = "db"
db = "mysql"
host = "localhost"
; port = 3306
dbname = "vspheredb"
username = "vspheredb"
password = "***"
charset = "utf8mb4"

Tell vSphereDB about it’s database

In the module’s config.ini (usually /etc/icingaweb2/module/vspheredb/config.ini) you need to reference above DB connection:

[db]
resource = "vSphereDB"

Enable the newly installed module

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:

Enable the vSphere module

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)

Enabling and running the background daemon

For now, you need to run one daemon per vCenter. This will change in the final version.

Once you played around with this modules and everything works fine when running on commandline, time has come to enable a background daemon synchronizing your vCenter to our vSphereDb.

cp contrib/systemd/icinga-vspheredb.service  /etc/systemd/system/
systemctl daemon-reload
systemctl enable icinga-vspheredb
systemctl start icinga-vspheredb

That’s it, your daemon should now be running. Feel free to configure as many vCenter Servers as you want, each of them with a distinct systemd service instance.