curtain-twitcher
v0.2.4
Published
NodeJs tool to parse a configuration file with definitions of alerts based on data available in Graphite
Downloads
7
Readme
curtain-twitcher
NodeJs tool to send structured data to consul's KV store
Installation
npm i curtain-twitcher -g
Usage
Usage: curtain-twitcher [options] <host> <path> <file>
<host>
is the address of the consul host
<path>
is the root path for the consul key/value store. The path is used as a prefix to the key/value pair details held in the configuration <file>
<file>
is the file path to the key/value pair configuration file. This a YML structured file that should mirror the structure required in the consul key/value store.
Options:
-h, --help
output usage information
-V, --version
output the version number
-p, --port <port>
Port to query the consul host on (defaults to 8500)
Example
curtain-twitcher consul.my.org my_app/environments envs.yml
with the envs.yml
containing the following:
production:
url: prod.my_app.org
servers:
server1: prod01.my_app.org
server2: prod02.my_app.org
server3: prod03.my_app.org
acceptance:
url: int.my_app.org
servers:
server1: int01.my_app.org
server2: int02.my_app.org
will produce the following key value pairs in consul:
my_app/environments/production/url prod.my_app.org
my_app/environments/production/servers/servers1 prod01.my_app.org
my_app/environments/production/servers/servers2 prod02.my_app.org
my_app/environments/production/servers/servers3 prod03.my_app.org
my_app/environments/integration/url int.my_app.org
my_app/environments/integration/servers/servers1 int01.my_app.org
my_app/environments/integration/servers/servers2 int02.my_app.org