makanakoeln / check_mk

check_mk related scripts and checks
GNU General Public License v3.0
4 stars 2 forks source link

wsus_sync_status not compatible with CMK 1.6 #7

Open meilon opened 4 years ago

meilon commented 4 years ago

Hi there,

wsus_sync_status isn't compatible with the latest CMK 1.6 beta, so I'm guessing it won't be with the final release:

Failed to load plugin /omd/sites/prod/local/share/check_mk/web/plugins/wato/wsus_sync_status.py: No module named defines
Traceback (most recent call last):
  File "/omd/sites/prod/lib/python/cmk/gui/utils.py", line 173, in load_web_plugins
    execfile(file_path, globalvars)
  File "/omd/sites/prod/local/share/check_mk/web/plugins/wato/wsus_sync_status.py", line 4, in <module>
    import cmk.defines as defines
ImportError: No module named defines

I think it's supposed to be cmk.utils.defines now

Ralle75 commented 4 years ago

Hi meilon,

i has the same problem and make some changes in two files.

in /omd/sites/prod/local/share/check_mk/web/plugins/wato/wsus_sync_status.py

delete or comment the following line: import cmk.defines as defines

and in /omd/sites/prod/local/share/check_mk/agents/bakery/wsus_sync_status change the line: shutil.copy2(cmk.paths.local_agents_dir + "/plugins/wsus_sync_status.ps1",

to: shutil.copy2(cmk.utils.paths.local_agents_dir + "/plugins/wsus_sync_status.ps1",

hope this helps for you.