Discover Packages
github.com/tsuru/tsuru-usage
command
module
Version:
v0.0.0-...-19c687c
Opens a new window with list of versions in this module.
Published: May 25, 2017
License: MIT
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Tsuru Usage
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
Create a go application on tsuru
Deploy this entire repo to tsuru
Set USAGE_USER_TOKEN environment on the app passing a token that has at least the following permissions (with global context):
Set API_HOST environment variable to tsuru-usage API host address (ex: http://localhost:8888)
Set PROMETHEUS_HOST environment variable to your Prometheus server address
Set MONGODB_URL and MONGODB_DATABASE_NAME variables to your MongoDB server credentials
Set in USAGE_SERVICES a comma-separated list of services you want Prometheus to monitor
To add basic HTTP authentication to the admin section, set ADMIN_USERNAME and ADMIN_PASSWORD environment variables
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.