Clone this repository and fetch the dependencies using bundler:
bundle install
Initialize database:
bundle exec rake db:create db:schema:load db:seed
Initialize the ElasticSearch index and mappings:
rake elasticsearch:init
Download the database needed to geocode IPs
rake telemetry:geoip
docker-compose.yml file build a development environment mounting the current folder and running rails in development environment.
Run the following commands to have a stable development environment.
$ docker-compose run --rm --no-deps web bundle install
$ docker-compose run --rm web bash
root@web_1 $ RAILS_ENV=development rake db:setup
root@web_1 $ RAILS_ENV=test rake db:setup
$ ./on-web rake elasticsearch:init
$ ./on-web rake telemetry:geoip
$ docker-compose up
In order to create fake data:
$ ./on-web rake telemetry:fake_data
To setup and run test, once the web container is running:
$ docker-compose exec web bash
root@web_1 $ rake
$ docker-compose rm -v -f
$ docker volume rm $(docker volume ls -q | grep ^telemetryserver)
Visualization definitions are stored in the "visualizations" subdirectory. These are json files that can be imported into a Kibana installation.
Before importing them, set up the following index patterns:
telemetry* with time-based events using the field beginningtelem* with time-based events using the field created_atEvents with created_at corresponds to installation events, so they serve to ananlyze instaces stateless metric, like lat*lng, number of instances, number of applications.
All other events will have a beginning field since they are bounded to a period.
Visualizations that show evolution through the time are easy to build form telemetry* index pattern.
If a metric is needed to, for example count the number of accounts, showing only the last known number, then a filter on the metric should be added: metric:accounts AND beginning:[now-2w TO now]. This works since the reporting period of all instances is 2 weeks long (yet in staging environment is 3 days). Notice that these widgets won't be affected by the general time filter of the dashboard (ie: last 5 years). Kibana's limitation to perform aggregations and grouping on visualization is forcing this workaround.
Some features of these dashboards may not work on old versions of ElasticSearch. Versions >= 2.3 should work fine.
Telemetry Server is released under the GPLv3 license.
Content type
Image
Digest
sha256:3ff12e18b…
Size
338.3 MB
Last updated
about 10 years ago
docker pull instedd/telemetry