Skip to content

Commit 9360080

Browse files
Merge pull request #94 from ronellecaguioa/readme
Update README
2 parents 6def103 + 28ecacb commit 9360080

2 files changed

Lines changed: 114 additions & 81 deletions

File tree

README.md

Lines changed: 114 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,142 +1,176 @@
1-
![Chronos logo](https://raw.githubusercontent.com/Chronos2-0/Chronos/master/app/assets/logo2.png)
2-
## Chronos
3-
Microservice communication, health, and Docker container visualizer.
4-
Comes with a middleware and an Electron app.
1+
<p align="center">
2+
<img src="./app/assets/chronos-v4.png" height=300/>
3+
</p>
54

6-
## Features
5+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/open-source-labs/Chronos)
6+
![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
7+
![Release: 4.0](https://img.shields.io/badge/Release-4.0-orange)
78

8-
* NEW (3.0+): Docker container stats (e.g. ID, memory usage %, CPU usage %, running processes, etc.) (New middleware compiled from TypeScript.)
9-
* HTTP request tracing
10-
* Speed and latency tracking
11-
* Process monitoring
12-
* Memory usage
9+
# Chronos
1310

14-
## NEW FEATURE FOR 3.0+ - Logging Docker Container Stats
11+
> A developer tool that monitors the health and web traffic of servers, microservices, and containers.
1512
16-
IMPORTANT: Give your containers the same names you use for arguments for microservice names. Read more about it under the INSTALLATION section below.
13+
## NEW FEATURES FOR 4.0+ - Real-time Data and Docker Container Stats
1714

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`
15+
- Improved user interface & experience
16+
- Real-time data monitoring
17+
- Decreased loading times
18+
- Automated notifications(Slack, email)
19+
- Easier to use configuration file
20+
- Now works on Linux, Mac, and Windows
21+
- Previous versions(less than 4.0) of Chronos are no longer supported
2022

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]`
2323

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:
24+
## Core Features
25+
<!-- * HTTP request tracing -->
26+
- Docker container stats (e.g. ID, memory usage %, CPU usage %, running processes, etc.)
27+
- Temperature, speed, latency, and memory tracking
28+
- Process monitoring
29+
30+
# Quick start
31+
32+
Install dependencies
33+
2534
```
26-
volumes:
27-
- "/var/run/docker.sock:/var/run/docker.sock"
35+
npm install chronos-tracker
2836
```
2937

30-
*Note: This module leverages the features of [systeminformation](https://systeminformation.io/).
38+
Create `chronos-config.js` within the **same directory** as your `server.js`
3139

32-
## Installation
40+
```js
41+
const chronos = require('chronos-tracker');
42+
43+
cmd.use({
44+
microservice: 'chronos-mon-2',
45+
interval: 3000,
46+
dockerized: true,
47+
database: {
48+
type: 'MongoDB',
49+
URI: /* NEW DATABASE URI */,
50+
},
51+
notifications: [
52+
{
53+
type: 'slack',
54+
settings: {
55+
slackurl: /* YOUR SLACK WEBHOOK URL*/,
56+
},
57+
},
58+
{
59+
type: 'email',
60+
settings: {
61+
emails: /* EMAIL RECIPIENT LIST */,
62+
emailHost: /* EMAIL HOST */,
63+
emailPort: /* EMAIL PORT */,
64+
user: /* SENDER EMAIL ADDRESS */,
65+
password: process.env.EMAIL_PASSWORD,
66+
},
67+
},
68+
],
69+
});
70+
```
3371

34-
Chronos consists of a [Node](https://nodejs.org/en/) module available through the
35-
[npm registry](https://www.npmjs.com/) and a lightweight [Electron](https://electronjs.org/) desktop application.
72+
Refer to section setup for more information on these properties
3673

37-
#### Node module
3874

39-
To begin, install the [Chronos](https://www.npmjs.com/package/chronos-microservice-debugger4) node module within each microservice of your application using the
40-
[`npm install`](https://docs.npmjs.com/getting-started/installing-npm-packages-locally)command:
75+
_NOTE: Email notification settings may require alternative security settings to work_
4176

42-
```
43-
npm install chronos-microservice-debugger4
44-
```
77+
Initialize chronos
78+
79+
```js
80+
const cmd = require('chronos-tracker');
81+
require('./cmd-config'); // Bring in config file
4582

46-
Once installed, write the following two lines at the top of each microservice's server file:
47-
```javascript
48-
const cmd = require('chronos-microservice-debugger4');
4983
cmd.propagate();
84+
app.use('/', cmd.track());
5085
```
5186

52-
Then add a route handler for all incoming requests:
53-
```js
54-
app.use('/',
55-
cmd.microCom(
56-
'microserviceName',
57-
'databaseType',
58-
'databaseURL',
59-
'wantMicroHealth',
60-
'queryFrequency',
61-
'isDockerized'
62-
)
63-
)
87+
Download Chronos to view your application data [here]()
88+
89+
<!-- # Installation
90+
91+
Chronos consists of a [Node](https://nodejs.org/en/) module available through the
92+
[npm registry](https://www.npmjs.com/) and a lightweight [Electron](https://electronjs.org/) desktop application. -->
93+
94+
# Containerized Applications Using Docker
95+
96+
IMPORTANT: Give your containers the same names you use for arguments for microservice names. Read more about it under the INSTALLATION section below.
97+
98+
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:
99+
`/var/run/docker.sock`
100+
101+
For example, you can type the following when starting up a container:
102+
`docker run -v /var/run/docker.sock:/var/run/docker.sock [your-image-tag]`
103+
104+
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:
105+
106+
```
107+
volumes:
108+
- "/var/run/docker.sock:/var/run/docker.sock"
64109
```
65110

66-
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.
111+
\*Note: This module leverages the features of [systeminformation](https://systeminformation.io/).
112+
67113

68-
cmd.microCom takes six parameters. You can enter the arguments as individual strings or as an array.
114+
## Configuration Setup
69115

70-
The parameters are:
71-
* [1] microserviceName: To identify the microservice (i.e. "payments").
116+
- [1] microserviceName: To identify the microservice (i.e. "payments").
72117
- Make sure this name matches your container name. More details more below (param #6).
73118
- 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".
119+
- [2] databaseType: Enter either "mongo" or "sql".
120+
- [3] databaseURL: Enter the URL of your database.
121+
- [4] wantMicroHealth: Do you want to monitor the health of this microservice? Enter "yes" or "no".
77122
- 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:
123+
- [5] queryFrequency (optional): How frequently do you want to log the health of this microservice? It defaults to every minute, but you can choose:
79124
- "s" : every second
80125
- "m" : every minute (default)
81126
- "h" : every hour
82127
- "d" : once per day
83128
- "w" : once per week
84-
* [6] isDockerized: Is this microservice running in a Docker container? Enter "yes" or "no". (Defaults to "no".)
129+
- [6] isDockerized: Is this microservice running in a Docker container? Enter "yes" or "no". (Defaults to "no".)
85130
- 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.
86131
- Don't forget to bind mount to Docker socket. See NEW FEATURE section above.
87132

88-
String parameter example:
89-
```javascript
90-
app.use('/', cmd.microCom('payments', 'mongo', 'mongodb+srv://user:password@cluster0-abc.mongodb.net/','yes','m','no'))
91-
```
92133

93-
Array parameter example:
94-
```javascript
95-
let values = [
96-
'payments',
97-
'mongo',
98-
'mongodb+srv://user:password@cluster0-abc.mongodb.net/',
99-
'no',
100-
'h',
101-
'yes'
102-
]
103-
104-
app.use('/', cmd.microCom(values)
105-
```
106-
#### Microservice Test Suite
134+
## Microservice Test Suite
107135

108-
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.
136+
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.
109137

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.
138+
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.
111139

112140
Refer to the [README](https://github.com/oslabs-beta/Chronos/tree/docker/microservice) of that branch for more details.
113141

114142
#### Electron desktop application
115143

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.
144+
After installing the node module in each microservice, download the Electron desktop application from the public [Chronos]() repo.
117145

118146
Inside the downloaded directory, install all dependencies using the `npm install` command followed by the `npm start` command to start the Electron desktop application.
119147

120148
## Contributing
121149

122-
Chronos hopes to inspire an active community of both users and developers. For questions, comments, or contributions, please submit a pull request.
150+
Development of Chronos is open source on GitHub through the tech accelerator umbrella OS Labs, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving Chronos.
151+
152+
- [Contributing Guide](https://github.com/oslabs-beta/Chronos/CONTRIBUTING.md)
123153

124154
## People
125155

126156
[Tim Atapagra](https://github.com/timpagra),
127-
[Brian Bui](https://github.com/Umius-Brian),
157+
[Todd Buckner](https://github.com/tdwolf6),
158+
[Brian Bui](https://github.com/Umius-Brian),
159+
[Ronelle Caguioa](https://github.com/ronellecaguioa),
128160
[Mohtasim Chowdhury](https://github.com/mohtasim317),
129161
[Ousman Diallo](https://github.com/Dialloousman),
130162
[Michelle Herrera](https://github.com/mesherrera),
131-
[Alan Lee](https://github.com/ajlee12/),
163+
[Alan Lee](https://github.com/ajlee12/),
132164
[Duane McFarlane](https://github.com/Duane11003),
133165
[Ben Mizel](https://github.com/ben-mizel),
134-
[Alon Ofengart](https://github.com/alon25),
166+
[Alon Ofengart](https://github.com/alon25),
167+
[Greg Palasciano](https://github.com/gregpalace),
135168
[Jenae Pennie](https://github.com/jenaepen),
136169
[Chris Romano](https://github.com/robicano22),
137170
[Brianna Sookhoo](https://github.com/briannasookhoo),
138-
[Natalie Umanzor](https://github.com/nmczormick)
171+
[Natalie Umanzor](https://github.com/nmczormick),
172+
[Michael Wang](https://github.com/wang3101)
139173

140174
## License
141175

142-
[MIT](https://github.com/oslabs-beta/Chronos/blob/master/LICENSE.md)
176+
Chronos is [MIT licensed.](https://github.com/oslabs-beta/Chronos/blob/master/LICENSE.md)

app/stylesheets/MainContainer.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
.copyright-container {
1717
@include centerWithFlex(center);
18-
position: fixed;
1918
bottom: 0;
2019
width: 100%;
2120
padding: 10px;

0 commit comments

Comments
 (0)