• /
  • Log in
  • Free account

NerdGraph relationships API tutorial

One way to understand how your monitored entities relate to each other is through our NerdGraph API.

The NerdGraph relationship API captures how pairs of entities interact and how they're related. By using the API, you can troubleshoot upstream and downstream services and understand how minor issues may have larger repercussions, similar to service maps.

Relationship types

Relationship types provide additional information about how two entities are related. The supported relationship types are:

Type

Description

CALLS

The relationship between one service or application calling another. Used to display upstream and downstream services.

CONTAINS

The relationship and hierarchical use cases common to modern and cloud infrastructure. For example, this could indicate that the HOST contains a container.

HOSTS

The relationship between an application or process and the system it runs on.

SERVES

The relationship between a back-end application and the browser application it returns in the response.

Read relationships of an entity

You can use the NerdGraph relationship API to read the existing relationship of your monitored entities. The following example shows how to query an entity by its specific GUID, using the NerdGraph GraphiQL explorer. For more information, see Use NerdGraph to query entities.

query{
  actor{
    entity(guid: YOUR_ENTITY_GUID){
      name
      relationships{
        source {
          entity{
            guid,
            name
          }
        }
        target {
          entity{
            guid,
            name
          }
        },
        type
      }
    }
  }
}

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.