Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Architecture of node monitor and monitor dashboard #28

Open
geniant opened this issue Aug 12, 2015 · 3 comments
Open

Architecture of node monitor and monitor dashboard #28

geniant opened this issue Aug 12, 2015 · 3 comments

Comments

@geniant
Copy link

geniant commented Aug 12, 2015

Hello @lorenwest and everyone.
I apology for bothering you
What I wanted to know about the architecture of the monitor and the dashboard.
Here what I understood:
the node monitor is a server and the dashboard is a client of that server.
the monitor an the probe exchange data with events ("probe:change") but I didn't find exactly where the probe send data.
the dashboard has a server to show on localhost:4200.
when I close the dashboard script, the monitor script tells me that there is a client error (connection reset)
when I start the dashboard without starting any monitor server, the dashboard tells me : enable to connect to host ... (the ip address)
normally, probes are clients to the monitor no ?
I think also that the dashboard server is behaving as a client with the monitor server, or dashboard server connects to client, and this client connects to the monitor server to forward events and data.
Any help or clarification ?

@lorenwest
Copy link
Owner

It sounds like you have the correct understanding. Each nodejs application that includes node-monitor and calls monitor.start() is offering their internal probes as a server to other monitor processes.

Other applications can connect with these probes using node-monitor. Connections are made with socket.io, and are two way so both can offer their probe data to each other once connected.

The monitor-dashboard application has internal probes that you can view, and it can connect to other node-monitor processes to view their probes as well.

The last piece is that the browser running the UI for the monitor-dashboard is a client to the node-monitor module running within the monitor-dashboard, which acts as a router so the browser can connect to remote processes directly using socket.io. That's how the monitor-dashboard can show a real time REPL to any backend process that the monitor-dashboard app is connected with.

@geniant
Copy link
Author

geniant commented Aug 12, 2015

Great, Thanks for the clarification.
But in the case of running the node-monitor on a computer placed on a local network, how can the dashboard connect on it ?
normally it won't appear in the server list even if I modify the configuration in the component 'view source' by making the hostName : 'the public IP of local network router'.
Is there any thing in the code that could solve this problem ?
Because I saw reusing sockets but I didn't understood could they help and if yes how.

@lorenwest
Copy link
Owner

The servers listed in the dropdown are only discovered by other components using those servers. In other words, create a component using localhost then view-source that component and change the server name to the internal network name of the other server. Once that component is saved, then the monitor dashboard knows about it, and it becomes available in the dropdown for future components added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants