Thruk icon indicating copy to clipboard operation
Thruk copied to clipboard

Default sorting does not sort by backend

Open klaernie opened this issue 2 years ago • 3 comments

Describe the bug The default sort order does not use the backend/site column as a default sort order.

Thruk Version 2.48

To Reproduce Steps to reproduce the behavior:

  1. visit the services page where identically named services are running on more than one backend
  2. refresh the page
  3. observe the order of the services change

Expected behavior The resulting list of service is sorted stable, so the first entry always points to the same backend.

Screenshots the following two screenshots were made with the same service detail page, only refreshing the page between them. image image

Desktop:

  • Google Chrome 102.0.5005.63 (Official Build) (64-bit)
  • nagios 4.4.7 backends
  • lmd - version 2.0.7 (Build: fb663ec, go1.18.2) ~lmd - version 2.0.4 (Build: 5115f84, go1.17.6)~

Additional context On a technical level this is not a real problem, but it confuses end users. I've also more than once triggered a recheck from an all-services-of-host page on one of the two backends, to have a before and after image for a ticket resolution, but then got confused, as the sort order changed and the check I was expecting to be listed first suddenly appeared below it's partner.

This problem is also not likely to hit most people, our environment is probably a bit ballistic by running the entire landscape of nagios servers twice for high availability, but then displaying everything in a single Thruk instance. But this makes it easy for operations to handle problems so that both sides of our HA clusters know about the ack, comment etc.

klaernie avatar Jun 08 '22 18:06 klaernie

having just noticed that lmd 2.0.4 is not the most current version anymore, I should rerun this test with lmd 2.0.7

klaernie avatar Jun 08 '22 18:06 klaernie

okay, the problem is still reproduced with lmd 2.0.7, so I updated the initial text

klaernie avatar Jun 08 '22 19:06 klaernie

Indeed, the site name is not used for sorting because usually i would try to make either the hostname or the service description unique. But anyway, since this is a rare, but possible, scenario, the sort order should not jump between refreshes.

sni avatar Jun 09 '22 17:06 sni