Command-line Tools

Overview

In addition to InLong Dashboard, you can view and create data resources through command-line tools.

inlongctl can be run from InLong’s bin directory.

usage:

  1. $ bin/inlongctl [options] [command] [command options]

command:

  • list
  • describe
  • create
  • update
  • delete
  • log

You can also use --help or -h to get help for the above commands, for example:

  1. $ bin/inlongctl list -h

Configuration

Go to the inlong-manager directory , modify the following configurations of the conf/application.properties file.

  1. server.host=127.0.0.1
  2. server.port=8080
  3. default.admin.user=admin
  4. default.admin.password=inlong

List

list is used to display the core information of resources and display them in a table.

command:

  • group
  • stream
  • source
  • sink
  • cluster
  • cluster-tag
  • cluster-node
  • user

group

  1. $ bin/inlongctl list group

options:

parameterdescriptiondefault
-g, —groupinlong group id, support fuzzy query
-s, —statusinlong group status , Optional values: CREATE, REJECTED, INITIALIZING, OPERATING,
STARTED, FAILED, STOPPED, FINISHED, DELETED
-n, —nummaximum number of displays10

group status

group statusdescription
CREATEto be submit or to be approval
REJECTEDapproval rejected
INITIALIZINGconfiguring
OPERATINGdeleting, stopping or restarting
STARTEDsuccessful configuration and restart
FAILEDfailed to configure
STOPPEDsuspended
FINISHEDfinish
DELETEDdeleted

stream

  1. $ bin/inlongctl list stream

options:

parameterdescriptiondefault
-g, —group *inlong group id

* means required parameter.

source

  1. $ bin/inlongctl list source

options:

parameterdescriptiondefault
-g, —group inlong group id
-s, —stream inlong stream id
-t, —typestream source type, Optional values: AUTO_PUSH, TUBEMQ, PULSAR, KAFKA, FILE, MYSQL_SQL,
MYSQL_BINLOG, POSTGRESQL, ORACLE, SQLSERVER, MONGODB, REDIS

stream source type

stream source typedescription
AUTO_PUSHAuto Push
TUBEMQTubeMQ
PULSARPulsar
KAFKAKafka
FILEFile
MYSQL_SQLSQL
MYSQL_BINLOGBinlog
POSTGRESQLPostgreSQL
ORACLEOracle
SQLSERVERSQL server
MONGODBMongoDB
REDISRedis

sink

  1. $ bin/inlongctl list sink

options:

parameterdescriptiondefault
-g, —group inlong group id
-s, —stream inlong stream id

cluster-tag

  1. $ bin/inlongctl list cluster-tag

options:

parameterdescriptiondefault
—tagcluster tag, support fuzzy query

cluster

  1. $ bin/inlongctl list cluster

options:

parameterdescriptiondefault
—tagcluster tag
—typecluster type, Optional values: AGENT, TUBEMQ, PULSAR, DATAPROXY, KAFKA

cluster type

cluster typedescription
AGENTAgent
TUBEMQTubeMQ
PULSARPulsar
DATAPROXYDataProxy
KAFKAKafka

cluster-node

  1. $ bin/inlongctl list cluster-node

options:

parameterdescriptiondefault
—tag *cluster tag
—typecluster type, Optional values: AGENT, TUBEMQ, PULSAR, DATAPROXY, KAFKA

user

  1. $ bin/inlongctl list user

options:

parameterdescriptiondefault
-u, —usernameusername, support fuzzy query
—typeuser type, Optional values: ADMIN, OPERATOR

user type

user typedescription
ADMINadmin
OPERATORother user

Describe

describe is used to display detailed information and output in json format.

command:

  • group
  • stream
  • source
  • sink
  • cluster
  • cluster-tag
  • cluster-node
  • user

group

  1. $ bin/inlongctl describe group

options:

parameterdescriptiondefault
-g, —groupinlong group id, support fuzzy query
-s, —statusinlong group status , Optional values: CREATE, REJECTED, INITIALIZING, OPERATING,
STARTED, FAILED, STOPPED, FINISHED, DELETED
-n, —nummaximum number of displays10

group status

group statusdescription
CREATEto be submit or to be approval
REJECTEDapproval rejected
INITIALIZINGconfiguring
OPERATINGdeleting, stopping or restarting
STARTEDsuccessful configuration and restart
FAILEDfailed to configure
STOPPEDsuspended
FINISHEDfinish
DELETEDdeleted

stream

  1. $ bin/inlongctl describe stream

options:

parameterdescriptiondefault
-g, —group *inlong group id

source

  1. $ bin/inlongctl describe source

options:

parameterdescriptiondefault
-g, —group inlong group id
-s, —stream inlong stream id
-t, —typestream source type, Optional values: AUTO_PUSH, TUBEMQ, PULSAR, KAFKA, FILE, MYSQL_SQL,
MYSQL_BINLOG, POSTGRESQL, ORACLE, SQLSERVER, MONGODB, REDIS

stream source type

stream source typedescription
AUTO_PUSHAuto Push
TUBEMQTubeMQ
PULSARPulsar
KAFKAKafka
FILEFile
MYSQL_SQLSQL
MYSQL_BINLOGBinlog
POSTGRESQLPostgreSQL
ORACLEOracle
SQLSERVERSQL server
MONGODBMongoDB
REDISRedis

sink

  1. $ bin/inlongctl describe sink

options:

parameterdescriptiondefault
-g, —group inlong group id
-s, —stream inlong stream id

cluster-tag

  1. $ bin/inlongctl describe cluster-tag

options:

parameterdescriptiondefault
-id, —id *cluster tag id

cluster

  1. $ bin/inlongctl describe cluster

options:

parameterdescriptiondefault
-id, —id *cluster id

cluster-node

  1. $ bin/inlongctl describe cluster-node

options:

parameterdescriptiondefault
-id, —id *cluster node id

user

  1. $ bin/inlongctl describe user

options:

parameterdescriptiondefault
-id, —id *user id

Create

create is used to create resources, currently created by using a json file.

command:

  • cluster
  • cluster-tag
  • cluster-node
  • user

cluster

  1. $ bin/inlongctl create cluster

options:

parameterdescriptiondefault
-f, —filejson file name

json:

  1. {
  2. "name": "test_cluster",
  3. "url": "127.0.0.1:8080",
  4. "clusterTags": "test_cluster_tag",
  5. "extTag": null,
  6. "description": null,
  7. "inCharges": "admin",
  8. "type": "PULSAR",
  9. "adminUrl": "http://127.0.0.1:8080",
  10. "tenant": "public"
  11. }

cluster-tag

  1. $ bin/inlongctl create cluster-tag

options:

parameterdescriptiondefault
-f, —filejson file name

json:

  1. {
  2. "clusterTag": "test_cluster_tag",
  3. "inCharges": "ctl",
  4. "extParams": null,
  5. "description": null
  6. }

cluster-node

  1. $ bin/inlongctl create cluster-node

options:

parameterdescriptiondefault
-f, —filejson file name

json:

  1. {
  2. "parentId": 1,
  3. "type": "AGENT",
  4. "ip": "127.0.0.1",
  5. "port": 8008,
  6. "extParams": null,
  7. "description": "null"
  8. }

parentId is the corresponding cluster id of this node, and the cluster id can be obtained through list cluster or describe cluster

user

  1. $ bin/inlongctl create user

options:

parameterdescriptiondefault
-u, —usernameusername
-p, —passwordpassword
-t, —typeaccount type
-d, —dayvalid days

Update

update is used to update resources, currently update by using a json file.

command:

  • cluster
  • cluster-tag
  • cluster-node
  • user

The json file required by update can be modified on the json obtained by describe.

cluster

  1. $ bin/inlongctl update cluster

options:

parameterdescriptiondefault
-f, —filejson file name

cluster-tag

  1. $ bin/inlongctl update cluster-tag

options:

parameterdescriptiondefault
-f, —filejson file name

cluster-node

  1. $ bin/inlongctl update cluster-node

options:

parameterdescriptiondefault
-f, —filejson file name

user

  1. $ bin/inlongctl update user

options:

parameterdescriptiondefault
-u, —usernameusername
-p, —passwordnew password
-d, —daynew valid days

Delete

delete is used to delete resources.

command:

  • group
  • stream
  • source
  • sink
  • cluster
  • cluster-tag
  • cluster-node
  • user

group

  1. $ bin/inlongctl delete group

options:

parameterdescriptiondefault
-g, —groupinlong group id, support fuzzy query
-s, —statusinlong group status , Optional values: CREATE, REJECTED, INITIALIZING, OPERATING,
STARTED, FAILED, STOPPED, FINISHED, DELETED
-n, —nummaximum number of displays10

group status

group statusdescription
CREATEto be submit or to be approval
REJECTEDapproval rejected
INITIALIZINGconfiguring
OPERATINGdeleting, stopping or restarting
STARTEDsuccessful configuration and restart
FAILEDfailed to configure
STOPPEDsuspended
FINISHEDfinish
DELETEDdeleted

stream

  1. $ bin/inlongctl delete stream

options:

parameterdescriptiondefault
-g, —group *inlong group id

source

  1. $ bin/inlongctl delete source

options:

parameterdescriptiondefault
-g, —group inlong group id
-s, —stream inlong stream id
-t, —typestream source type, Optional values: AUTO_PUSH, TUBEMQ, PULSAR, KAFKA, FILE, MYSQL_SQL,
MYSQL_BINLOG, POSTGRESQL, ORACLE, SQLSERVER, MONGODB, REDIS

stream source type

stream source typedescription
AUTO_PUSHAuto Push
TUBEMQTubeMQ
PULSARPulsar
KAFKAKafka
FILEFile
MYSQL_SQLSQL
MYSQL_BINLOGBinlog
POSTGRESQLPostgreSQL
ORACLEOracle
SQLSERVERSQL server
MONGODBMongoDB
REDISRedis

sink

  1. $ bin/inlongctl delete sink

options:

parameterdescriptiondefault
-g, —group inlong group id
-s, —stream inlong stream id

cluster-tag

  1. $ bin/inlongctl delete cluster-tag

options:

parameterdescriptiondefault
-id, —id *cluster tag id

cluster

  1. $ bin/inlongctl delete cluster

options:

parameterdescriptiondefault
-id, —id *cluster id

cluster-node

  1. $ bin/inlongctl delete cluster-node

options:

parameterdescriptiondefault
-id, —id *cluster node id

user

  1. $ bin/inlongctl delete user

options:

parameterdescriptiondefault
-id, —id *user id

Log

After creating the task process, you can use the log command to view the execution log of each stage of the task.

command:

  • group

group

  1. $ bin/inlongctl log group

options:

parameterdescriptiondefault
-g, —groupinlong group id, not support fuzzy query