TICK Stack Metrics
This section shows how to integrate a TICK Stack with Genvid. TICK is the InfluxData open source Time Series Platform. It is comprised of 4 programs:
- Telegraf
A metrics collector.
- InfluxDB
A time-series database.
- Chronograf
A web interface.
- Kapacitor
A real-time streaming processing engine.
The following is a demonstration of our metrics interface using a simple system and is not designed for production use. Current limitations include:
Metrics data and dashboard configurations aren’t preserved between uses.
Space allocation for the data isn’t managed.
If you choose to use TICK in production, we recommend you refer directly to the TICK documentation for implementation information.
Installation
For the local cluster, you need to download the Windows binaries of the stack.
py tick.py download
py tick.py setup
The first command downloads the binaries under archives and the second command
extracts and installs them under the local .\bin
folder of the sample.
Setting up the local environment
After setting up the local Bastion, run:
py tick.py load
This adds two new jobs and their logs to your local cluster:
- telegraf
A system job that runs
telegraf
with a statsd input on port 8125. (The default port for Consul, Nomad, and Vault setup.)- tick
A service job that runs
influxd
,kapacitord
, andchronograf
locally.
It also adds corresponding services and logs, as well as a link to
chronograf
.
Next, start the Genvid services:
Note
Due to a bug in the current SDK, you must start the telegraf
job
before the other jobs to ensure it can be discovered correctly.
genvid-sdk start telegraf
genvid-sdk start
Now you can open chronograf
from the Cluster-UI interface or command line:
genvid-sdk open chronograf
Running on the cloud
Warning
Genvid Tick requires more resources from your clusters. You must augment the number of internal instances (here) to allow it to run. You can do it by incrementing the instance_internal_count setting by one.
The cloud environment is similar to the local environment. It uses the official
Docker images rather than the local binaries, but has the same configuration.
Just setup your cluster and add the --cluster
parameter to your script
calls.
Exporting and importing dashboards
The tick.py script has the ability to export and import dashboards. In order to do this, make sure that the jobs are running and use the following commands:
# import the dashboards from a file
py tick.py -c mycluster import-dashboards dashboards.json
# export the dashboards to a file
py tick.py -c mycluster export-dashboards dashboards.json
The file dashboards.json provide a set of preconfigured dashboards.
Script reference
Setup script for tick stack
usage: tick.py [-h] [--loglevel {DEBUG,INFO,WARNING,ERROR}]
[--logformat LOGFORMAT] [-c CLUSTER_ID]
{sdk-version,version,env,download,setup,load,unload,import-dashboards,export-dashboards}
...
Positional Arguments
- command
Possible choices: sdk-version, version, env, download, setup, load, unload, import-dashboards, export-dashboards
Named Arguments
- --loglevel
Possible choices: DEBUG, INFO, WARNING, ERROR
Set the script log level
- --logformat
Set the script log format
- -c, --cluster_id
The cluster id. If not set with the command line, uses the environment variable GENVID_CLUSTER_ID if it exists. Otherwise defaults to ‘local’
Default: “local”
Sub-commands
sdk-version
Print current SDK versions
tick.py sdk-version [-h]
version
Print current versions
tick.py version [-h]
env
Print used environment variables.
tick.py env [-h]
download
Download the archives
tick.py download [-h]
setup
Setup from archives
tick.py setup [-h]
load
Load project
tick.py load [-h]
unload
Unload project
tick.py unload [-h]
import-dashboards
Import chronograf dashboards
tick.py import-dashboards [-h] [file]
Positional Arguments
- file
JSON file containing the dashboards
Default: “dashboards.json”
export-dashboards
Export chronograf dashboards
tick.py export-dashboards [-h] [file]
Positional Arguments
- file
JSON file containing the dashboards
Default: “dashboards.json”