meerkat-dashboard / meerkat

Drag-and-drop dashboards for Icinga
https://meerkat.run
GNU Affero General Public License v3.0
18 stars 2 forks source link

Host based elements are displaying the check result rather than the host state. #220

Closed sol1-matt closed 1 year ago

sol1-matt commented 1 year ago

Describe the bug Host based elements are displaying the check result rather than the host state. The check result is from results[0].attr.last_check_result.state and is the result the check returns. This can be OK, WARNING, CRITICAL, UNKNOWN or PENDING.

A hosts status is from results[0].attr.state and is OK, CRITICAL, UNKNOWN or PENDING.

To Reproduce Steps to reproduce the behavior:

  1. Create test dashboard
  2. Add element with Element Type of Host
  3. Select a host from the drop down that is in a OK state but the check is returning a warning state, eg: host with http check returning 404. The element returns as warning which is incorrect.

Expected behavior The element state should match Icinga's state

Additional context Meerkat can predict what the host state should be based on the last_check_result.state value if the event stream doesn't have the hosts state and only has the last check results state.

63 commented 1 year ago

https://icinga.com/docs/icinga-2/latest/doc/03-monitoring-basics/ image