Eavesdropper
Motivation
We wanted the ability for a node to join a cluster and monitor the logs of all the nodes in the cluster without adding anything as a dependency.
Installation
It's available on Hex, the package can be installed as:
Installing and configuring the receiving application
-
add
:eavesdropperto your dependenciesdef deps do [ {:eavesdropper, "~> 0.0.1"} ] end -
add to the application tree
{Eavesdropper.Receiver, []}, {Eavesdropper.LogForwarder, []} -
Add configs
config :eavesdropper, receiving_node: "earth@127.0.0.1", # name of the node that will receive the logs min_level: :error, # The minimum level of logs to be forwarded truncate: 4096 # max of logs (default is what Logger is defaulted to) -
Once connected to a node run
Eavesdropper.start_eavesdropping(node_name)to start seeing the logs from the target node -
To stop eavesdropping on a target node run
Eavesdropper.stop_eavesdropping(node_name)