Forum Discussion

Alfred_Heijkoop's avatar
Alfred_Heijkoop
Icon for Contributor III rankContributor III
29 days ago

GQL Device linked to Collector

Hi,

For trouble shoot, I want to have an overview of the devices linked to the collector where the (SNMP) device is allocated to.

Pulling all the devices with attributes are working fine, also the related collector group and his group members. I am not able to find a solution to get device-to-collector.

Is someone having a example GQL? Any suggestions?

Thanks in advance.

Alfred

 

  • Hey Alfred_Heijkoop, here’s how to get all the devices for a specific collector group: 

    query devices {
      devices(search: {collectorGroup: {has: {name: {eq: "myCollectorGroupName"}}}}) {
        edges {
          node {
            id
            name
            collectorGroup {
              id
              name
            }
          }
        }
      }
    }

    • Alfred_Heijkoop's avatar
      Alfred_Heijkoop
      Icon for Contributor III rankContributor III

      Hi ahmadsous,

      Thanks for the GQL. I was a aware how the retrieve the relation between the devices and the collector group(s).

      My question was more how to find out which collector is hosting which device.

      Alfred