tsuru-usage

command module
v0.0.0-...-19c687c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2017 License: MIT Imports: 14 Imported by: 0

README

Tsuru Usage

Build Status

This project aims to provide an easy way to expose some resource usage about a tsuru installation. The project contains an Procfile and this code can be ran as an application on tsuru.

This app will expose usage metrics on a /metrics endpoint. Two main metrics are available:

  • tsuru_usage_units{app="apptest",plan="autogenerated",pool="theonepool"} 5
  • tsuru_usage_nodes{pool="theonepool"} 2

Installing and Running

  1. Create a go application on tsuru
  2. Deploy this entire repo to tsuru
  3. Set USAGE_USER_TOKEN environment on the app passing a token that has at least the following permissions (with global context):
    • app.read
    • node.read
  4. Set API_HOST environment variable to tsuru-usage API host address (ex: http://localhost:8888)
  5. Set PROMETHEUS_HOST environment variable to your Prometheus server address
  6. Set MONGODB_URL and MONGODB_DATABASE_NAME variables to your MongoDB server credentials
  7. Set in USAGE_SERVICES a comma-separated list of services you want Prometheus to monitor
  8. To add basic HTTP authentication to the admin section, set ADMIN_USERNAME and ADMIN_PASSWORD environment variables

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL