Skip to main content

Getting basic interactions with Tetration via our favourite media, the cli

Project description


to interact with Tetration Cluster via the cli


From PyPI

pip install tetrationcli

From sources

Download the sources from Github, extract and execute the following commands

$ pip install -r requirements.txt

$ pip install

How to use this application:

To access to the cluster you need to get the API Credentials with the following permissions

  • sensor_management - option: SW sensor management: API to configure and monitor status of SW sensors
  • hw_sensor_management - option: HW sensor management: API to configure and monitor status of HW sensors
  • flow_inventory_query - option: Flow and inventory search: API to query flows and inventory items in Tetration cluster
  • user_role_scope_management - option: Users, roles and scope management: API for root scope owners to read/add/modify/remove users, roles and scopes
  • app_policy_management - option: Applications and policy management: API to manage applications and enforce policies

Download the api_credentials.json locally and have it ready to get the information required for the setup.

A quick look for the help will list the current available options.

$ tetrationcli -h
usage: tetrationcli [-h] [-d] [-q] [-v]

Tetration Analytics CLI tool

optional arguments:
  -h, --help            show this help message and exit
  -d, --debug           full application debug mode
  -q, --quiet           suppress all console output
  -v, --version         show program's version number and exit

    inventory           Interact with Inventory from Tetration Cluster
    vrfs                Interact with VRFs in Tetration Cluster
    applications        Interact with ADM Application from Tetration Cluster
    users               Interact with Users from Tetration Cluster
    roles               Interact with Roles in Tetration Cluster
    scopes              Interact with Scopes configured in Tetration Cluster
    switches            Interact with Hardware Sensors from Tetration Cluster
    agents              Interact with Software Sensors in Tetration Cluster
    clear               Clear the configuration
    setup               Application setup

Usage: tetrationcli command

Each subcommand has its own help that list the options available.

$ tetrationcli agents -h
usage: tetrationcli agents [-h] {delete,list} ...

optional arguments:
  -h, --help     show this help message and exit

    delete       delete the selected software agent via uuid
    list         list all software agents installed

Easy setup

Step 1: Issue tetrationcli setup folow the instructions and place the correct requested information

$ tetrationcli setup
Tetration Analytics cluster (eg:

Step 2: Test if you can successfully query the cluster from the command line

$ tetrationcli agents list

Manually setup the application

The file api_credentials.json downloaded from the cluster is expected to be placed in folder ~/.config/tetrationcli/ then to define the cluster name you need to create the config file tetrationcli.conf in %HOME_USER_FOLDER%/.config/tetrationcli/

total 16
0 drwxr-xr-x   4 user  staff  128 Nov 11 16:16 .
0 drwx------  13 user  staff  416 Nov 11 16:10 ..
8 -rw-r--r--@  1 user  staff  111 Nov 11 09:52 api_credentials.json
8 -rw-r--r--   1 user  staff  121 Nov 11 16:16 tetrationcli.conf

and the file tetrationcli.conf requires the information:

api_endpoint =
api_credentials = ~/.config/tetrationcli/api_credentials.json

More information

Options used

Current scope for tetrationcli

  1. inventory
  2. vrfs
  3. applications
  4. users
  5. roles
  6. scopes
  7. switches
  8. agents

For any new functionalites open an issue and we will evaluate to add it.


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tetrationcli-1.0.1.tar.gz (11.3 kB view hashes)

Uploaded source

Built Distribution

tetrationcli-1.0.1-py3-none-any.whl (25.8 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page