Microservice communication, health, and Docker container visualizer. Comes with a middleware and an Electron app.
- NEW (3.0+): Docker container stats (e.g. ID, memory usage %, CPU usage %, running processes, etc.) (New middleware compiled from TypeScript.)
- HTTP request tracing
- Speed and latency tracking
- Process monitoring
- Memory usage
NEW FEATURE FOR 3.0+ - Logging Docker Container Stats
IMPORTANT: Give your containers the same names you use for arguments for microservice names. Read more about it under the INSTALLATION section below.
IMPORTANT: In order to have container stats saved to your database along with other health info, when starting up the containers, bind volumes to this path:
For example, you can type the following when starting up a container:
docker run -v /var/run/docker.sock:/var/run/docker.sock [your-image-tag]
If you're using docker-compose to start up multiple containers at once, you can add a
volumes key for each of your services in the YAML file:
volumes: - "/var/run/docker.sock:/var/run/docker.sock"
*Note: This module leverages the features of systeminformation.
npm install chronos-microservice-debugger4
Once installed, write the following two lines at the top of each microservice's server file:
const cmd = ;cmd;
Then add a route handler for all incoming requests:
The cmd.microCom handler function logs communication and health data to a user-provided database. This is to ensure that your private data stays private. We currently support MongoDB and SQL/PostgreSQL databases.
cmd.microCom takes six parameters. You can enter the arguments as individual strings or as an array.
The parameters are:
-  microserviceName: To identify the microservice (i.e. "payments").
- Make sure this name matches your container name. More details more below (param #6).
- Your input name for the microservice will be turned to an all-lowercase string.
-  databaseType: Enter either "mongo" or "sql".
-  databaseURL: Enter the URL of your database.
-  wantMicroHealth: Do you want to monitor the health of this microservice? Enter "yes" or "no".
- Note: If you choose "yes" for this param, the middleware will NOT log container stats. In other words, if you want container stats instead, input "no" here and "yes" for param #6.
-  queryFrequency (optional): How frequently do you want to log the health of this microservice? It defaults to every minute, but you can choose:
- "s" : every second
- "m" : every minute (default)
- "h" : every hour
- "d" : once per day
- "w" : once per week
-  isDockerized: Is this microservice running in a Docker container? Enter "yes" or "no". (Defaults to "no".)
- IMPORTANT: When starting up the container, give it the same name that you used for the microservice, because the middleware finds the correct container ID of your container by matching the container name to the microservice name you input as 1st argument.
- Don't forget to bind mount to Docker socket. See NEW FEATURE section above.
String parameter example:
Array parameter example:
let values ='payments''mongo''mongodb+srv://user:email@example.com/''no''h''yes'app
Microservice Test Suite
Additionally, the repo includes a test suite of microservices utilizing the Chronos node module so that their communication, health, and container data can be logged. You can then visualize the data with the Electron app.
The microservices include individual Dockerfiles in their respective directories. A docker-compose.yml is in the root directory in case you'd like to deploy all services together.
Refer to the README of that branch for more details.
Electron desktop application
After installing the node module in each microservice, download the Electron desktop application from the public Chronos repo.
Inside the downloaded directory, install all dependencies using the
npm install command followed by the
npm start command to start the Electron desktop application.
Chronos hopes to inspire an active community of both users and developers. For questions, comments, or contributions, please submit a pull request.
Previous teams who laid the foundation and put in invaluable work: Tim Atapagra, Mohtasim Chowdhury, Ousman Diallo, Michelle Herrera, Duane McFarlane, Ben Mizel, Jenae Pennie, Chris Romano, Natalie Umanzor