|
1 | 1 | ## What's New?
|
| 2 | +- Enhanced Metrics Collection: Docker now supports Prometheus metrics scraping, offering improved monitoring capabilities |
| 3 | +- Streamlined Visualization: Docker and Kubernetes integrate with Grafana to provide dynamic visualization of collected metrics |
| 4 | +- Kubernetes graph type customization and resource data processing |
2 | 5 | - Bug Fixes
|
3 | 6 | - Refactored code for additional modularity and customization
|
4 |
| -- Ability for developers to increase number of metrics monitored for microservices |
5 |
| -- Connected to Grafana interface. |
6 |
| -- Ability to select graph type and process kubernetes resource data |
| 7 | + |
7 | 8 | #
|
8 | 9 |
|
9 | 10 | ## Features
|
|
12 | 13 | - Displays real-time temperature, speed, latency, and memory statistics
|
13 | 14 | - Display and compare multiple microservice metrics in a single graph
|
14 | 15 | - Monitor an Apache Kafka cluster via the JMX Prometheus Exporter
|
15 |
| -- Monitor Docker and Kubernetes cluster via a Prometheus monitoring server and display charts using Grafana |
| 16 | +- Monitor Docker and Kubernetes clusters via a Prometheus monitoring server and display charts using Grafana |
16 | 17 |
|
17 | 18 | #
|
18 | 19 |
|
@@ -54,10 +55,18 @@ module.exports = {
|
54 | 55 | mode: 'kubernetes',
|
55 | 56 | promService: 'prometheus-service',
|
56 | 57 | promPort: 8080,
|
| 58 | + grafanaAPIKey: process.env.CHRONOS_GRAFANA_API_KEY, |
57 | 59 |
|
58 | 60 | // (c) Apache Kafka
|
59 | 61 | mode: 'kafka',
|
60 | 62 | jmxuri: '<insert URI>',
|
| 63 | + |
| 64 | + // (d) Docker |
| 65 | + mode: 'docker', |
| 66 | + promService: 'docker.for.mac.localhost', |
| 67 | + promPort: 9090, |
| 68 | + grafanaAPIKey: process.env.CHRONOS_GRAFANA_API_KEY, |
| 69 | + |
61 | 70 | /* USE ONE OF THE MODE-SPECIFIC CONFIGURATIONS ABOVE */
|
62 | 71 |
|
63 | 72 | // Notifications
|
@@ -87,7 +96,7 @@ The `database` property is required and takes in the following:
|
87 | 96 | - `type` should be a string and only supports 'MongoDB' and 'PostgreSQL' at this time
|
88 | 97 | - `URI` should be a connection string to the database where you intend Chronos to write and record data regarding health, HTTP route tracing, and container infomation
|
89 | 98 |
|
90 |
| -The `mode` property accepts a string that can either be 'microservices', 'kubernetes', or 'kafka'. There are other settings that depend on the mode choice, so these are broken down in the "Chronos Tracker for Microservices" section. |
| 99 | +The `mode` property accepts a string that can either be 'microservices', 'kubernetes', 'kafka', or 'docker'. There are other settings that depend on the mode choice, so these are broken down in the "Chronos Tracker for Microservices" section. |
91 | 100 |
|
92 | 101 | The `notifications` property is an array that can be optionally left empty. It allows developers to be alerted when the server responds to requests with status codes >= 400. To set up notifications, set the value of the `notifications` property to an array of objects, each with a `type` and `settings` property.
|
93 | 102 |
|
@@ -135,6 +144,7 @@ Chronos provides the option to send emails. The properties that should be provi
|
135 | 144 |
|
136 | 145 |
|
137 | 146 | **NOTE: Email notification settings may require alternative security settings to work**
|
| 147 | +# |
138 | 148 |
|
139 | 149 | ### Chronos Tracker for "Microservices" Mode
|
140 | 150 | The mode `microservices` uses the additional setting `dockerized`, which indicates whether or not the microservice has been containerized with Docker. If omitted, Chronos will assume this server is not running in a container, i.e. `dockerized` will default to _false_.
|
@@ -269,6 +279,42 @@ When viewing your information in the Chronos Electron application the data will
|
269 | 279 |
|
270 | 280 | **NOTE:** We provide a jmx_config.yaml file in the Chronos root folder for use with JMX prometheus that provides some useful baseline metrics to monitor.
|
271 | 281 |
|
| 282 | +# |
| 283 | +### Chronos Tracker for "Docker" Mode |
| 284 | +Chronos monitors Docker containers by storing metric data through instant Prometheus queries within your Docker container environment. |
| 285 | + |
| 286 | +In `chronos-config.js`, configure the `mode` parameter to `docker`. Additionally, provide the name of the port where the Prometheus server is actively listening inside the container, and specify the name of the Prometheus service to enable DNS-based resolution of its IP address. |
| 287 | + |
| 288 | +Also add a `grafanaAPIKey` section, this API key will authorize Chronos for dashboard creation and updates in Grafana. |
| 289 | + |
| 290 | +```js |
| 291 | +// Excerpt from a chronos-config.js |
| 292 | + |
| 293 | +module.exports = { |
| 294 | + // ... |
| 295 | + |
| 296 | + mode: 'docker', |
| 297 | + promService: 'docker.for.mac.localhost', |
| 298 | + promPort: 8080, |
| 299 | + |
| 300 | + grafanaAPIKey: process.env.CHRONOS_GRAFANA_API_KEY, |
| 301 | + |
| 302 | + // ... |
| 303 | +} |
| 304 | + |
| 305 | +``` |
| 306 | + |
| 307 | +Then, implement the subsequent code snippet within a **SINGLE** microservice that will be deployed only as a **SINGLE** container, and call `Chronos.docker`: |
| 308 | + |
| 309 | +```js |
| 310 | +const chronosConfig = require('./chronos-config.js'); |
| 311 | +const Chronos = require('@chronosmicro/tracker'); |
| 312 | +const chronos = new Chronos(chronosConfig); |
| 313 | + |
| 314 | +chronos.docker(); |
| 315 | +``` |
| 316 | + |
| 317 | + |
272 | 318 | ### Chronos Tracker for gRPC
|
273 | 319 |
|
274 | 320 | To monitor your gRPC server, setup `chronos-config.js` as if it was a standard microservices example, but be sure to set the `connection` type to `gRPC`.
|
|
0 commit comments