Search code examples
loggingclientignite

How to log client IP address in apache ignite server logs?


I have multiple local ignite server nodes (caches) running in a cluster and a client node that connects to this cluster to run some queries. This client node can be started from any number of machines (n machines = n client nodes). I want to log from which machine the client node was started. Does anybody know how do we print in the server node logs when a client node connects to it? It prints out the topology but is there a way to know the client IP addresses and what query the client node has executed?


Solution

  • For each joined node Ignite generates EVT_NODE_JOINED event which contains all the information about the joined node, including IP addresses it's running on. You can subscribe for this event and print out this information from the listener. See this page for more information about Ignite events: https://apacheignite.readme.io/docs/events