History search does not retrieve the right result list when filter by hard states

Hi all:

  • Icinga DB Web version (System - About):
    Last version of master github, as of date 02-Aug-2022

  • Icinga Web 2 version (System - About):
    2.11.1

  • Web browser:
    Chrome for windows

  • Icinga 2 version (icinga2 --version):
    2.13.4

  • Icinga DB version (icingadb --version):
    1.0.0

  • PHP version used (php --version):
    8.0.21

  • Server operating system and version:
    RHEL 8.6

I am performing a historical search based in the following screenshot:

The goal is to list only the history of hosts in CRITICAL hard state. I do not interested if soft states, only in the hard ones. Icingaweb make the search through the following URL:

icingadb/history?history.object_type=host&history.event_type=state_change&host.state.is_problem=y&host.state.state_type=hard&host.state.hard_state=1&view=detailed

But the result list shows also soft states:

Am I misunderstanding something? The search is exactly the same as in deprecated monitoring module. Best regards.

Sorry, the output result list is wrong, the right output screenshot is as follows:

As you can see, it shows state changes to CRITICAL, but also shows soft states, when the filter is specifying Host State Type=hard and Host Hard State = 1.

Regards

Hi!

The last three conditions target the current state of a host.

Try this instead: history.object_type=host&history.event_type=state_change&history.state.state_type=hard&history.state.hard_state=1

1 Like

Dear Johannes,

thank you very much for your useful response. Obviously, I was misunderstanding something :grinning:

In order to target historical events, is needed to prepend the search form with the word Event in the text box and wait to the completion (cool functionality), as this screenshot shows:

After that, you will get the right result set.

Regards from Spain!

1 Like