Skip to content

Commit 06a7899

Browse files
authored
Add info about health and monitoring to README
1 parent 60f8fb4 commit 06a7899

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ As you can see, the Javascript or JSON object contained in the URL defines the c
3737

3838
The chart configuration object is based on the popular Chart.js API. Check out the [Chart.js documentation](https://www.chartjs.org/docs/latest/charts/) for more information on how to customize your chart, or see [QuickChart.io](https://quickchart.io/) for more examples.
3939

40+
QuickChart includes several Chart.js plugins that allow you to add chart annotations, data labels, and more. See [full QuickChart documentation](https://quickchart.io/#chart-types) for examples.
41+
4042
## QR Codes
4143

4244
The service also produces QR codes. For example, https://quickchart.io/qr?text=Hello+world produces:
@@ -60,8 +62,6 @@ To install system dependencies on Mac OSX, you probably just need to `brew insta
6062

6163
Once you have system dependencies installed, run `yarn install` or `npm install` to install the node dependencies.
6264

63-
You may optionally set up monitoring by running `./test/monit/install.sh` (you may have to modify `./test/monit/quickchart_monit.cfg` to suit your environment).
64-
6565
## Running the server
6666

6767
`node index.js` will start the server on port 3400. Set your `PORT` environmental variable to change this port.
@@ -97,6 +97,16 @@ Clicking the following will execute the Docker build on a remote machine and dep
9797

9898
[![Run on Google Cloud](https://storage.googleapis.com/cloudrun/button.svg)](https://console.cloud.google.com/cloudshell/editor?shellonly=true&cloudshell_image=gcr.io/cloudrun/button&cloudshell_git_repo=https://github.com/typpo/quickchart)
9999

100+
## Health and Monitoring
101+
102+
QuickChart has two API endpoints to determine the health of the service.
103+
104+
`/healthcheck` is a basic endpoint that returns a 200 status code and a JSON object that looks like this: `{"success":true,"version":"1.1.0"}`.
105+
106+
A second endpoint, `/healthcheck/chart` returns a 302 status code and redirects to a chart with random attributes. Although it is a more expensive endpoint, it can be useful for cache busting or testing chart rendering.
107+
108+
The hosted QuickChart service uses [monit](https://mmonit.com/monit/) to make sure the service is online and restart it if not. An example monit config is in `test/monit`.
109+
100110
## License
101111

102112
QuickChart is open source, licensed under version 3 of the GNU GPL. If you would like to modify this project for commercial purposes (and not release the source code), please [contact me](https://www.ianww.com/).

0 commit comments

Comments
 (0)