Agent

Table of Contents

Introduction

Many subcommands need to specify on which agent to execute, if not there will be a default agent, which is set in the ~/.orxray/config configuration file. You can edit the configuration file to change the default agent.

The agent subcommand lists all the agents and shows which one is the current default agent.

Back to TOC

Usage

Usage: orxray agent ACTION [OPTIONS]

ACTIONS:
    list
    autorun
    discard
    get-default

GLOBAL OPTIONS:
    --help
    --config                           Specify the config file, default is ~/.orxray/config.

Back to TOC

List

This subcommand list all the agents.

Back to TOC

Usage

Usage: orxray agent list [OPTIONS]

OPTIONS:
    -s, --page-size integer            page size, 20(default).

GLOBAL OPTIONS:
    --help
    --config                           specify config file, default is ~/.orxray/config.

-s, --page-size integer

Specify the maximum number of data to be displayed, the default is 20

Back to TOC

Example

List agents

$ orxray agent list
ID      HOSTNAME                        IP              SYSTEM          VERSION
1       centos7                         13.17.28.191    centos-7        816
4       amzn2-xray-agent                13.17.28.193    amazon-2        816
5       suse15-aa                       13.17.29.132    opensuse-15     802
7       ubuntu18-xray-agent             13.17.28.195    ubuntu-bionic   816
9       deploy-server                   18.12.20.58     centos-7        796
10      centos7                         13.17.231.163   centos-7        797

Specify list number, default is 10

$ orxray agent list -s 3
ID      HOSTNAME                        IP              SYSTEM          VERSION
1       centos7                         13.17.28.191    centos-7        816
4       amzn2-xray-agent                13.17.28.192    amazon-2        816
5       suse15-aa                       13.17.29.132    opensuse-15     802

Back to TOC

Get-default

The default agent info is saved in ~/.orxray/config. This subcommand show the information about the default agent.

Back to TOC

Usage

Usage: orxray agent get-default

GLOBAL OPTIONS:
    --help
    --config                           specify config file, default is ~/.orxray/config.

Back to TOC

Example

$ orxray agent get-default
ID      HOSTNAME                IP              SYSTEM          VERSION
29      centos7-xxx-1           83.37.218.191   centos-7        816

Back to TOC

Discard

Discard the specified agent. After the agent is discarded, the agent node in the console is removed and a license slot is freed. Note that reinstalling the agent on the same node after the discarding will not succeed.

Usage

Usage: orxray agent discard [OPTIONS]

OPTIONS:
    -a, --agent integer                Agent ID, please use agent default command to set default agent.
                                       If agent ID is not specified, the default_agent will be used.

GLOBAL OPTIONS:
    --help
    --config                           Specify the config file, default is ~/.orxray/config.

Back to TOC

Example

$ orxray agent discard 1

Agent '1' is successfully discarded

Back to TOC