cancel
Showing results for 
Search instead for 
Did you mean: 

Join the community at Nodes 2022, our free virtual event on November 16 - 17.

How to get the hostname from cypher so I can know which node the session is talking to.

melonman
Neo4j
Neo4j

Hi Experts,

I am looking for a cypher, apoc or any method to get the hostname to which the current session is talking to.

For example, when I am connecting to a set of node configured in a causal cluster from a python client, I want to know which neo4j node is serving the read or write by retrieving hostname. Is there a way to do this?

Any guidance, comment, input would be appriciated.

Thank you!

1 ACCEPTED SOLUTION

I think you can use dbms.listConnections() or SHOW CONNECTIONS that has a clientAddrewss and serverAddress field.

https://neo4j.com/docs/operations-manual/current/monitoring/connection-management/

View solution in original post

2 REPLIES 2

I think you can use dbms.listConnections() or SHOW CONNECTIONS that has a clientAddrewss and serverAddress field.

https://neo4j.com/docs/operations-manual/current/monitoring/connection-management/

Thank you @michael_hunger !