Skip to content

"icinga2 object list -t Host" misses host groups #10348

Open
@oxzi

Description

Describe the bug

Starting with an Icinga 2 setup with hosts and these hosts being part of host groups. When querying these hosts via icinga2 object list -t Host, no groups are being listed.

$ icinga2 object list -t Host | grep groups
  * groups = [ ]
  * groups = [ ]
  * groups = [ ]
[ . . . ]

However, this information is available when using the Icinga 2 API.

curl -k -s -S -u "icingadb-web:$ICINGA2_API_PASSWORD" -H 'Accept: application/json' 'https://localhost:5665/v1/objects/hosts?pretty=1' | grep -A 1 'groups": \[$'
                "groups": [
                    "openbsd-servers"
--
                "groups": [
                    "openbsd-servers"
--
                "groups": [
                    "linux-servers"

[ . . . ]

To Reproduce

Create one or multiple Host objects, place these in HostGroups, execute the commands from above.

Expected behavior

I would expect the groups to be part of the icinga2 object list output.

Screenshots

N/A

Your Environment

Include as many relevant details about the environment you experienced the problem in

  • Version used (icinga2 --version): r2.14.5-1

Additional context

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions