Yogibaer75 / Check_MK-Things

From check plugins to website extensions
62 stars 18 forks source link

hyperv_cluster GUI extension error in CheckMK 2.1.0 #26

Open 47k opened 1 year ago

47k commented 1 year ago

Some GUI extensions could not be loaded. This may be caused by some incompatible extension packages.

Loading "/omd/sites/sitename/local/share/check_mk/web/plugins/metrics/hyperv.py" failed: No module named 'cmk.gui.plugins.metrics.check_mk'

Loading "/omd/sites/sitename/local/share/check_mk/web/plugins/wato/hyperv_vm_integration_wato.py" failed: __init__() got an unexpected keyword argument 'show_titles'
Yogibaer75 commented 1 year ago

The error message is correct as this plugin is not 2.1 compatible. At the moment it only works with 2.0. I have no systems at hand where i can check against 2.1.

47k commented 1 year ago

Do you need access to that system or just for testing purposes?

Yogibaer75 commented 1 year ago

I uploaded a new version of the MKP. It would be nice if you can test it. I had one system today where the modifications where already done. https://github.com/Yogibaer75/Check_MK-Things/blob/master/check%20plugins%202.1/windows_hyperv/hyperv_cluster-2.0.mkp

47k commented 1 year ago

Seems to be working fine: -Installed and activated -Agent deployed -Got those information:

HyperV Cluster Status | HyperV Cluster HVCLUSTER with IP x.x.x.x and quorum Clusterdatentr„ger 2 as Majority quorum.   OK | HyperV Disk Clusterdatentr„ger 2 | is Online, with owner HPVx and group Clustergruppe.   OK | HyperV Network Cluster | is Up, has address x.x.x.x and role Cluster.   OK | HyperV Network Clusternetzwerk 5 | is Up, has address and role None.   OK | HyperV Network Domain | is Up, has address x.x.x.x and role ClusterAndClient.   OK | HyperV Network Live Migration | is Up, has address x.x.x.x and role Cluster.   OK | HyperV Network SAN | is Up, has address x.x.x.x and role None.   OK | HyperV Node HPVy | is Up, has ID 1 and weight 1.   OK | HyperV Node HPVx | is Up, has ID 2 and weight 1.

Edit: On the second machine where the active test VM is, I got an issue: check failed - please submit a crash report! (Crash-ID: e370256c-aebd-11ed-bd2d-00155d4d190e)

Edit 2: Ok I got new HyperV Services on other VM machine where the agent plugin is not on the HyperV Server. This is found on a system on a different HyperV Server (not part of the cluster) and the plugin isn't installed on the HyperV Server): -HyperV Checkpoints -HyperV Hostsystem -HyperV Intergration Services -HyperV Name -HyperV NIC Netzwerkkarte 1 -HyperV RAM -HyperV VHD Festplatte on SCSI controller number 0 at location 0

Yogibaer75 commented 1 year ago

For the crash i would need the crash report or preferred the complete plugin output. For edit 2 - this can only be if the host has inside CMK the same name as one of the machines inside your cluster environment. The script fetches the data for all machines found inside the cluster. The plugin output you can also sent as PM inside the forum if you want.

For the German text output. This should look ok inside CMK only on the command line you should see the strange characters. What server is this you used the plugin as every server is normally English and has only a German language pack for the user interface. But the system user should not use the German language pack for it's doing. I strongly recommend to not use language packs on servers. :)

47k commented 1 year ago

Hey Yogibaer75

Sorry for my late Response - now I have time to take care of everything and Can help to test this for you. I re-activated the plugin and this is the issue output I got:

Activated on ClusterNode1:

  1. "is Online, with owner ClusterNode2 and group Verfgbarer Speicher" <- ä / ü / ä is not working in all outputs

  2. HyperV VM GUEST1 check failed - please submit a crash report! (Crash-ID: fb8d40a0-ee58-11ed-9eac-00155d4d190e)
File "/omd/sites/sitename/local/share/check_mk/checks/hyperv_cluster_roles", line 34, in check_hyperv_cluster_roles
    for ressource, wanted_state in wanted_states:
TypeError: 'NoneType' object is not iterable

Crash Report:

Exception: TypeError ('NoneType' object is not iterable)

Traceback:

File "/omd/sites/sitename/lib/python3/cmk/base/agent_based/checking/__init__.py", line 470, in get_aggregated_result
    result = _aggregate_results(
  File "/omd/sites/sitename/lib/python3/cmk/base/agent_based/checking/__init__.py", line 578, in _aggregate_results
    perfdata, results = _consume_and_dispatch_result_types(subresults)
  File "/omd/sites/sitename/lib/python3/cmk/base/agent_based/checking/__init__.py", line 622, in _consume_and_dispatch_result_types
    for subr in subresults:
  File "/omd/sites/sitename/lib/python3/cmk/base/api/agent_based/register/check_plugins.py", line 94, in filtered_generator
    for element in generator(*args, **kwargs):
  File "/omd/sites/sitename/lib/python3/cmk/base/api/agent_based/register/check_plugins_legacy.py", line 184, in check_result_generator
    subresults = list(subresults)
  File "/omd/sites/sitename/local/share/check_mk/checks/hyperv_cluster_roles", line 34, in check_hyperv_cluster_roles
    for ressource, wanted_state in wanted_states:
  1. This plugin is not working on the Host: .\hyperv_host_csv_io.ps1
    
    <<<hyperv_host_io_local>>>
    Get-Counter : Das angegebene Objekt wurde nicht auf dem Computer gefunden.
    In C:\Program Files (x86)\checkmk\agent\plugins\hyperv_host_csv_io.ps1:16 Zeichen:1
    + Get-Counter @Splat | ForEach {
    + ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidResult: (:) [Get-Counter], Exception
    + FullyQualifiedErrorId : CounterApiError,Microsoft.PowerShell.Commands.GetCounterCommand

Get-Counter : Das angegebene Objekt wurde nicht auf dem Computer gefunden.