You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Final Production version of the Electron app with Team Chronos 3.0's UI revamp.
Still to come are the route data integration into D3 node graph and front-end file structure. And eventually the visualization of container stats in graphs/charts.
Microservice communication, health, and Docker container visualizer.
4
+
Comes with a middleware and an Electron app.
14
5
15
6
## Features
16
7
8
+
* NEW (3.0+): Docker container stats (e.g. ID, memory usage %, CPU usage %, running processes, etc.) (New middleware compiled from TypeScript.)
17
9
* HTTP request tracing
18
10
* Speed and latency tracking
19
11
* Process monitoring
20
12
* Memory usage
21
13
14
+
## NEW FEATURE FOR 3.0+ - Logging Docker Container Stats
15
+
16
+
IMPORTANT: Give your containers the same names you use for arguments for microservice names. Read more about it under the INSTALLATION section below.
17
+
18
+
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:
19
+
`/var/run/docker.sock`
20
+
21
+
For example, you can type the following when starting up a container:
22
+
`docker run -v /var/run/docker.sock:/var/run/docker.sock [your-image-tag]`
23
+
24
+
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:
25
+
```
26
+
volumes:
27
+
- "/var/run/docker.sock:/var/run/docker.sock"
28
+
```
29
+
30
+
*Note: This module leverages the features of [systeminformation](https://systeminformation.io/).
31
+
22
32
## Installation
23
33
24
34
Chronos consists of a [Node](https://nodejs.org/en/) module available through the
25
35
[npm registry](https://www.npmjs.com/) and a lightweight [Electron](https://electronjs.org/) desktop application.
26
36
27
37
#### Node module
28
38
29
-
To begin, install the [Chronos](https://www.npmjs.com/package/chronos-microservice-debugger3) node module within each microservice of your application using the
39
+
To begin, install the [Chronos](https://www.npmjs.com/package/chronos-microservice-debugger4) node module within each microservice of your application using the
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.
48
67
49
-
cmd.microCom takes four parameters and an optional fifth parameter. You can enter the arguments as individual strings or as an array.
68
+
cmd.microCom takes six parameters. You can enter the arguments as individual strings or as an array.
50
69
51
70
The parameters are:
52
-
1. microserviceName: To identify the microservice (i.e. "payments")
53
-
2. databaseType: Enter either "mongo" or "sql"
54
-
3. databaseURL: Enter the URL of your database
55
-
4. wantMicroHealth: Do you want to monitor the health of this microservice? Enter "yes" or "no"
56
-
5. queryFrequency (optional): How frequently do you want to log the health of this microservice? It defaults to every minute, but you can choose:
57
-
* "s" : every second
58
-
* "m" : every minute (default)
59
-
* "h" : every hour
60
-
* "d" : once per day
61
-
* "w" : once per week
71
+
*[1] microserviceName: To identify the microservice (i.e. "payments").
72
+
- Make sure this name matches your container name. More details more below (param #6).
73
+
- Your input name for the microservice will be turned to an all-lowercase string.
74
+
*[2] databaseType: Enter either "mongo" or "sql".
75
+
*[3] databaseURL: Enter the URL of your database.
76
+
*[4] wantMicroHealth: Do you want to monitor the health of this microservice? Enter "yes" or "no".
77
+
- 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.
78
+
*[5] queryFrequency (optional): How frequently do you want to log the health of this microservice? It defaults to every minute, but you can choose:
79
+
- "s" : every second
80
+
- "m" : every minute (default)
81
+
- "h" : every hour
82
+
- "d" : once per day
83
+
- "w" : once per week
84
+
*[6] isDockerized: Is this microservice running in a Docker container? Enter "yes" or "no". (Defaults to "no".)
85
+
- 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.
86
+
- Don't forget to bind mount to Docker socket. See NEW FEATURE section above.
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.
109
+
110
+
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.
111
+
112
+
Refer to the [README](https://github.com/oslabs-beta/Chronos/tree/docker/microservice) of that branch for more details.
80
113
81
114
#### Electron desktop application
82
115
83
-
After installing the node module in each microservice, download the Electron desktop application from the public [Chronos](https://github.com/Chronos2-0/Chronos) repo.
116
+
After installing the node module in each microservice, download the Electron desktop application from the public [Chronos](https://github.com/oslabs-beta/Chronos) repo.
84
117
85
118
Inside the downloaded directory, install all dependencies using the `npm install` command followed by the `npm start` command to start the Electron desktop application.
86
119
@@ -90,6 +123,13 @@ Chronos hopes to inspire an active community of both users and developers. For q
0 commit comments