shinken-monitoring / mod-webui

Shinken Web User Interface
GNU Affero General Public License v3.0
79 stars 71 forks source link

[2.8.0] Worldmap not working anymore ? #722

Closed b-keller closed 4 years ago

b-keller commented 4 years ago

Hi,

I just test the new webui version (thanks a lot for your jobs), and I have some trouble to access woldmap page and dashboard widget.

Steps to reproduce : world map page

  1. from side menu
  2. Click on tactical views
  3. Click on worldmap
  4. I See this error Error: 500 Internal Server Error Sorry, the requested URL 'http://x.y.z/worldmap' caused an error: Internal Server Error

Steps to reproduce : world map widget

  1. Click on dashboard icon
  2. I See this error Error loading this widget:

Expected behavior Access and display worldmap page. Display world map widget on dashboard

Screenshots Screenshot_2019-12-03 Error 500 Internal Server Error

Shinken:

I missed some thing ?

Thx

maethor commented 4 years ago

I can reproduce. I don't use worlmap myself so this kind of thing might happen :/ I will look at it tomorrow.

mohierf commented 4 years ago

I gave a try this morning and I got this error message. It may help @maethor :

Error: 500 Internal Server Error

Sorry, the requested URL 'http://localhost/worldmap' caused an error:

Internal Server Error

Exception:

KeyError('hosts_level',)

Traceback:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 1732, in wrapper
    rv = callback(*a, **ka)
  File "/var/lib/shinken/modules/webui2/module.py", line 703, in lock_version
    return f(**args)
  File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 3615, in wrapper
    result = func(*args, **kwargs)
  File "/var/lib/shinken/modules/webui2/plugins/worldmap/worldmap.py", line 113, in show_worldmap
    'hosts': search_hosts_with_coordinates(search, user)}
  File "/var/lib/shinken/modules/webui2/plugins/worldmap/worldmap.py", line 73, in search_hosts_with_coordinates
    if h.business_impact not in params['hosts_level']:
KeyError: 'hosts_level'
maethor commented 4 years ago

Yep, I fixed it. Will be released soon.

Thank you @b-keller