allantinker
Posts: 2
Joined: Mon Oct 03, 2022 8:23 pm

Remote network monitor.

Mon Oct 03, 2022 8:32 pm

I'm trying to build a remote network monitor I can place at clients locations to test latency and speed data.
However I want it to send that data to a server here on site to log, and display the results.

I was thinking I would use a pi and I could send it to clients, they plug it into the network and I can test latency and run iperf every hour. However, my biggest issues are 1, how would I send that data to a remote node.js server, and b, how do I get the pi to actually do and send the data?

I can make bash scripts all day long and throw them in cron to run pings and iperf. But I cant seem to figure out an easy enough way to send the results to the server.

Once I have it on the server I can store it in a database and go from there..

It should be noted that all clients are my ISP customers, so they will all have access to the server (I planned on using private 172 IPs) That way if they plug the device behind their NAT, I only really have to worry about their firewall not allowing outbound ports. (I could use like 443 I guess)

Any advice, or repos that would help me would be appreciated!

Thanks!

User avatar
rpdom
Posts: 20889
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Remote network monitor.

Mon Oct 03, 2022 9:29 pm

I believe it is relatively simple to set up a basic webserver with node.js, so you could have the client use POST to send the results to the server.
Unreadable squiggle

allantinker
Posts: 2
Joined: Mon Oct 03, 2022 8:23 pm

Re: Remote network monitor.

Tue Oct 04, 2022 11:48 am

rpdom wrote:
Mon Oct 03, 2022 9:29 pm
I believe it is relatively simple to set up a basic webserver with node.js, so you could have the client use POST to send the results to the server.
I've made quite a few node.js applications in the past, mostly just as a bridge between a web client and a database. But when it comes to actually pinging and performing the tests on the pi, and saving them somewhere, then posting to the server.. I'm not sure if there is a better solution.

My idea was have the pi write the results locally, then post, then delete the results, but that seems like a lot of steps just to ensure I don't fill up the storage on the pi. But that would also leave a gap in my testing while it posts and deletes unless I can get it to run in the background or something.

epoch1970
Posts: 8184
Joined: Thu May 05, 2016 9:33 am
Location: France

Re: Remote network monitor.

Tue Oct 04, 2022 12:06 pm

Syncthing or equivalent could synchronize a test results file on a continuous basis.
Your server would only see in its filesystem the latest, complete, file.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Return to “Networking and servers”