Serstat is a scalable, real-time monitoring application for collecting and displaying resource information of many servers in a network.
- Node.js as the primary framework and for the cluster module.
- React.js for the real-time dashboard.
- Express.js for the backend api.
- MongoDB for the storage of metrics in timeseries collections.
- Socket.io for websockets.
- Redis adapter for socketio.
On its own, serstat has a react based dashboard for displaying real-time information. However, since the data can be stored in a mongodb collection, one could leverage mongo's features for creating charts as explained later.
A react dashboard which displays metrics in real time.
The metrics are by default, stored in a mongoDB collection which can be used for creating charts as explained in the mongodb charts guide. In future, the react dashboard may possibly display this information itself.
The application comprises of 3 components:
- React Dashboard
- Agent Script
- SocketIO Server
The socketIO server is responsible for creating node cluster for concurrent processing when a large number of servers are sending their data simultaneously. By default, the socketio server will update the dashboard on an interval of 1000ms which can be configured as per the user's needs.
First, clone this repository on your host machine.
First, install the socketio server using the following commands:
$ cd server
$ npm i
$ npm start
Make sure to copy the .env_sample
file into .env
and set up the environment variables accordingly
Install and start the react dashboard using the following commands:
$ cd client
$ npm i
$ npm start
Again, make sure to copy the .env_sample
file into .env
and set up the environment variables accordingly
For every device in the system, you have to run an agent on it. To install and start an agent, use the following commands:
$ cd agent
$ npm i
$ npm start
Make sure to set up the environment variables in the .env
file accordingly
With your provided credentials, a mongodb timeseries collection will be created. Follow the mongodb charts guide for instructions on setting up charts for your choice of metrics.
That being said, contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
This project is heavily inspired by
Distributed under the MIT License. See LICENSE.txt
for more information.