globomap-integration

command module
v0.0.0-...-d9e4ffb Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: BSD-3-Clause Imports: 17 Imported by: 0

README

Tsuru integration with globomap

Build Status

Configuration

Required environment variables:

  • GLOBOMAP_LOADER_HOSTNAME: API used to post updates
  • GLOBOMAP_API_HOSTNAME: API used to search for comp units
  • GLOBOMAP_USERNAME: Username used to authenticate with globomap
  • GLOBOMAP_PASSWORD: Password used to authenticate with globomap
  • TSURU_HOST: tsuru API, used to check for information about apps, pools and nodes (this variable is already injected in every tsuru app)
  • TSURU_TOKEN: token used in tsuru API

Running

This program can be run in three ways:

Update mode

This is the default mode. Checks for new events about apps or pools and post them to globomap API. The time period can be set with --start/-s flag:

# Checks for events in the last 2 days
globomap-integration --start 2d

The time period can be set in days (d), hours (h) or minutes (m). The default value is 24 hours.

Repeat mode

Run in the update mode, repeating with a specific frequency. To run in repeat mode, use --repeat/-r flag with the desired frequency:

# Repeats every 6 hours
globomap-integration --repeat 6h

In repeat mode, queries to globomap API that don't find results are retried by default. You can set two optional environment variables to configure the retry params:

  • RETRY_SLEEP_TIME: sleep time between retries; defaults to 5 minutes
  • MAX_RETRIES: maximum number of retries for each query; defaults to 20
Load mode

Loads information about all apps, pools and nodes. To run in load mode, use --load/-l flag:

# Runs in load mode
globomap-integration --load

Dry mode

Every running mode supports dry mode. With --dry/-d flag, the payload will be written to stdout, instead of posted to globomap loader API:

# Checks for events in the last 15 minutes and writes the payload to stdout
globomap-integration --start 15m --dry

Verbose mode

For more output when running the program, add the --verbose/-v flag.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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