Icinga / icingaweb2-module-vspheredb

The easiest way to monitor a VMware vSphere environment.
https://icinga.com/docs/vsphere/latest
GNU General Public License v2.0
100 stars 34 forks source link

vCenter disabled has no effect #462

Open slalomsk8er opened 1 year ago

slalomsk8er commented 1 year ago

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

Thomas-Gelf commented 1 year ago

The logic here is as follows:

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.

slalomsk8er commented 1 year ago

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