Icinga / icinga2

The core of our monitoring platform with a powerful configuration language and REST API.
https://icinga.com/docs/icinga2/latest
GNU General Public License v2.0
2.01k stars 575 forks source link

[dev.icinga.com #13465] Livestatus queries and thruk problem in combination with api created services #4848

Closed icinga-migration closed 7 years ago

icinga-migration commented 7 years ago

This issue has been migrated from Redmine: https://dev.icinga.com/issues/13465

Created by magnus on 2016-12-07 19:20:32 +00:00

Assignee: (none) Status: Closed (closed on 2016-12-07 21:14:11 +00:00) Target Version: (none) Last Update: 2016-12-08 07:09:11 +00:00 (in Redmine)

Icinga Version: 2.5.4+snapshot2016.12.06+1~xenial amd64
Backport?: Not yet backported
Include in Changelog: 1

Hello,

I don't know if I would call this a bug in icinga or thruk. Haven't tested with other web frontends using livestatus.

When viewing all the services in thruk it by default splits the list up into pages. The sorting of the services seems to be in the order that livestatus reports them which at least when you use services created by the api (hosts are created by normal configuration files in conf.d. The odd behaviour is that it will list for example the first host and then just a few of its services. The rest will come on a much later page. If I select in this view to list all services on the same page it will be displayed in the correct order so it is easy to be fooled that there are no more services for that specific host.

You can see in my one liner below that livestatus will not list all services together.

I don't know if the livestatus protocol says anything about keeping them together or not. If you feel this is more a bug for thruk just close this issue and I will report it to the thruk developers instead.

Best Regards and thanks for an awesome product Magnus Bodén

  1. echo -e 'GET services\n' | nc -U /var/run/icinga2/cmd/livestatus | grep -n hostX |cut -d: -f1 76 77 78 79 80 81 82 83 606 613 617 621
icinga-migration commented 7 years ago

Updated by mfriedrich on 2016-12-07 21:14:11 +00:00

The Livestatus specification lacks of many details you'll only get when reading their source code. Sorting is at least not supported by a given attribute, that is an exclusive patch in Naemon's livestatus only

Icinga 2 doesn't care about sorting results in any interface. status.dat/objects.cache and the API return unordered result sets as an array as well. DB IDO is different but object config dump queries happen unordered too.

I don't think this is related to just API created objects - it just might be more visible with two different places for configuration.

Related issue two years ago: #5965

Imho that's a frontend issue, so I'm closing this here.

icinga-migration commented 7 years ago

Updated by magnus on 2016-12-08 07:09:11 +00:00

mfriedrich wrote:

The Livestatus specification lacks of many details you'll only get when reading their source code. Sorting is at least not supported by a given attribute, that is an exclusive patch in Naemon's livestatus only

Icinga 2 doesn't care about sorting results in any interface. status.dat/objects.cache and the API return unordered result sets as an array as well. DB IDO is different but object config dump queries happen unordered too.

I don't think this is related to just API created objects - it just might be more visible with two different places for configuration.

Related issue two years ago: #5965

Imho that's a frontend issue, so I'm closing this here.

Ok. I will file a report to thruk instead.

Best Regards Magnus