# Labels on a graph connection/edge in Kibana Graph

**URL:** <https://discuss.elastic.co/t/labels-on-a-graph-connection-edge-in-kibana-graph/167782>\
**Category:** Kibana\
**Tags:** elastic-stack-graph\
**Created:** [February 11, 2019, 2:16am UTC](https://discuss.elastic.co/t/labels-on-a-graph-connection-edge-in-kibana-graph/167782 "2019-02-11T02:16:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vnktsh](https://avatars.discourse-cdn.com/v4/letter/v/db5fbb/32.png) [@vnktsh](https://discuss.elastic.co/u/vnktsh)\
**Post date:** [February 11, 2019, 2:16am UTC](https://discuss.elastic.co/t/labels-on-a-graph-connection-edge-in-kibana-graph/167782/1 "2019-02-11T02:16:20Z")

</div>

Hello,

I have been experimenting with x-pack graph module in Kibana. In our use case we have set of 'nodes' which are related in 'subject' 'predicate' 'object' manner. Is there a way to represent 'predicate' on the connection between 'subject' and 'object'?

In my example, I have set of nodes "Rule\_Name" which "detects" a security threat "CVE-XXX". I was able to represent each connection/edge as document which has information about end nodes and their relationship like "subject: Rule\_Name --\> predicate: Detects --\> object:CVE". However in visualization, I was not able to set "detects" as a label, instead my only option was to represent it as separate node.

 ![kibana-graph](https://us1.discourse-cdn.com/elastic/original/3X/d/c/dc4559df79d85adf739cf7e2eacfc497509ce4d3.jpeg)

Is there a way to provide "detects" as label on the edge?

Reference:  
I have come across this thread: [Label on Edges?](https://discuss.elastic.co/t/label-on-edges/51451)  
and @Mark_Harwood said Graph module might be lacking that feature. His quote:

> Right now we don't have special UI logic for the special case where one edge = one document but we may look at adding this in future.

Is there any support in current version of graph for these type of relationships?

Thank you.

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [February 11, 2019, 10:27am UTC](https://discuss.elastic.co/t/labels-on-a-graph-connection-edge-in-kibana-graph/167782/2 "2019-02-11T10:27:34Z")

</div>

> [@vnktsh](#):
>
> Is there any support in current version of graph for these type of relationships?

No, each edge connecting a pair of terms could represent many documents (perhaps millions) which means there could be different roles/directions describing the pairing of these terms. The use of a "connecting" term as in your example would be one way to clarify the relationship.  
However, rather than using a single "detects" term as in your example you could use a unique term to define the relationship e.g. use 2 documents like this:

```
{ "subject": "ip:xyz", relationship:"ip:XYZ-->detects-->CVE:123" }

```

and

```
{ "threat": "CVE:123", relationship:"ip:XYZ-->detects-->CVE:123" }

```

This might give you cleaner looking graphs which have less of the "pentagram" look to them (all nodes connected by criss-crossing lines) and instead cleaner separation of relationships.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 11, 2019, 10:27am UTC](https://discuss.elastic.co/t/labels-on-a-graph-connection-edge-in-kibana-graph/167782/3 "2019-03-11T10:27:40Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
