Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💡 Feature: checkmk 2.3 support #1

Open
tokajer opened this issue Oct 25, 2024 · 2 comments
Open

💡 Feature: checkmk 2.3 support #1

tokajer opened this issue Oct 25, 2024 · 2 comments

Comments

@tokajer
Copy link

tokajer commented Oct 25, 2024

Feature Description

Hi,

its not working with 2.3 versions, a rewrite for 2.3 would be nice.

also some gui error when i activate the plugin.

Agent based plug-ins (deprecated): 28, Agents: 1, Checks' man pages (deprecated): 20, Legacy check plug-ins (deprecated): 1, Legacy GUI extensions (deprecated): 14

keep up the good work!

Alternatives Considered

No response

Attachments: Screenshots

No response

@crpb
Copy link

crpb commented Oct 28, 2024

My gui still works on Checkmk Raw Edition 2.3.0p19 but the cli doesn't like it

OMD[sitename]:~$ cmk --debug --check-discovery $myhost
/omd/sites/sitename/lib/python3.12/site-packages/pydantic/_internal/_fields.py:149: UserWarning: Field "model_name" has conflict with protected namespace "model_".

You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.
  warnings.warn(
/omd/sites/sitename/lib/python3.12/site-packages/pydantic/_internal/_fields.py:149: UserWarning: Field "model_number" has conflict with protected namespace "model_".

You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.
  warnings.warn(
Traceback (most recent call last):
  File "/omd/sites/sitename/bin/cmk", line 101, in <module>
    errors = config.load_all_plugins(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/sitename/lib/python3/cmk/base/config.py", line 1420, in load_all_plugins
    errors = agent_based_register.load_all_plugins()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/sitename/lib/python3/cmk/base/api/agent_based/register/_discover.py", line 53, in load_all_plugins
    raise exception
  File "/omd/sites/sitename/lib/python3/cmk/utils/plugin_loader.py", line 51, in load_plugins
    yield name, importlib.import_module(full_name)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/sitename/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/omd/sites/sitename/local/lib/python3/cmk/base/plugins/agent_based/fortios_interface.py", line 106, in <module>
    class VdomDataList(BaseModel):
  File "/omd/sites/sitename/lib/python3.12/site-packages/pydantic/_internal/_model_construction.py", line 92, in __new__
    private_attributes = inspect_namespace(
                         ^^^^^^^^^^^^^^^^^^
  File "/omd/sites/sitename/lib/python3.12/site-packages/pydantic/_internal/_model_construction.py", line 316, in inspect_namespace
    raise TypeError("To define root models, use `pydantic.RootModel` rather than a field called '__root__'")
TypeError: To define root models, use `pydantic.RootModel` rather than a field called '__root__'
OMD[sitename]:~$

Didn't try much yet tho.

But this comes on every cmk call... (the short version)

/omd/sites/gww/lib/python3.12/site-packages/pydantic/_internal/_fields.py:149: UserWarning: Field "model_name" has conflict with protected namespace "model_".

You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.
  warnings.warn(
/omd/sites/gww/lib/python3.12/site-packages/pydantic/_internal/_fields.py:149: UserWarning: Field "model_number" has conflict with protected namespace "model_".

You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.
  warnings.warn(
Error in agent based plug-in fortios_interface: To define root models, use `pydantic.RootModel` rather than a field called '__root__'

@7meis
Copy link
Contributor

7meis commented Oct 29, 2024

Hello, Many thanks for the PR. Until we have a version that is CheckMK 2.3.0 compatible, I have set the maximum version to 2.3.0b1.
I will keep you up to date on further developments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants