meerkat-dashboard/meerkat

Elements that use Element Type = Host make malformed api calls

sol1-matt opened this issue · 0 comments

Describe the bug
Elements that use Element Type = Host make malformed api calls.

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 eg: my_server.example.com
  4. The element may not match the Icinga Hosts state
    if you look in the logs the api call for this element is
https://icinga:5665/v1/objects/hosts?service=my_server.example.com

Expected behavior
The api call to get a host are
https://icinga:5665/v1/objects/hosts/my_server.example.com
https://icinga:5665/v1/objects/hosts?hosts=my_server.example.com

Additional Info
Instead of making different api calls depending on the type of object requested it may be simpler to have the UI remain the same but store host and service Element Type's as filters.
eg: Select Element Type Host and select my_server.example.com from the list.
This is stored and executed as a host filter host.name=="my_server.example.com"

  • Meerkat Version = 3.1.0