Bug #1524

status totals are wrong when searching

Added by TheFlyingCorpse almost 3 years ago. Updated about 2 years ago.

Status:ResolvedStart date:05/16/2011
Priority:LowDue date:
Assignee:ricardo% Done:

90%

Category:Status
Target version:Icinga 1.x - 1.7
Icinga Version: Browser Version:

Description

When a search is done, the totals in status.cgi are all wrong, all numbers are 0, regardless of what is searched for.

classicui_status_counts_tacheader.png (12 KB) dnsmichi, 11/15/2011 10:45 am

classicui_status_counts_statusheader.png (9.67 KB) dnsmichi, 11/15/2011 10:45 am

statustotal_all_hostgroups.png (17.8 KB) ricardo, 04/13/2012 04:25 pm


Related issues

Related to Classic UI - Bug #844: search not returning all results, only first match (witho... Resolved 10/01/2010

Associated revisions

Revision 061f17a2
Added by ricardo over 2 years ago

classic ui: Fixed status totals are wrong when searching #1524

refs: #1524

Changed order of data processing. Status gets filtered and at the
same time the status totals are counted. In this way from now on
the numbers schould be correct.

Revision 6c8e32b4
Added by ricardo over 2 years ago

classic ui: Added multiple hosts/services to status.cgi GET #1981

refs: #1524
refs: #1981
refs: #2018
refs: #2173
refs: #2220

This is pretty much a rewrite of status.cgi.

some changes:
  • you can define more then one object to display
    • host=hostA&host=hostB&host=…
    • same with host groups and service groups
  • hostgroup=all now only shows which are in host groups
  • host sorting is working now
  • added 2 new cgi vars
    • sortobject = determine if to sort host or service list (host_service_view)
    • allunhandledproblems = to display ALL unhanded problems
  • fixed and reorganized the links in status totals
  • searching returns more then one host/service group if group name matches
  • combined Host/Service view now properly supported
  • code cleanup
  • more little fixes and enhancements

Revision 4c106188
Added by ricardo about 2 years ago

classic-ui: added service / host properties to links in status totals

refs: #1524

  • now serviceprops and hostprops are added to links in status totals if they were set in the request
  • let's see how this is doing

Revision 972e7a3d
Added by ricardo about 2 years ago

classi-ui: fixed performance issues and other problems in status.cgi

refs: #1524

  • displaying of host and service group should be much faster now
    compared to the speed aftere the "big rewrite"
  • fixed filtering for servicegroups
  • fixed problem with wrong error message when filters are set

Revision 7b9ec5bf
Added by ricardo about 2 years ago

classic-ui: updated Changelog CHANGES section

refs: #1524
refs: #1981
refs: #2018
refs: #2117
refs: #2119
refs: #2145
refs: #2198
refs: #2343
refs: #2359
refs: #2373
refs: #2421

hope the "changes" section for classic ui isn't tooo long

History

#1 Updated by dnsmichi almost 3 years ago

  • Status changed from New to Feedback
  • Target version changed from 1.4 to 1.5

#2 Updated by dnsmichi almost 3 years ago

  • Target version changed from 1.5 to 1.6

this is introduced when using host filters (precompiled regexes) and the asterisk for searching. search is returning only the first result by default, where the counting of the host and service totals is correct.

in order to fight the error, one might rewrite the search completely, and even if using regex, doing the counts for the status totals right in place (global variable instead of extra counting!).

this relates to #844

#3 Updated by dnsmichi over 2 years ago

  • Target version deleted (1.6)

#4 Updated by ricardo over 2 years ago

  • Estimated time deleted (2.00)

Just wanted to know what these counters should represent. because sometimes they counted ALL hosts and services and sometimes just the ones which are displayed.

As we now have the TAC header I think it would make sense just to display the counts for the hosts and services which are displayed.

What do you think?

#5 Updated by dnsmichi over 2 years ago

basically, those counts do the following

  • add urls to different states
    • host states with servicestatustype=29 (up=2, down=4, unreachable=8, pending=1)
    • service states with hoststatustype=15 (ok=2, warning=4, unknown=8, critical=16, pending=1)
    • all problems
      • hosts states with servicestatustype=29 (down+unreachable+pending = 4+8 = 12)
      • service states with hoststatustype=15 (warning+unknown+critical = 4+8+16 = 28)
    • all types
      • hosts states with servicestatustype=29
      • service states with hoststatustype=15

the counts mostly did not happen correctly due to the navbarsearch filter not being honored when counting. having rewritten that, i think they would remain "self corrected" now by fixing #844

#6 Updated by dnsmichi over 2 years ago

ok, apparently they are not matching completely, see the differences on the unreachable count...

#7 Updated by ricardo over 2 years ago

  • Subject changed from When searching, totals in page is wrong to status totals are wrong when searching
  • Assignee set to ricardo
  • Target version set to 1.7
  • % Done changed from 0 to 90

in current rbartels/cgi

please test!!!

can't guarantee that all display_styles are displayed correctly, so please TEST!!!

#8 Updated by dnsmichi about 2 years ago

from my perspective this looks find for now. but still, that anag discussion thingy should match it too.

status totals should contain

  • the overall totals
  • the ones filtered by the view

as now implemented.

#9 Updated by ricardo about 2 years ago

Hope people understand the way it works now.

For example: If you display all hostgroups, it only shows the status for all hostgroups, not for host's which aren't in any hostgroup. The same with servicegroups.

example for all hostgroups (4 hosts), filtered for services in unknown state

#10 Updated by ricardo about 2 years ago

  • Status changed from Feedback to Resolved

Added note to changes in Changelog

Also available in: Atom PDF