Coder Social home page Coder Social logo

icinga / icingaweb2-module-vspheredb Goto Github PK

View Code? Open in Web Editor NEW
99.0 32.0 32.0 8.52 MB

The easiest way to monitor a VMware vSphere environment.

Home Page: https://icinga.com/docs/vsphere/latest

License: GNU General Public License v2.0

PHP 97.93% JavaScript 0.32% HTML 0.03% Less 1.72%
vmware vmware-vsphere icinga icingaweb2 modules monitoring

icingaweb2-module-vspheredb's Introduction

Icinga vSphere® Integration

The easiest way to monitor a VMware vSphere environment. Configure a connection to your VMware vCenter® or VMware ESXi™ host and you're ready to go. This module provides a lot of context, deep insight and great oversight. Fast drill-down possibilities, valuable hints and reports.

You'll immediately see all your Host Systems, Virtual Machines, Data Stores and much more pop up in your Icinga Web 2 frontend. This alone is already very helpful, but there is more. This module:

  • provides an Import Source for the Icinga Director
  • hooks into the Monitoring module and shows related information next to your monitored Hosts
  • provides Reports, helping to track down anomalies or configuration errors
  • replicates the most interesting parts of your Event- and Alarm History

We currently support all VMware versions from 5.5.x to 8.0.x, and did I mention that all this is 100% free Open Source Software? Convinced? Then let's get started!

When Upgrading please read our Changelog.

Motivation

Why yet another tool to monitor your virtualization platform, one might ask. There are plenty of VMware-related Check-Plugins available for Icinga since a long time. So why all the effort for writing yet another piece of software?

First of all, many existing Plugins are facing similar problems with Session handling and conflicts related to vendor libraries, system libraries or a combination of both. Also, they tend to be pretty expensive, as they are forced to rediscover large parts of your vCenter or ESXi host on every single check execution.

This module differs substantially as it:

  • does not depend on vendor (VMware) libraries
  • replicates your discovered objects in it's own database

Those two main design decisions allow us to show and monitor many more details while putting much less burden on your virtualization platform.

Screenshots

All your vCenters (or ESXi connections)

vCenter Overview

Single vCenter overview

vSphereDB Dashlets

Host Details

Host Details

VM Dashboard in Grafana

VM Grafana Dashboard

Datastore Inspection

VMware vSphere Datastores

icingaweb2-module-vspheredb's People

Contributors

ascii42 avatar bobapple avatar dcacklam avatar dgoetz avatar esodesod avatar frdmn avatar lippserd avatar mcodato avatar moreamazingnick avatar mwaldmueller avatar nilmerg avatar rincewindshat avatar slalomsk8er avatar thomas-gelf avatar virsacer avatar widhalmt avatar yhabteab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

icingaweb2-module-vspheredb's Issues

Permissions for non privileged users

Expected Behavior

There should be a way to define privileged and non privileged users in terms of the 'Configuration' tab and who has visibility or not and who can add, modify, delete vsphere/esx servers

Current Behavior

I'm not sure if I'm testing this right but I added a 'test' user to my Icinga with access only to the vsphere module, and when going into the configuration tab I get this error:

Fatal error: Uncaught ErrorException: Uncaught ErrorException: Creating default object from empty value in /usr/share/php/Icinga/Web/Controller/ActionController.php:127 Stack trace:
#0 /usr/share/php/Icinga/Web/Controller/ActionController.php(127): Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(2, 'Creating defaul...', '/usr/share/php/...', 127, Array)
#1 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(59): Icinga\Web\Controller\ActionController->__construct(Object(Icinga\Web\Request), Object(Icinga\Web\Response), Array)
#2 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#3 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#4 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch()
#5 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...' in /usr/share/icingaweb2/library/vendor/Zend/Controller/Plugin/Broker.php on line 259

Possible Solution

Find a way to add permissions, can we leverage the roles built into Icingaweb2?

Steps to Reproduce (for bugs)

Create test account with access only to vsphere module, then go into the configure tab.

Your Environment

  • VMware vCenter®/ESXi™-Version: 6.7
  • Version/GIT-Hash of this module: 75b36eb
  • Icinga Web 2 version: 2.6.1
  • Operating System and version: Ubuntu 16.04
  • Webserver, PHP versions: Apache/2.4.18 PHP 7.0.32-0ubuntu0.16.04.1

Add show number of lines in VM view and others?

Expected Behavior

To be able to select the number of objects displayed on a page

Current Behavior

It looks like the number of objects displayed is hard coded to 25

Possible Solution

If there could be a dropdown similar to in other Icingaweb2 tabs to select the number of visible objects

image

Provide a Hook for Backup tools

There are different Backup tools available for VMware. This module should provide generic tables collecting information about latest backup runs and also a backup history. Each BackupTool implementation can then ship as much information as possible and eventually visualize more than that.

In addition to this, sample implementations for some backup utilities should be shipped with vspheredb.

vspheredb_backuptools

Feature Request: Add support for pgsql backend

Hi,

our default database backend system is pgsql, so we use it for all icinga related components.
It causes additional effort, but so far pgsql works quite well with all icinga related components.

So it would be nice if support for pgsql could be added.

One side note: In MariaDB/MySQL you have to mess around with UTF8mb4 if you want 4-byte support, which is default in PostgreSQL UTF8.

Thank you

Greetings René

documentation for all necessary dependencies

We need better installation documentation.
Very important here are the necessary dependencies for a clean system.

For example, more dependencies have to be installed over a composer:

/usr/share/webapps/icingaweb2-2.6.1/modules/incubator # composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information


  [RuntimeException]
  Failed to clone https://github.com/gipfl/calendar, git was not found, check that it is installed and in your PATH env.

  sh: git: not found

I could find corresponding composer.json files here:

incubator/composer.json
ipl/composer.json
reactbundle/composer.json

502 using a Proxy Connection

[root@lim-vt21 reactbundle]# /usr/bin/icingacli vspheredb daemon run --trace --debug
Ready to run
DB configuration loaded
Reconnecting to DB
Connected to the database
vCenter ID=1 is now starting
Constructing ServerRunner
Starting for vCenterID=
Initializing vCenter for vc6-vp01
Loading sdk/vimService.wsdl
CURL ERROR: Received HTTP code 502 from proxy after CONNECT
Pid 20000 stopped

Proxy related error. The proxy Settings i set in the konfiguration of VSphere seams to be ignored ?!

greetings

Lukas

Originally posted by @lokidaibel in #23 (comment)

All transactions should be rolled back on any Exception

We currently catch DB-Exceptions in various places and cleanly roll back any pending transaction. Problem is that our assumption is sometimes wrong, there might be non-DB-related Exceptions that could bypass our Exception handling - leaving the transaction in an open state.

See #23 for such an example.

Fatal error installation

Hello,

I am having a problem with the installation over CentOS 7:

Fatal error: Uncaught ErrorException: Uncaught ErrorException: Creating default object from empty value in /usr/share/php/Icinga/Web/Controller/ActionController.php:127 Stack trace: #0 /usr/share/php/Icinga/Web/Controller/ActionController.php(127): Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(2, 'Creating defaul...', '/usr/share/php/...', 127, Array) #1 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(59): Icinga\Web\Controller\ActionController->__construct(Object(Icinga\Web\Request), Object(Icinga\Web\Response), Array) #2 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #3 /usr/share/php/Icinga/Application/Web.php(409): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #4 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch() #5 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...' in /usr/share/icingaweb2/library/vendor/Zend/Controller/Plugin/Broker.php on line 259

Icingaweb2 version: r2.8.4-1

Any idea?

MySQL schema import error

Hi,

first of all: nice work. I love it!

I created the database and want to import the schema, but I've got an error:

ERROR 1171 (42000) at line 368: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead

Same at line 402

ERROR 1171 (42000) at line 402: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead

If I set the entry from "DEFAULT NULL" to "UNIQUE" the import works fine.

  • Ubuntu Server 16.04.5 x64
  • MySQL Version 14.14 Distrib 5.7.23
  • Icinga2 r2.9.1-1
  • Icingaweb2 2.6.1
  • IcingaDirector Git -> master
  • Icinga Reactbundle Git -> stabel/0.3.0
  • Icinga vSphereDB Git -> master

propertycollector got no return value if esxi host doesn't have any virtual machines

hello tom,

i've just setup a brand new esxi host (v6.7.0) and got a strack trace when running the daemon mode with debug output. the esxi host isn't full configured and doesn't have any virtual machines until yet.

icingacli vspheredb daemon run --vCenterId 1 --debug --trace
MainRunner::initialize()
Getting sub dir 10.154.20.150
SOAPClient: got 2.73 KiB response in 30.73ms
Loaded VCenter information for vCenter id=1 from DB
Ready to fetch id/name/parent list
SOAPClient: got 1135.00 B response in 1008.85ms
Sending Login request to https://10.154.20.150/sdk
Got new session cookie from VCenter
SOAPClient: got 820.00 B response in 24.48ms
SOAPClient: got 4.06 KiB response in 1019.85ms
Got id/name/parent for 11 objects
Storing object tree to DB
Committed 11 objects
Loading existing HostSystem from DB
Got 0 existing HostSystem
SOAPClient: got 2.81 KiB response in 1037.07ms
Got 1 HostSystem from VCenter
Ready to store HostSystem
HostSystem: 1 new, 0 modified, 0 deleted (got 1 from API)
Loading existing VirtualMachine from DB
Got 0 existing VirtualMachine
SOAPClient: got 402.00 B response in 1008.07ms
Icinga\Exception\IcingaException in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/PropertyCollector.php:85 with message: Got no returnval
#0 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/PropertyCollector.php(32): Icinga\Module\Vspheredb\PropertyCollector->makeNiceResult(Object(stdClass))
#1 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/PropertyCollector.php(57): Icinga\Module\Vspheredb\PropertyCollector->collectProperties(Array)
#2 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/DbObject/VirtualMachine.php(122): Icinga\Module\Vspheredb\PropertyCollector->collectObjectProperties(Object(Icinga\Module\Vsphere
db\PropertySet\PropertySet), Object(Icinga\Module\Vspheredb\SelectSet\VirtualMachineSelectSet))
#3 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/DbObject/BaseDbObject.php(307): Icinga\Module\Vspheredb\DbObject\VirtualMachine::fetchAllFromApi(Object(Icinga\Module\Vspheredb\A
pi))
#4 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(195): Icinga\Module\Vspheredb\DbObject\BaseDbObject::syncFromApi(Object(Icinga\Module\Vspheredb\DbObject\VCenter))
#5 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(84): Icinga\Module\Vspheredb\MainRunner->syncAllObjects()
#6 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(408): Icinga\Module\Vspheredb\MainRunner->Icinga\Module\Vspheredb\{closure}()
#7 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(85): Icinga\Module\Vspheredb\MainRunner->runFailSafe(Object(Closure))
#8 [internal function]: Icinga\Module\Vspheredb\MainRunner->Icinga\Module\Vspheredb\{closure}()
#9 /usr/share/icingaweb2/modules/reactbundle/vendor/react/event-loop/src/Tick/FutureTickQueue.php(46): call_user_func(Object(Closure))
#10 /usr/share/icingaweb2/modules/reactbundle/vendor/react/event-loop/src/StreamSelectLoop.php(175): React\EventLoop\Tick\FutureTickQueue->tick()
#11 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(155): React\EventLoop\StreamSelectLoop->run()
#12 /usr/share/icingaweb2/modules/vspheredb/application/clicommands/DaemonCommand.php(24): Icinga\Module\Vspheredb\MainRunner->run()
#13 /usr/share/php/Icinga/Cli/Loader.php(265): Icinga\Module\Vspheredb\Clicommands\DaemonCommand->runAction()
#14 /usr/share/php/Icinga/Application/Cli.php(149): Icinga\Cli\Loader->dispatch()
#15 /usr/share/php/Icinga/Application/Cli.php(139): Icinga\Application\Cli->dispatchOnce()
#16 /usr/bin/icingacli(7): Icinga\Application\Cli->dispatch()
#17 {main}
Resetting vSphereDB main runner for vCenter id=1
SOAPClient: got 378.00 B response in 5.64ms
Closed database connection for vCenter id=1
MainRunner::initialize()

want to tell you because the host and datastore won't appear in icingaweb2.

regards,
David

Your Environment

  • vSphereDB version: 64c098f
  • Icinga Web 2 version and modules (System - About): 2.5.3
  • Icinga 2 version (icinga2 --version): r2.8.4-1
  • Operating System and version: Debian Jessie 9.4 (4.9.0-6-amd64)
  • Webserver, PHP versions: Apache2 2.4.25-3+deb9u4 + PHP 7.0.27-0+deb9u1

vmware tools running/up to date/version

Is it possible to pull from vcenter/esxi if vmware tools are running, are current, and what version are running on VMs? If so this would be great to have!

Select/save default columns

Expected Behavior

It would be interesting if when adding columns to a view that the interface would remember which columns you added. Or, there could be a save button or a way to change the default columns

Current Behavior

Every time you change page, ie, vm list -> host -> vm list the columns reset to default.

Possible Solution

Have the interface remember added/removed columns or add a save button.

Steps to Reproduce (for bugs)

Add a column, go to another page, and then go back and the chosen column(s) are gone

Your Environment

  • Version/GIT-Hash of this module: 0db34d6
  • Icinga Web 2 version: 2.6.1
  • Operating System and version: Ubuntu 18.04 LTS
  • Webserver, PHP versions: 7.1

Check dependencies at startup and give guidance

Expected Behavior

The Daemon should check it's dependencies at startup time and give user-friendly hints if anything is missing.

Current Behavior

It can fail with messages that are hard to understand. See #21 for an example.

make systemd dependency optional

Expected Behavior

/usr/bin/icingacli vspheredb daemon run has no depency to systemd

Current Behavior

In many (of my) environments is no systemd available. (For example, devuan, gentoo, alpine, all type of container (docker, rkt))
This module should be work, but the system daemon has an hard depency to systemd (gipfl\SystemD\NotifySystemD) for handle notifications for this deamon.

Possible Solution

Make it optional, or remove this dependency.

Daemon SQL Exception

Hello Tom,
I am getting some exceptions when running the daemon.
I'm not sure but it looks like I may have some exceptionally long hardware related values.

Icinga\Exception\IcingaException in /usr/share/icingaweb2/modules/director/library/Director/Data/Db/DbObject.php:812 with message: Storing vm_hardware[] failed: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'summary' at row 1, query was: INSERT INTO vm_hardware (vm_uuid, hardware_key, bus_number, unit_number, controller_key, label, summary, vcenter_uuid) VALUES (?, ?, ?, ?, ?, ?, ?, ?) {array ( 'vm_uuid' => '}��YL�%Z8�L���,�' . "\0" . 'O�', 'hardware_key' => 16000, 'bus_number' => NULL, 'unit_number' => 0, 'controller_key' => 15000, 'label' => 'CD/DVD drive 1', 'summary' => 'ISO [BTP_Infrastructure_01] ISOs/Operating Systems/SW_DVD9_Win_Svr_STD_Core_and_DataCtr_Core_2016_64Bit_English_-3_MLF_X21-30350.ISO', 'vcenter_uuid' => '�Q��q3DY��������', )} #0 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Sync/SyncHelper.php(41): Icinga\Module\Director\Data\Db\DbObject->store() #1 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Sync/SyncVmHardware.php(97): Icinga\Module\Vspheredb\Sync\SyncVmHardware->storeObjects(Object(Zend_Db_Adapter_Pdo_Mysql), Array, Array) #2 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(287): Icinga\Module\Vspheredb\Sync\SyncVmHardware->run() #3 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(89): Icinga\Module\Vspheredb\MainRunner->syncVmHardware() #4 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(408): Icinga\Module\Vspheredb\MainRunner->Icinga\Module\Vspheredb\{closure}() #5 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(90): Icinga\Module\Vspheredb\MainRunner->runFailSafe(Object(Closure)) #6 [internal function]: Icinga\Module\Vspheredb\MainRunner->Icinga\Module\Vspheredb\{closure}() #7 /usr/share/icingaweb2/modules/reactbundle/vendor/react/event-loop/src/Tick/FutureTickQueue.php(46): call_user_func(Object(Closure)) #8 /usr/share/icingaweb2/modules/reactbundle/vendor/react/event-loop/src/StreamSelectLoop.php(175): React\EventLoop\Tick\FutureTickQueue->tick() #9 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(155): React\EventLoop\StreamSelectLoop->run() #10 /usr/share/icingaweb2/modules/vspheredb/application/clicommands/DaemonCommand.php(24): Icinga\Module\Vspheredb\MainRunner->run() #11 /usr/share/php/Icinga/Cli/Loader.php(265): Icinga\Module\Vspheredb\Clicommands\DaemonCommand->runAction() #12 /usr/share/php/Icinga/Application/Cli.php(149): Icinga\Cli\Loader->dispatch() #13 /usr/share/php/Icinga/Application/Cli.php(139): Icinga\Application\Cli->dispatchOnce() #14 /usr/bin/icingacli(7): Icinga\Application\Cli->dispatch() #15 {main}

I also get this one, I believe that they are most likely related, if so I will open a second issue.
Icinga\Exception\IcingaException in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/PropertyCollector.php:85 with message: Got no returnval #0 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/PropertyCollector.php(32): Icinga\Module\Vspheredb\PropertyCollector->makeNiceResult(Object(stdClass)) #1 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/PropertyCollector.php(57): Icinga\Module\Vspheredb\PropertyCollector->collectProperties(Array) #2 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Sync/SyncHostSensors.php(20): Icinga\Module\Vspheredb\PropertyCollector->collectObjectProperties(Object(Icinga\Module\Vspheredb\PropertySet\PropertySet), Object(Icinga\Module\Vspheredb\SelectSet\HostSystemSelectSet)) #3 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(281): Icinga\Module\Vspheredb\Sync\SyncHostSensors->run() #4 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(99): Icinga\Module\Vspheredb\MainRunner->syncHostSensors() #5 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(408): Icinga\Module\Vspheredb\MainRunner->Icinga\Module\Vspheredb\{closure}() #6 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(100): Icinga\Module\Vspheredb\MainRunner->runFailSafe(Object(Closure)) #7 [internal function]: Icinga\Module\Vspheredb\MainRunner->Icinga\Module\Vspheredb\{closure}() #8 /usr/share/icingaweb2/modules/reactbundle/vendor/react/event-loop/src/Tick/FutureTickQueue.php(46): call_user_func(Object(Closure)) #9 /usr/share/icingaweb2/modules/reactbundle/vendor/react/event-loop/src/StreamSelectLoop.php(175): React\EventLoop\Tick\FutureTickQueue->tick() #10 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(155): React\EventLoop\StreamSelectLoop->run() #11 /usr/share/icingaweb2/modules/vspheredb/application/clicommands/DaemonCommand.php(24): Icinga\Module\Vspheredb\MainRunner->run() #12 /usr/share/php/Icinga/Cli/Loader.php(265): Icinga\Module\Vspheredb\Clicommands\DaemonCommand->runAction() #13 /usr/share/php/Icinga/Application/Cli.php(149): Icinga\Cli\Loader->dispatch() #14 /usr/share/php/Icinga/Application/Cli.php(139): Icinga\Application\Cli->dispatchOnce() #15 /usr/bin/icingacli(7): Icinga\Application\Cli->dispatch() #16 {main}

Thank you in advance for your help

My Environment

  • Director version: master
  • vSphereDB version: master
  • Icinga Web 2 version: 2.5.3
  • Icinga 2 Version r2.8.1-1
  • Operating System: Ubuntu 16.04.3 LTS (4.4.0-116-generic)
  • Webserver, PHP Versions: Apache/2.4.18 (Ubuntu) + PHP 7.0.28-0

Problem to start the deamon

Expected Behavior

If i type the following command: /usr/bin/icingacli vspheredb daemon run. The Daemon dont start and give errors. Also with systemctl start icinga-vspheredb. The same output. The Output is:

`PHP Fatal error: Uncaught Error: Class 'gipfl\SystemD\NotifySystemD' not found in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Daemon/Daemon.php:80
Stack trace:
#0 /usr/share/icingaweb2/modules/vspheredb/application/clicommands/DaemonCommand.php(26): Icinga\Module\Vspheredb\Daemon\Daemon->run()
#1 /usr/share/php/Icinga/Cli/Loader.php(265): Icinga\Module\Vspheredb\Clicommands\DaemonCommand->runAction()
#2 /usr/share/php/Icinga/Application/Cli.php(149): Icinga\Cli\Loader->dispatch()
#3 /usr/share/php/Icinga/Application/Cli.php(139): Icinga\Application\Cli->dispatchOnce()
#4 /usr/bin/icingacli(7): Icinga\Application\Cli->dispatch()
#5 {main}
thrown in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Daemon/Daemon.php on line 80

Fatal error: Uncaught Error: Class 'gipfl\SystemD\NotifySystemD' not found in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Daemon/Daemon.php:80
Stack trace:
#0 /usr/share/icingaweb2/modules/vspheredb/application/clicommands/DaemonCommand.php(26): Icinga\Module\Vspheredb\Daemon\Daemon->run()
#1 /usr/share/php/Icinga/Cli/Loader.php(265): Icinga\Module\Vspheredb\Clicommands\DaemonCommand->runAction()
#2 /usr/share/php/Icinga/Application/Cli.php(149): Icinga\Cli\Loader->dispatch()
#3 /usr/share/php/Icinga/Application/Cli.php(139): Icinga\Application\Cli->dispatchOnce()
#4 /usr/bin/icingacli(7): Icinga\Application\Cli->dispatch()
#5 {main}
thrown in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Daemon/Daemon.php on line 80
`

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Your Environment

  • VMware vCenter®/ESXi™-Version: ESXi 6.7 and ESXi 6.5
  • Version/GIT-Hash of this module:
  • Icinga Web 2 version: 2.5.0
  • Operating System and version: Debian 9.4
  • Webserver, PHP versions: Apache 2.4, PHP 7.0

CTRL-C shows an error where there is no such

Expected Behavior

CTRL-C issues a clean shutdown

Current Behavior

Shutdown works fine, but an error is shown. It's mostly a cosmetic error, but I do not want to see unnecessary errors:

Shutting down
Ignored an error while closing the DB connection: A transition from connected to disconnected is not allowed

Possible solution

Fix allowed transitions.

PHP Fatal error

Expected Behavior

Daemon start and begin to pull data

Current Behavior

Daemon dies during startup with PHP-Error

Steps to Reproduce (for bugs)

Installation from https://github.com/Icinga/icingaweb2-module-vspheredb/blob/master/doc/01-Installation.md works fine. I had a bit trouble with the needed user (icinga is running as nagios, nagios is member of www-data) and Configfiles (/etc/icingaweb2/... is readabe for www-data)
When i try to start the daemon, i get

PHP Fatal error: Uncaught Error: Class 'React\EventLoop\Factory' not found in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Daemon/Daemon.php:75

I installed (to be sure) https://github.com/Icinga/icingaweb2-module-reactbundle but it didn't help.

Command:
icingacli vspheredb daemon run --trace --debug

Errormessage:
`PHP Fatal error: Uncaught Error: Class 'React\EventLoop\Factory' not found in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Daemon/Daemon.php:75
Stack trace:
#0 /usr/share/icingaweb2/modules/vspheredb/application/clicommands/DaemonCommand.php(26): Icinga\Module\Vspheredb\Daemon\Daemon->run()
#1 /usr/share/php/Icinga/Cli/Loader.php(265): Icinga\Module\Vspheredb\Clicommands\DaemonCommand->runAction()
#2 /usr/share/php/Icinga/Application/Cli.php(149): Icinga\Cli\Loader->dispatch()
#3 /usr/share/php/Icinga/Application/Cli.php(139): Icinga\Application\Cli->dispatchOnce()
#4 /usr/bin/icingacli(7): Icinga\Application\Cli->dispatch()
#5 {main}
thrown in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Daemon/Daemon.php on line 75

Fatal error: Uncaught Error: Class 'React\EventLoop\Factory' not found in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Daemon/Daemon.php:75
Stack trace:
#0 /usr/share/icingaweb2/modules/vspheredb/application/clicommands/DaemonCommand.php(26): Icinga\Module\Vspheredb\Daemon\Daemon->run()
#1 /usr/share/php/Icinga/Cli/Loader.php(265): Icinga\Module\Vspheredb\Clicommands\DaemonCommand->runAction()
#2 /usr/share/php/Icinga/Application/Cli.php(149): Icinga\Cli\Loader->dispatch()
#3 /usr/share/php/Icinga/Application/Cli.php(139): Icinga\Application\Cli->dispatchOnce()
#4 /usr/bin/icingacli(7): Icinga\Application\Cli->dispatch()
#5 {main}
thrown in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Daemon/Daemon.php on line 75
`

Your Environment

  • VMware vCenter®/ESXi™-Version: 6.5
  • Version/GIT-Hash of this module: current master
  • Icinga Web 2 version: 2.6.1
  • Operating System and version: Debian 9
  • Webserver: Apache2 2.4.25
  • PHP versions: 7

Not all imported Hosts and VMs displayed

Expected Behavior

Imported ESX-Host/VCenter shown on icingaweb including all recorded guests and data stores

Current Behavior

On daemon run ESX hosts including their guest systems get regularly refreshed and stored into vspheredb. For some vcenter/host and related guest the records are not shown on icingaweb2 though data is available on vspheredb.

MariaDB [vspheredb]> select uuid, host_name, vcenter_uuid from host_system;
+----------------------+---------------------------------+------------------+
| uuid | host_name | vcenter_uuid |
+----------------------+---------------------------------+------------------+
▒▒H▒C▒読<▒▒O{▒▒ | XXXXXXXXXXXXXXXXXXXXXXXXXX | ▒▒▒иe▒MB▒{▒▒+▒▒ |
| Q(▒▒▒({f▒tZ֑:q▒ | XXXXXXXXXXXXXXXXXXXXXXXXXX | O▒u5s▒Ϸ▒▒n y * |
+----------------------+---------------------------------+------------------+

First line contains the host which is not displayed, the host on the second line is displayed on the console.

Your Environment

  • VMware vCenter®/ESXi™-Version: VMware ESXi 5.5.0 build-2068190
  • Version/GIT-Hash of this module: 1.02
  • Icinga Web 2 version: 2.6.1

Event/Alarm Timestamp too far on the right side

Expected Behavior

To easily see the timestamp in the alarm/event page

Current Behavior

I find that the timestamp is too hidden on the right side, especially if the event text is long, you need to scroll the window to find int

Possible Solution

It would be better to have the timestamp column on the left hand side of the page instead of the right

SQL Import -> Data too long for column

Expected Behavior

The import of the host should be carried out

Current Behavior

After the first start of the daemon with "icingacli vspheredb daemon run", the connection to the vCenter is successfully established. The query of the host is also successful, but an import into the SQL DB is not possible because of the following error:

2018-11-11 09:28:28: Got 1 HostSystem from VCenter
2018-11-11 09:28:28: Ready to store HostSystem
2018-11-11 09:28:28: Storing host_system[XXXXXX] failed: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'bios_version' at row 1, query was: INSERT INTO host_system (uuid, vcenter_uuid, host_name, product_api_version, product_full_name, bios_version, bios_release_date, sysinfo_vendor, sysinfo_model, sysinfo_uuid, service_tag, hardware_cpu_model, hardware_cpu_mhz, hardware_cpu_packages, hardware_cpu_cores, hardware_cpu_threads, hardware_memory_size_mb, hardware_num_hba, hardware_num_nic, runtime_power_state) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) {array (
'uuid' => 'XXXXXX',
'vcenter_uuid' => 'XXXXXX',
'host_name' => 'XXX.XXX.XXX.XXX',
'product_api_version' => '6.5',
'product_full_name' => 'VMware ESXi 6.5.0 build-5969303',
'bios_version' => 'SE5C610.86B.01.01.0020.122820161512',
'bios_release_date' => '2016-12-28 00:00:00',
'sysinfo_vendor' => 'TAROX',
'sysinfo_model' => 'ParX T4082i G5 Server',
'sysinfo_uuid' => '80df8d75-12f8-e511-8000-001e67fc2cf2',
'service_tag' => '1516258',
'hardware_cpu_model' => 'Intel(R) Xeon(R) CPU E5-2623 v3 @ 3.00GHz',
'hardware_cpu_mhz' => 2993,
'hardware_cpu_packages' => 2,
'hardware_cpu_cores' => 8,
'hardware_cpu_threads' => 16,
'hardware_memory_size_mb' => 98207.0,
'hardware_num_hba' => 3,
'hardware_num_nic' => 2,
'runtime_power_state' => 'poweredOn',
)}

The host is not imported and therefore not displayed. However, the import of the VM, the datastore, etc. is successful.

By the way, on my test system, the BIOS version is shorter and the import or the module works without problems! Good job, I love it.

Possible Solution

Extension of the field "BIOS Version" in the SGL schema?

Steps to Reproduce (for bugs)

Get the daemon to query a server with a long BIOS version! ;-)

Your Environment

  • VMware vCenter®/ESXi™-Version: ->see above
  • Version/GIT-Hash of this module: master
  • Icinga Web 2 version: 2.6.1
  • Operating System and version: Ubuntu Server 16.04.5 x64

Initialization errors should be caught

Expected Behavior

Daemon should always defer/restart failing Servers

Current Behavior

Initialization failures are treated differently and have been falling through

Undefined offset: 1 (SpectreMelddownBiosInfo.php:103) when choosing Host System

When clicking on the 'Host System' tab of a host, I get the following error:

I am running vsphere 6.7 with esx 6.7 as well

Undefined offset: 1 (SpectreMelddownBiosInfo.php:103)

#0 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Web/Widget/SpectreMelddownBiosInfo.php(103): Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(8, 'Undefined offse...', '/usr/share/icin...', 103, Array)
#1 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/HtmlDocument.php(232): Icinga\Module\Vspheredb\Web\Widget\SpectreMelddownBiosInfo->assemble()
#2 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/BaseHtmlElement.php(194): dipl\Html\HtmlDocument->ensureAssembled()
#3 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/HtmlDocument.php(193): dipl\Html\BaseHtmlElement->renderUnwrapped()
#4 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/HtmlDocument.php(250): dipl\Html\HtmlDocument->render()
#5 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/BaseHtmlElement.php(175): dipl\Html\HtmlDocument->renderUnwrapped()
#6 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/BaseHtmlElement.php(198): dipl\Html\BaseHtmlElement->renderContent()
#7 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/HtmlDocument.php(193): dipl\Html\BaseHtmlElement->renderUnwrapped()
#8 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/HtmlDocument.php(250): dipl\Html\HtmlDocument->render()
#9 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/BaseHtmlElement.php(175): dipl\Html\HtmlDocument->renderUnwrapped()
#10 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/BaseHtmlElement.php(198): dipl\Html\BaseHtmlElement->renderContent()
#11 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/HtmlDocument.php(193): dipl\Html\BaseHtmlElement->renderUnwrapped()
#12 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/HtmlDocument.php(250): dipl\Html\HtmlDocument->render()
#13 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/BaseHtmlElement.php(175): dipl\Html\HtmlDocument->renderUnwrapped()
#14 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/BaseHtmlElement.php(198): dipl\Html\BaseHtmlElement->renderContent()
#15 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/HtmlDocument.php(193): dipl\Html\BaseHtmlElement->renderUnwrapped()
#16 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/HtmlDocument.php(250): dipl\Html\HtmlDocument->render()
#17 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/BaseHtmlElement.php(175): dipl\Html\HtmlDocument->renderUnwrapped()
#18 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/Table.php(310): dipl\Html\BaseHtmlElement->renderContent()
#19 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/BaseHtmlElement.php(198): dipl\Html\Table->renderContent()
#20 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/HtmlDocument.php(193): dipl\Html\BaseHtmlElement->renderUnwrapped()
#21 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/HtmlDocument.php(250): dipl\Html\HtmlDocument->render()
#22 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/BaseHtmlElement.php(175): dipl\Html\HtmlDocument->renderUnwrapped()
#23 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/BaseHtmlElement.php(198): dipl\Html\BaseHtmlElement->renderContent()
#24 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/HtmlDocument.php(193): dipl\Html\BaseHtmlElement->renderUnwrapped()
#25 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Html/HtmlDocument.php(262): dipl\Html\HtmlDocument->render()
#26 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Zf1/SimpleViewRenderer.php(47): dipl\Html\HtmlDocument->__toString()
#27 /usr/share/icingaweb2/modules/director/library/vendor/ipl/Zf1/SimpleViewRenderer.php(66): dipl\Zf1\SimpleViewRenderer->render()
#28 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/HelperBroker.php(272): dipl\Zf1\SimpleViewRenderer->postDispatch()
#29 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(518): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#30 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch('indexAction')
#31 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#32 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#33 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch()
#34 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...')
#35 {main}

virtual machines view is empty

hello tom,

thanks for helping me out with #4. now i've initialized the connection to my esxi host. it is an small esxi 5.5 system on a Dell PowerEdge T110 II.

in icingaweb2 i can see some objects like the host systems and resource pools. unfortunately there aren't any virtual machines. i can see 14 vms in the object table in my database so i guess they will synced. only the assignment to the host system will not work.

vcenter_overview

vcenter_hosts

the first time i started the daemon i've spotted a error message regarding the soap client:

MainRunner::initialize()
SOAPClient: got 2.56 KiB response in 9.83ms
Loaded VCenter information for vCenter id=1 from DB
Ready to fetch id/name/parent list
SOAPClient: got 11.19 KiB response in 1014.22ms
Got id/name/parent for 32 objects
Storing object tree to DB
Committed 32 objects
Loading existing HostSystem from DB
Got 0 existing HostSystem
SOAPClient: got 3.32 KiB response in 1154.79ms
Got 1 HostSystem from VCenter
Ready to store HostSystem
HostSystem: 1 new, 0 modified, 0 deleted (got 1 from API)
Loading existing VirtualMachine from DB
Got 0 existing VirtualMachine
SOAPClient: got 557.00 B response in 1003.73ms
SoapFault in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Api.php:231 with message:
#0 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Api.php(231): SoapClient->__soapCall('RetrievePropert...', Array)
#1 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/PropertyCollector.php(32): Icinga\Module\Vspheredb\Api->soapCall('RetrievePropert...', Array)
#2 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/PropertyCollector.php(58): Icinga\Module\Vspheredb\PropertyCollector->collectProperties(Array)
#3 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/DbObject/BaseDbObject.php(131): Icinga\Module\Vspheredb\PropertyCollector->collectObjectProperties(Object(Icinga\Module\Vspheredb\PropertySet\PropertySet), Object(Icinga\Module\Vsphered
b\SelectSet\VirtualMachineSelectSet))
#4 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/DbObject/BaseDbObject.php(258): Icinga\Module\Vspheredb\DbObject\BaseDbObject::fetchAllFromApi(Object(Icinga\Module\Vspheredb\Api))
#5 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(165): Icinga\Module\Vspheredb\DbObject\BaseDbObject::syncFromApi(Object(Icinga\Module\Vspheredb\DbObject\VCenter))
#6 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(73): Icinga\Module\Vspheredb\MainRunner->syncAllObjects()
#7 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(350): Icinga\Module\Vspheredb\MainRunner->Icinga\Module\Vspheredb\{closure}()
#8 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(80): Icinga\Module\Vspheredb\MainRunner->runFailSafe(Object(Closure))
#9 [internal function]: Icinga\Module\Vspheredb\MainRunner->Icinga\Module\Vspheredb\{closure}(Object(React\EventLoop\StreamSelectLoop))
#10 /usr/share/icingaweb2/modules/reactbundle/vendor/react/event-loop/src/Tick/NextTickQueue.php(44): call_user_func(Object(Closure), Object(React\EventLoop\StreamSelectLoop))
#11 /usr/share/icingaweb2/modules/reactbundle/vendor/react/event-loop/src/StreamSelectLoop.php(173): React\EventLoop\Tick\NextTickQueue->tick()
#12 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/MainRunner.php(125): React\EventLoop\StreamSelectLoop->run()
#13 /usr/share/icingaweb2/modules/vspheredb/application/clicommands/DaemonCommand.php(24): Icinga\Module\Vspheredb\MainRunner->run()
#14 /usr/share/php/Icinga/Cli/Loader.php(265): Icinga\Module\Vspheredb\Clicommands\DaemonCommand->runAction()
#15 /usr/share/php/Icinga/Application/Cli.php(149): Icinga\Cli\Loader->dispatch()
#16 /usr/share/php/Icinga/Application/Cli.php(139): Icinga\Application\Cli->dispatchOnce()
#17 /usr/bin/icingacli(7): Icinga\Application\Cli->dispatch()
#18 {main}
Resetting vSphereDB main runner for vCenter id=1
SOAPClient: got 378.00 B response in 9.92ms
Closed database connection for vCenter id=1
MainRunner::initialize()
Got new session cookie from VCenter
SOAPClient: got 2.56 KiB response in 9.48ms
Loaded VCenter information for vCenter id=1 from DB
Sending Login request to https://xxx.xxx.xxx.xxx/sdk
Got new session cookie from VCenter
SOAPClient: got 819.00 B response in 35.52ms
SOAPClient: got 547.00 B response in 1003.04ms
SOAPClient: got 396.00 B response in 1.14ms
SOAPClient: got 394.00 B response in 1.57ms
Got 0 events
SOAPClient: got 394.00 B response in 1.82ms
Got 0 events
SOAPClient: got 394.00 B response in 1.44ms
Got 0 events
SOAPClient: got 394.00 B response in 2.09ms
Got 0 events
SOAPClient: got 394.00 B response in 1.64ms
Got 0 events
SOAPClient: got 394.00 B response in 1.42ms
Got 0 events

i suspect you won't support such kind of old esxi systems but i would like to know if it is a compatibility issue or rather a bug.

Your Environment

  • Director version (System - About): master
  • vSphereDB version: 0218e75
  • Icinga Web 2 version and modules (System - About): 2.5.3
  • Icinga 2 version (icinga2 --version): r2.8.4-1
  • Operating System and version: Debian Jessie 8.10 (3.16.0-5-amd64)
  • Webserver, PHP versions: Apache2 2.4.10-10+deb8u + PHP 5.6.33-0+deb8u1

Visualize Snapshots

A cool feature would be to visualize snapshots so you can easily find old or large ones or those using multiple layers as this can result performance impacts or disk utilization not shown in vCenter.

vApp seems not supported

Expected Behavior

All the Virtual Machines should be listed through the Icingaweb2 module, including the VM which are part of a vApp

Current Behavior

It seems that the info related to VMs which are part of a vApp are not printed (not gathered?) in the Virtual Machines page of the module.

Possible Solution

Steps to Reproduce (for bugs)

Create a VMware vApp and assign some vm to it.

Your Environment

  • VMware vCenter®/ESXi™-Version: ESXi, 6.0.0, 5572656
  • Version/GIT-Hash of this module: 1.0.0
  • Icinga Web 2 version: 2.6.0
  • Operating System and version: RHEL 7
  • Webserver, PHP versions: Apache

SyncVmDataStoreUsage fails on invalid data

/usr/bin/icingacli vspheredb daemon run
ErrorException in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Sync/SyncVmDatastoreUsage.php:52 with message: Undefined property: stdClass::$VirtualMachineUsageOnDatastore
PDOException in /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Pdo/Abstract.php:302 with message: There is already an active transaction
Server for vCenterID=1 failed (PID 23163), will try again in 30 seconds

And when starting the daemon with systemctl start icinga-vspheredb.service, it fails with

● icinga-vspheredb.service - Icinga vSphereDB Daemon
Loaded: loaded (/etc/systemd/system/icinga-vspheredb.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2018-11-09 10:56:58 CET; 17s ago
Docs: https://icinga.com/docs/icinga-vsphere/latest/
Process: 50916 ExecStart=/usr/bin/icingacli vspheredb daemon run (code=exited, status=217/USER)
Main PID: 50916 (code=exited, status=217/USER)

Nov 09 10:56:58 Hostname systemd[1]: icinga-vspheredb.service: Main process exited, code=exited, status=217/USER

Originally posted by @robertkrenn in https://github.com/_render_node/MDU6SXNzdWUzNzkwOTU4NTk=/issues/unread_timeline#issuecomment-437317562

UI should deal with missing QuickStats

Expected Behavior

No errors in the UI.

Current Behavior

Hosts and Virtual Machines which got no Quickstats yet are usually not even shown in our tables. If you manage it to reach them anyways from a tweaked table you might see an ugly error. Please note that this rarely ever happens - as fetching Stats is one of our very first tasks after startup.

Frontend should deal with a vCenter without Server

Expected Behavior

It's now possible to delete all vCenter servers related to a vCenter. Wherever Server information is shown, this should be highlighted.

Current Behavior

Some places in the UI are unable to deal with this and show ugly exceptions.

Fatal Error after deleting a server

Expected Behavior

No Error :-)

Current Behavior

After deleting a server I got a fatal error in icingaweb2. By the way: it was the last server if this is important!

Fatal error: Uncaught ErrorException: Uncaught ErrorException: Creating default object from empty value in /usr/share/php/Icinga/Web/Controller/ActionController.php:127 Stack trace: #0 /usr/share/php/Icinga/Web/Controller/ActionController.php(127): Icinga\Application\ApplicationBootstrap->Icinga\Application{closure}(2, 'Creating defaul...', '/usr/share/php/...', 127, Array) #1 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(59): Icinga\Web\Controller\ActionController->__construct(Object(Icinga\Web\Request), Object(Icinga\Web\Response), Array) #2 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #3 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #4 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch() #5 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...' in /usr/share/icingaweb2/library/vendor/Zend/Controller/Plugin/Broker.php on line 259

Steps to Reproduce (for bugs)

Install the modul and setup the SQL Database. Add a server and delete the server.

Your Environment

  • Version/GIT-Hash of this module: master
  • Icinga Web 2 version: 2.6.1
  • Operating System and version: Ubuntu Server 16.04.5 x64
  • Webserver, PHP versions: Apache 2.4.18 , PHP 7.0.32

What's next?

Expected Behavior

I currently importing my VMs with the Module "vsphere" and hoped i can use all these cool checks like "vmware-esx-soap-host-cpu-usage" without the pain of installing the VMware SDK.
And maybe Things like:
"Please click here to monitor this value in icinga"
"Move the slider to set warning an critical alerts"

Current Behavior

I have a really cool and complete inventory of my VM environment in Icinga but without any link to the monitoring-part
I missing "provides an Import Source for the Icinga Director"

Possible Solution

Is there any Doc i missed?

Improve Daemon Status Look & Feel

Expected Behavior

As a User I want to see

  • the status of multiple daemons presented in a nice way
  • showing log output per child process
  • following the output automatically in the front-end, unless I manually scroll up

Current Behavior

It just works, but doesn't look very good.

Daemon fails after Sync: Server for vCenterID=1 failed

Expected Behavior

Daemon fetches latest state periodically after initial sync

Current Behavior

Daemon fails after sync with:

Pid 13345 stopped
Server for vCenterID=1 failed (PID 13345), will try again in 30 seconds

after that, the initial sync will start again and import everything successfully.
After that the daemon will fail again.

systemd message:
icingacli: The operation is not allowed in the current state.

Possible Solution

Steps to Reproduce (for bugs)

Restart Service after updating to latest master

Your Environment

  • VMware vCenter®/ESXi™-Version: vCenter 6.7
  • Version/GIT-Hash of this module: master
  • Icinga Web 2 version: 2.6.1-1
  • Operating System and version: Ubuntu Server 18.04.1 LTS
  • Webserver, PHP versions: apache2 2.4.29, php7.2

class 'Evenement\EventEmitter' not found

hello tom,

currently i'm testing the new vspheredb module. i've followed your instructions in doc/01-Installation.md but unfortunately i cannot initialize the connection to my esxi server.

# icingacli vspheredb vcenter initialize --serverId 1
PHP Fatal error:  Class 'Evenement\EventEmitter' not found in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/CurlLoader.php on line 17

Fatal error: Class 'Evenement\EventEmitter' not found in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/CurlLoader.php on line 17

it seems there is missing a class. can you help me?

Your Environment

  • Director version (System - About): master
  • vSphereDB version: 0218e75
  • Icinga Web 2 version and modules (System - About): 2.5.3
  • Icinga 2 version (icinga2 --version): r2.8.4-1
  • Operating System and version: Debian Jessie 8.10 (3.16.0-5-amd64)
  • Webserver, PHP versions: Apache2 2.4.10-10+deb8u + PHP 5.6.33-0+deb8u1

daemon problems

on starting the daemon it runs to several errors:

ERROR: ErrorException in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Daemon/Daemon.php:246 with message: Use of undefined constant SIGINT - assumed 'SIGINT' (this will throw an Error in a future version of PHP)

when commenting out those lines the connect to the vcenter works, but runs into next errors.

ErrorException in /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Sync/SyncVmDatastoreUsage.php:52 with message: Undefined property: stdClass::$VirtualMachineUsageOnDatastore
PDOException in /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Pdo/Abstract.php:302 with message: There is already an active transaction
Server for vCenterID=1 failed (PID 43555), will try again in 30 seconds

so the daemon itself won't keep running:
● icinga-vspheredb.service - Icinga vSphereDB Daemon
Loaded: loaded (/etc/systemd/system/icinga-vspheredb.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2018-11-09 10:56:58 CET; 17s ago
Docs: https://icinga.com/docs/icinga-vsphere/latest/
Process: 50916 ExecStart=/usr/bin/icingacli vspheredb daemon run (code=exited, status=217/USER)
Main PID: 50916 (code=exited, status=217/USER)

Nov 09 10:56:58 Hostname systemd[1]: icinga-vspheredb.service: Main process exited, code=exited, status=217/USER

When running the daemon in debugmode no snapshots, events and alarms are synced from vcenter.

We have Icinga2 installed an SLES 15

Virtualisation (VMWare) in webinterface results in fatal error

i followed https://github.com/Icinga/icingaweb2-module-vspheredb/blob/master/doc/01-Installation.md and have all the latest releases of the modules installed.

at step:
Go to Virtualization (VMware) choose your DB resource and create the schema
the webinterface fails at Virtualisation (VMWare)

with

Fatal error: Uncaught ErrorException: Uncaught ErrorException: Creating default object from empty value in /usr/share/php/Icinga/Web/Controller/ActionController.php:127 Stack trace: #0 /usr/share/php/Icinga/Web/Controller/ActionController.php(127): Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(2, 'Creating defaul...', '/usr/share/php/...', 127, Array) #1 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(59): Icinga\Web\Controller\ActionController->__construct(Object(Icinga\Web\Request), Object(Icinga\Web\Response), Array) #2 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #3 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #4 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch() #5 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...' in /usr/share/icingaweb2/library/vendor/Zend/Controller/Plugin/Broker.php on line 259
i'm not asked for the schema import.

environment:
ubuntu 16.04.5
businessprocess 2.1.0 enabled A Business Process viewer and modeler
cube 1.0.1 enabled Cube for Icinga Web 2
director master enabled Director - Config tool for Icinga 2
fileshipper 1.1.0 enabled Fileshipper for Icinga Director
incubator v0.1.1 enabled Incubator provides bleeding-edge libraries
ipl v0.1.1 enabled The Icinga PHP library
map 1.1.0 enabled Map - Visualize your hosts and service status
mapDatatype 0.0.1 enabled Location datatype for the director addon
monitoring 2.6.2 enabled Icinga monitoring module
reactbundle v0.4.1 enabled ReactPHP-based 3rd party libraries
vsphere 1.1.0 enabled VMware vSphere Import Source
vspheredb 1.0.3 enabled VMware vSphere DB
x509 1.0.0 enabled Scan and view X.509 certificate usage

Provide generic Health/Anomaly Checks

Currently there are quite some checks for anomalies, they should be kept in a central place to make them available for Dashboards, Tables and Health Checks.

JSON decode failed: Syntax error when running initial tasks

Hi,

I've tried to add one vCenter 6.7 and one ESXi Server 6.5 (either on separate icinga2 systems).
I've been running into the error "JSON decode failed: Syntax error" both times.

vCenter gets Stuck on Task hostSystems after the log message:
Ready to store HostSystem
I don't see any information on the vCenter or it's Servers / VMs on this installation.

On the other Icinga2 host where I tried adding a single ESXi Server I get stuck on the Task quickStats after the log message:
Ready to store VirtualMachine
I can See info about the ESXi Server but no VMs appear. Just the Info how many VMs the Host has.

Please let me know how I can help debug this issue further
Thanks in advance :)

Full debug log from icingacli vspheredb daemon run --debug:

Ready to run
DB configuration loaded
Reconnecting to DB
Connected to the database
vCenter ID=1 is now starting
Constructing ServerRunner
Starting for vCenterID=1
Initializing vCenter for demovcenter.demo.lab
Loading sdk/vimService.wsdl
Loading sdk/vim.wsdl
Loading sdk/core-types.xsd
Loading sdk/query-types.xsd
Loading sdk/query-messagetypes.xsd
Loading sdk/reflect-types.xsd
Loading sdk/reflect-messagetypes.xsd
Loading sdk/vim-types.xsd
Loading sdk/vim-messagetypes.xsd
SOAPClient: got 4.33 KiB response in 2.52ms
vCenter hasn't been changed
Running vCenter Sync for ID=1
Pid 2155 stopped
Task: moRefs
Ready to fetch id/name/parent list
SOAPClient: got 4.33 KiB response in 23.03ms
SOAPClient: got 1111.00 B response in 1003.77ms
Sending Login request to https://demovcenter.demo.lab/sdk
Got new session cookie from VCenter
SOAPClient: got 819.00 B response in 85.29ms
SOAPClient: got 57.98 KiB response in 1010.28ms
Got id/name/parent for 171 objects
Storing object tree to DB
Managed Objects have not been changed
Task: hostSystems
Loading existing HostSystem from DB
Got 0 existing HostSystem
SOAPClient: got 9.53 KiB response in 1005.74ms
Got 3 HostSystem from VCenter
Ready to store HostSystem
JSON decode failed: Syntax error

Installation Error, ActionController.php

Hello Tom,
I followed the Installation doc pretty explicitly, however I am unable to connect my vCenter as I am hit with this error as soon as I enable the module.

Fatal error: Uncaught ErrorException: Uncaught ErrorException: Creating default object from empty value in /usr/share/php/Icinga/Web/Controller/ActionController.php:127 Stack trace: #0 /usr/share/php/Icinga/Web/Controller/ActionController.php(127): Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(2, 'Creating defaul...', '/usr/share/php/...', 127, Array) #1 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(59): Icinga\Web\Controller\ActionController->__construct(Object(Icinga\Web\Request), Object(Icinga\Web\Response), Array) #2 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #3 /usr/share/php/Icinga/Application/Web.php(409): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #4 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch() #5 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...' in /usr/share/icingaweb2/library/vendor/Zend/Controller/Plugin/Broker.php on line 259

I suspect this is a php dependency issue, but I am unsure.

My Environment

  • Director version: 1.4.3
  • vSphereDB version: ee15b48
  • Icinga Web 2 version: 2.5.3
  • Icinga 2 Version r2.8.1-1
  • Operating System: Ubuntu 16.04.3 LTS (4.4.0-116-generic)
  • Webserver, PHP Versions: Apache/2.4.18 (Ubuntu) + PHP 7.0.28-0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.