Icinga/icingaweb2-module-vspheredb

vCenter disabled has no effect

slalomsk8er opened this issue · 2 comments

Expected Behavior

No warning is generated for a disabled vCenter and not shown under https://icinga/icingaweb2/vspheredb/vcenters.

Current Behavior

icingacli vspheredb check health
[WARNING] vcenter1, vCenter Server: There is no configured server for this vCenter
[OK] vcenter2, vCenter Server: API connection with ictvcap01.uhbs.ch is fine

under https://icinga/icingaweb2/vspheredb/configuration/servers the vcenter1 is disabled.

Possible Solution

Ignore disabled vCenters.

Steps to Reproduce (for bugs)

Upgrade to 1.5.0

Your Environment

Icinga Web 2: 2.11.2
incubator: 0.19.0
vspheredb: 1.5.0

The logic here is as follows:

  • you can configure zero or more connections to a specific vCenter
  • there is no way to "disable a vCenter", one can only disable configured connections

So in case you disabled all connections to a specific vCenter, the current reasoning is: "Warning, there is no configured connection for this vCenter".

Note

Not saying that this is the correct interpretation, that's just how the current logic works

To address both "use cases", this probably requires an additional flag, allowing to completely disable a vCenter. Deleting the vCenter (see #324) might also suffice, I guess.

For the current case, deleting would be perfect. It's just unfortunate to have to ignore the warning for months.