Skip to main content

Relationships

Relationships associate two different configs. They help in visualizing the connection of a config above and below in a hierarchy. Example: A kubernetes pod is linked to a Deployment and Replicaset and also to the persistent volumes.

Kubernetes Relationship

Relationship Config

This transformation function allows you to dynamically form relationships between two different config items using selectors.

Example: You can link a kubernetes deployment with the corresponding pods, or you can link AWS EC2 instances with the AWS Account. It's even possible to link two configs scraped by different scrape configs like: linking a Kubernetes Node in an EKS cluster to the EC2 instance.

FieldDescriptionSchemeRequired
filterSpecify the config item with which relationship should be formedstringtrue
exprcel-expression that returns a list of relationship selector.string
idid of the config to link toRelationshipLookup
namename of the config to link toRelationshipLookup
typetype of the config to link toRelationshipLookup
agentagent of the config to link toRelationshipLookup
labelsLabels of the config to link toRelationshipLookup
info

expr is an alternative, more flexible, way to define the selectors. Either use expr or the other selector fields (id, name, type, agent, labels) but not both. See example.

RelationshipSelector

FieldDescriptionSchemeRequired
idid of the config to link tostring
nameid of the config to link tostring
typeid of the config to link tostring
agentid of the config to link tostring
labelsLabels of the config to link tomap[string]string

Relationship Lookup

RelationshipLookup offers different ways to specify a lookup value

FieldDescriptionSchemeRequired
exprUse an expression to get the valuestring
valueSpecify a static valuestring
labelGet the value from a labelstring

Template Variables

Both the filter and expr in the relationship config & the expr in relationship lookup receive the ScrapeResult as its template variable.