Update the readme to cover the new configuration and splitting the app up
This commit is contained in:
parent
f38c5dd931
commit
d6ada3506a
44
README.md
44
README.md
@ -1,31 +1,45 @@
|
||||
# tls-dashboard
|
||||
A dashboard written in JavaScript & HTML to check the remaining time before a TLS certificate expires. A combination of a Node script and an HTML/CSS/JS webpage to display the info.
|
||||
A dashboard written in JavaScript & HTML to check the remaining time before a TLS certificate expires. A combination of a Node module and an HTML/CSS/JS webpage to display the info.
|
||||
|
||||
## Usage
|
||||
### `get_cert_info.js`
|
||||
This is the node script that establishes a connection to the sites that you want/need to monitor, and reads info about the peer certificate. It then parses the certificate, and dumps the relevant data into another .js file (`certificates.js`) for use on the status page.
|
||||
**Version:** 1.1.0
|
||||
|
||||
To setup the module, go to line 7, and switch out the contents of the array with all the hosts you're wanting to monitor:
|
||||
## Node Setup
|
||||
### `node_app/config.js`
|
||||
Contains the configuration variables for the node script.
|
||||
|
||||
var host_list = [
|
||||
'www.google.com',
|
||||
'www.twitter.com',
|
||||
'www.github.com',
|
||||
'www.bitbucket.com',
|
||||
'news.ycombinator.com',
|
||||
'barnacl.es'
|
||||
];
|
||||
* `connection_timeout` - The time in milliseconds that node should leave a connection open without response after the socket has been assigned. Once the timeout expires, node emits a `timeout` event and aborts the connection request. Default is 5000ms.
|
||||
* `output_file`
|
||||
* `path` - The path to the directory that you want the output file written to. Can be relative or absolute, requires a trailing `/`, and defaults to the `../web_service/js/tls-dashboard/` directory. If you move the contents of the `./web_service` directory, make sure you update this path.
|
||||
* `name` - The name of the output file. This typically doesn't need to be changed, but if you do change it, you'll also need to change the filename in `index.html` at line 14.
|
||||
|
||||
|
||||
### `node_app/monitored_hosts.js`
|
||||
Contains an array of all of the hostnames that you want to monitor.
|
||||
|
||||
### `node_app/get_cert_info.js`
|
||||
This module performs the actual HTTPS connection and evaluation of the peer certificates, and outputs the results into a flat file. There are no configuration changes needed in this file. To get things going, you can either:
|
||||
|
||||
1. Run the script manually whenever you need to update your dashboard by calling `node get_cert_info.js`; or
|
||||
2. Set up the script to run on a cronjob
|
||||
|
||||
It's entirely up to you how you want to handle it.
|
||||
|
||||
## Web Service Setup
|
||||
To get the web service started, you'll need to either move the contents of the `web_service` directory to somewhere in your web site's path, or create a symlink from the web site path back to the directory. If you move the contents, please update the `output_file.path` config value. These are static files with relative links, so other than moving them/pointing the server to them, there's nothing else required for you to do.
|
||||
|
||||
## Example
|
||||
Take a look at a live example page [here on GitLab][1]. Screenshot is below.
|
||||
Take a look at a live example page [here on GitLab][1]. Screenshots below.
|
||||
|
||||

|
||||

|
||||
|
||||
## TODO
|
||||
1. Database integration?
|
||||
1. Database integration?
|
||||
2. Slack integration?
|
||||
|
||||
## Dependencies
|
||||
* jQuery v2.2.2
|
||||
* Handlebars v4.0.5
|
||||
* Bootstrap v4.0.0-alpha (CSS only)
|
||||
|
||||
[1]:https://craine.gitlab.io/tls-dashboard/
|
Loading…
x
Reference in New Issue
Block a user