sni / Thruk

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

Paging on showlog.cgi, config.cgi #874

Closed VladimirBilik closed 5 years ago

VladimirBilik commented 5 years ago

Describe the bug After upgrade Thruk from 2.20 to 2.24 i noticed the number of entries shown in showlog.cgi and config.cgi is shortened. Both of these pages shows at most the default paging steps entries (100) selected in _pagingsteps but not more. The config in _thruklocal.conf is:

use_pager=1
paging_steps=30,*100,500,1000,all

When I switch off the pagging with:

use_pager=0
paging_steps=30,*100,500,1000,all

the page show all entries. When I switch on the pagging and select 'all' as the default:

use_pager=1
paging_steps=30,100,500,1000,*all

the page show all entries, too. But in both cases there are no paging controls shown. Settings for pagging is shared with status.cgi, where the pages are shown as expected. I think something similar was reported in #443

Thruk Version Thruk 2.24, not using OMD

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Main page'
  2. Click on 'Event Log'
  3. Scroll down to bottom of page
  4. See 100 of 100 Matching Log Entries Displayed, although there are more lines in a table

Expected behavior Paging similar to status.cgi, i.e.: image

Desktop (please complete the following information):

VladimirBilik commented 5 years ago

However, on the Thruk demo page: https://demo.thruk.org/thruk/#cgi-bin/showlog.cgi the paging is working correctly. Is it just a problem with my configuration only?

As a workaround I adjusted the link in _/etc/thruk/menulocal.conf to open showlog.cgi with parameter entries=all:

  add_section('name' => 'Reports');
  add_link('name' => 'Availability',      'href' => '/thruk/cgi-bin/avail.cgi');
  add_link('name' => 'Trends',            'href' => '/thruk/cgi-bin/trends.cgi') if $c->stash->{'use_feature_trends'};
  add_link('name' => 'Alerts',            'href' => '/thruk/cgi-bin/history.cgi?host=all');
    add_sub_link( 'name' => 'Summary',    'href' => '/thruk/cgi-bin/summary.cgi');
  add_link('name' => 'Histogram',         'href' => '/thruk/cgi-bin/histogram.cgi') if $c->stash->{'use_feature_histogram'};
  add_link('name' => 'Notifications',     'href' => '/thruk/cgi-bin/notifications.cgi?contact=all');
  add_link('name' => 'Event Log',         'href' => '/thruk/cgi-bin/showlog.cgi?entries=all');

Thank you for your time.

sni commented 5 years ago

I am unable to reproduce the issue. I tried a few combinations of LMD and Logcache but it always worked as expected. How many backends do you have and which monitoring cores are they?

VladimirBilik commented 5 years ago

I use just one backend - Naemon 1.0.8. OS= Centos 7.4.1708 (Core), kernel 3.10.0-693.21.1.el7.x86_64.

I have another observation: in URL /thruk/#cgi-bin/showlog.cgi, if I set page=somenumber where somenumber is greater or equal 2, I can see the paging, but with number of entries set to somenumber x default paging steps. If I select the page number 1 afterwards, the paging header disappears.

Could you give me a hint what to check please? Should I focus on showlog.cgi and try to debug what data it is processing, or communication with backend and data it is retrieving from it?

image

At the same time I'm investigating some crashes of Naemon, but I think it is different problem (some issues with libc: kernel: traps: naemon[7494] general protection ip:7fd9ae384036 sp:7fd9af29cae8 error:0 in libc-2.17.so). It occurs with searching in event log with long period covering 8-12 months. What do you think - could it have something in common with this issue?

Thank you.

anfoe1111 commented 5 years ago

We observe the same issue: After upgrading thruk to 2.24-2, paging does not work anymore in showlog.cgi, notifications.cgi and history.cgi. We also use naemon 1.08 as a backend, running on CENTOS 7.5, Kernel 3.10.0-862.14.4

Also, like Vladimir described, we observe some naemon- (livestatus- ?) crashes when reading a huge amount of eventlogs, e.g. several days.

Thanks and Regards, ANdreas

sni commented 5 years ago

both issues should be fixed in nightly already if you want to test that one.

VladimirBilik commented 5 years ago

tested - works fine. Thank you.

anfoe1111 commented 5 years ago

Thanks, I’ll test it on Thursday.

From: Sven Nierlein notifications@github.com Sent: Sunday, December 9, 2018 7:52 PM To: sni/Thruk Thruk@noreply.github.com Cc: anfoe1111 andreas.foerster.koeln@web.de; Comment comment@noreply.github.com Subject: Re: [sni/Thruk] Paging on showlog.cgi, config.cgi (#874)

Closed #874 https://github.com/sni/Thruk/issues/874 .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sni/Thruk/issues/874#event-2014515379 , or mute the thread https://github.com/notifications/unsubscribe-auth/ASXrmCLvplM7I6kFrqnu5o63smuIIgJAks5u3VvfgaJpZM4YQIZV . https://github.com/notifications/beacon/ASXrmNlr76Z25PuyzWSZ36NDDyEi0TGsks5u3VvfgaJpZM4YQIZV.gif