sni / Thruk

Thruk is a multibackend monitoring webinterface for Naemon, Nagios, Icinga and Shinken using the Livestatus API.
http://www.thruk.org
Other
406 stars 147 forks source link

PanoramaView: User not able to see full map status without permission "authorized_for_system_commands" #1247

Open kafos opened 1 year ago

kafos commented 1 year ago

Describe the bug User normally need permissions for all_hosts(_commands) and all_service(_commands) to see the status of maps. It seems not to display the status. The user is only getting the pending status in most cases. Thruk Version Thruk 3.03.20230128 OMD 5.01~2023-01-28-labs-edition

Expected behavior Maps in PanoramaView with host and services on it should not depend on the permission "authorized_for_system_commands". But only if I give the user this permission, the maps seems to load the map correctly.

Screenshots How it looks like without "authorized_for_system_commands" image and with: image

Additional context Every icon on this map shows the status of another map.

The thruk.log is showing this error message, but I'm not sure if this has something to do with our issue. [2023/01/30 23:39:33][NagiosNode2][ERROR] Stacktrace: [2023/01/30 23:39:33][NagiosNode2][ERROR] at /omd/sites/pv/share/thruk/lib/Thruk.pm line 660. [2023/01/30 23:39:33][NagiosNode2][ERROR] Thruk::ANON("TERM") called at /usr/lib/x86_64-linux-gnu/perl-base/IO/Handle.pm line 180 [2023/01/30 23:39:33][NagiosNode2][ERROR] eval {...} called at /usr/lib/x86_64-linux-gnu/perl-base/IO/Handle.pm line 180 [2023/01/30 23:39:33][NagiosNode2][ERROR] IO::Handle::read(IO::Socket::UNIX=GLOB(0x557988e4fc88), "", 16) called at /omd/sites/pv/share/thruk/lib/Monitoring/Livestatus.pm line 1179 [2023/01/30 23:39:33][NagiosNode2][ERROR] Monitoring::Livestatus::_read_socket_do(Monitoring::Livestatus=HASH(0x5579862ef778), IO::Socket::UNIX=GLOB(0x557988e4fc88), "GET hosts\x{a}Columns: name groups state state_type last_state_change acknowledged scheduled_downtime_depth has_been_checked\x{a}Filter: groups >= 800000109\x{a}Filter: groups >= 800000042\x{a}Filter: groups >= 800000279\x{a}Or: 3\x{a}OutputFormat: wrapped_json\x{a}ResponseHeader: fixed16\x{a}") called at /omd/sites/pv/share/thruk/lib/Monitoring/Livestatus.pm line 1112 [2023/01/30 23:39:33][NagiosNode2][ERROR] eval {...} called at /omd/sites/pv/share/thruk/lib/Monitoring/Livestatus.pm line 1100 [2023/01/30 23:39:33][NagiosNode2][ERROR] Monitoring::Livestatus::_send_socket(Monitoring::Livestatus=HASH(0x5579862ef778), "GET hosts\x{a}Columns: name groups state state_type last_state_change acknowledged scheduled_downtime_depth has_been_checked\x{a}Filter: groups >= 800000109\x{a}Filter: groups >= 800000042\x{a}Filter: groups >= 800000279\x{a}Or: 3\x{a}OutputFormat: wrapped_json\x{a}ResponseHeader: fixed16\x{a}") called at /omd/sites/pv/share/thruk/lib/Monitoring/Livestatus.pm line 822 [2023/01/30 23:39:33][NagiosNode2][ERROR] Monitoring::Livestatus::_send(Monitoring::Livestatus=HASH(0x5579862ef778), "GET hosts\x{a}Columns: name groups state state_type last_state_change acknowledged scheduled_downtime_depth has_been_checked\x{a}Filter: groups >= 800000109\x{a}Filter: groups >= 800000042\x{a}Filter: groups >= 800000279\x{a}Or: 3", HASH(0x55798a982998)) called at /omd/sites/pv/share/thruk/lib/Monitoring/Livestatus.pm line 301 [2023/01/30 23:39:33][NagiosNode2][ERROR] Monitoring::Livestatus::selectall_arrayref(Monitoring::Livestatus=HASH(0x5579862ef778), "GET hosts\x{a}Columns: name groups state state_type last_state_change acknowledged scheduled_downtime_depth has_been_checked\x{a}Filter: groups >= 800000109\x{a}Filter: groups >= 800000042\x{a}Filter: groups >= 800000279\x{a}Or: 3", HASH(0x557988caaba0)) called at /omd/sites/pv/share/thruk/lib/Monitoring/Livestatus/Class/Lite.pm line 411 [2023/01/30 23:39:33][NagiosNode2][ERROR] Monitoring::Livestatus::Class::Lite::_execute(Monitoring::Livestatus::Class::Lite=HASH(0x557988548f30)) called at /omd/sites/pv/share/thruk/lib/Monitoring/Livestatus/Class/Lite.pm line 277 [2023/01/30 23:39:33][NagiosNode2][ERROR] Monitoring::Livestatus::Class::Lite::hashref_array(Monitoring::Livestatus::Class::Lite=HASH(0x557988548f30)) called at /omd/sites/pv/share/thruk/lib/Thruk/Backend/Provider/Livestatus.pm line 1682 [2023/01/30 23:39:33][NagiosNode2][ERROR] Thruk::Backend::Provider::Livestatus::_get_table(Thruk::Backend::Provider::Livestatus=HASH(0x557986119ec0), "hosts", HASH(0x5579858f1148)) called at /omd/sites/pv/share/thruk/lib/Thruk/Backend/Provider/Livestatus.pm line 433 [2023/01/30 23:39:33][NagiosNode2][ERROR] Thruk::Backend::Provider::Livestatus::get_hosts(Thruk::Backend::Provider::Livestatus=HASH(0x557986119ec0), "enable_shinken_features", 0, "last_program_starts", HASH(0x557987978ad8), "columns", ARRAY(0x557988b97660), "filter", ...) called at /omd/sites/pv/share/thruk/lib/Thruk/Backend/Pool.pm line 341 [2023/01/30 23:39:33][NagiosNode2][ERROR] eval {...} called at /omd/sites/pv/share/thruk/lib/Thruk/Backend/Pool.pm line 340 [2023/01/30 23:39:33][NagiosNode2][ERROR] Thruk::Backend::Pool::do_on_peer(Thruk::Backend::Pool=HASH(0x557985554a90), "sv01", "get_hosts", ARRAY(0x557989071be8)) called at /omd/sites/pv/share/thruk/lib/Thruk/Backend/Manager.pm line 2004 [2023/01/30 23:39:33][NagiosNode2][ERROR] Thruk::Backend::Manager::_get_result_serial(Thruk::Backend::Manager=HASH(0x557987978b38), ARRAY(0x5579885a00b0), "get_hosts", ARRAY(0x557989071be8)) called at /omd/sites/pv/share/thruk/lib/Thruk/Backend/Manager.pm line 1888 [2023/01/30 23:39:33][NagiosNode2][ERROR] Thruk::Backend::Manager::_get_result(Thruk::Backend::Manager=HASH(0x557987978b38), ARRAY(0x5579885a00b0), "get_hosts", ARRAY(0x557989071be8), undef) called at /omd/sites/pv/share/thruk/lib/Thruk/Backend/Manager.pm line 1603 [2023/01/30 23:39:33][NagiosNode2][ERROR] Thruk::Backend::Manager::_do_on_peers(Thruk::Backend::Manager=HASH(0x557987978b38), "get_hosts", ARRAY(0x557989071be8)) called at /omd/sites/pv/share/thruk/lib/Thruk/Backend/Manager.pm line 580 [2023/01/30 23:39:33][NagiosNode2][ERROR] Thruk::Backend::Manager::get_hosts(Thruk::Backend::Manager=HASH(0x557987978b38), "filter", ARRAY(0x55798a9789f8), "columns", ARRAY(0x557988b97660)) called at /omd/sites/pv/etc/thruk/plugins-enabled/panorama/lib/Thruk/Controller/panorama.pm line 3287 [2023/01/30 23:39:33][NagiosNode2][ERROR] Thruk::Controller::panorama::_summarize_hostgroup_query(Thruk::Context=HASH(0x5579872298f0), HASH(0x5579883816f8), 1) called at /omd/sites/pv/etc/thruk/plugins-enabled/panorama/lib/Thruk/Controller/panorama.pm line 583 [2023/01/30 23:39:33][NagiosNode2][ERROR] Thruk::Controller::panorama::_task_status(Thruk::Context=HASH(0x5579872298f0), 1, HASH(0x557988381818)) called at /omd/sites/pv/etc/thruk/plugins-enabled/panorama/lib/Thruk/Controller/panorama.pm line 624 [2023/01/30 23:39:33][NagiosNode2][ERROR] Thruk::Controller::panorama::_task_status(Thruk::Context=HASH(0x5579872298f0)) called at /omd/sites/pv/etc/thruk/plugins-enabled/panorama/lib/Thruk/Controller/panorama.pm line 103 [2023/01/30 23:39:33][NagiosNode2][ERROR] Thruk::Controller::panorama::index(Thruk::Context=HASH(0x5579872298f0), "/thruk/cgi-bin/panorama.cgi") called at /omd/sites/pv/share/thruk/lib/Thruk.pm line 321 [2023/01/30 23:39:33][NagiosNode2][ERROR] eval {...} called at /omd/sites/pv/share/thruk/lib/Thruk.pm line 316 [2023/01/30 23:39:33][NagiosNode2][ERROR] Thruk::_dispatcher(HASH(0x55798861d3d0)) called at /omd/sites/pv/lib/perl5/lib/perl5/Plack/Util.pm line 145 [2023/01/30 23:39:33][NagiosNode2][ERROR] eval {...} called at /omd/sites/pv/lib/perl5/lib/perl5/Plack/Util.pm line 145 [2023/01/30 23:39:33][NagiosNode2][ERROR] Plack::Util::run_app(CODE(0x55798611c6e8), HASH(0x55798861d3d0)) called at /omd/sites/pv/lib/perl5/lib/perl5/Plack/Handler/FCGI.pm line 147 [2023/01/30 23:39:33][NagiosNode2][ERROR] Plack::Handler::FCGI::run(Plack::Handler::FCGI=HASH(0x557984e754e8), CODE(0x55798611c6e8)) called at /omd/sites/pv/share/thruk/script/thruk_fastcgi.pl line 31 [2023/01/30 23:39:33][NagiosNode2][WARN] got signal PIPE while handling request in

sni commented 1 year ago

Could you track down this issue to a specific map? Since you said all the icons just refer to another map, does the issue appear on those maps already?

sni commented 1 year ago

The error from the log is not related and seems to be a apache restart or something like that.

kafos commented 1 year ago
  1. Germany like above with linked maps --> not working (icons on pending)
  2. linked map like Bayern with other linked maps on it --> not working either (icons on pending), only after manual site refresh the correct status appears
  3. the next linked map with hostgroup-icons on it seems to work fine.

Yes it's a lot of data which PanoramaView has to summarize, but this issue does not occur with "authorized_for_system_commands".