import Tabs from ‘@theme/Tabs’; import TabItem from ‘@theme/TabItem’;
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:
$ bin/inlongctl [options] [command] [command options]
command:
listdescribecreateupdatedeletelogYou can also use
--helpor-hto get help for the above commands, for example:
$ bin/inlongctl list -h
Go to the inlong-manager directory , modify the following configurations of the conf/application.properties file.
server.host=127.0.0.1 server.port=8080 default.admin.user=admin default.admin.password=inlong
list is used to display the core information of resources and display them in a table.
command:
groupstreamsourcesinkclustercluster-tagcluster-nodeusergroup$ bin/inlongctl list group
options:
| parameter | description | default |
|---|---|---|
-g, --group | inlong group id, support fuzzy query | |
-s, --status | inlong group status , Optional values: CREATE, REJECTED, INITIALIZING, OPERATING, STARTED, FAILED, STOPPED, FINISHED, DELETED | |
-n, --num | maximum number of displays | 10 |
| group status | description |
|---|---|
CREATE | to be submit or to be approval |
REJECTED | approval rejected |
INITIALIZING | configuring |
OPERATING | deleting, stopping or restarting |
STARTED | successful configuration and restart |
FAILED | failed to configure |
STOPPED | suspended |
FINISHED | finish |
DELETED | deleted |
stream$ bin/inlongctl list stream
options:
| parameter | description | default |
|---|---|---|
-g, --group * | inlong group id |
* means required parameter.
source$ bin/inlongctl list source
options:
| parameter | description | default |
|---|---|---|
-g, --group * | inlong group id | |
-s, --stream * | inlong stream id | |
-t, --type | stream source type, Optional values: AUTO_PUSH, TUBEMQ, PULSAR, KAFKA, FILE, MYSQL_SQL,MYSQL_BINLOG, POSTGRESQL, ORACLE, SQLSERVER, MONGODB, REDIS |
| stream source type | description |
|---|---|
AUTO_PUSH | Auto Push |
TUBEMQ | TubeMQ |
PULSAR | Pulsar |
KAFKA | Kafka |
FILE | File |
MYSQL_SQL | SQL |
MYSQL_BINLOG | Binlog |
POSTGRESQL | PostgreSQL |
ORACLE | Oracle |
SQLSERVER | SQL server |
MONGODB | MongoDB |
REDIS | Redis |
sink$ bin/inlongctl list sink
options:
| parameter | description | default |
|---|---|---|
-g, --group * | inlong group id | |
-s, --stream * | inlong stream id |
cluster-tag$ bin/inlongctl list cluster-tag
options:
| parameter | description | default |
|---|---|---|
--tag | cluster tag, support fuzzy query |
cluster$ bin/inlongctl list cluster
options:
| parameter | description | default |
|---|---|---|
--tag | cluster tag | |
--type | cluster type, Optional values: AGENT, TUBEMQ, PULSAR, DATAPROXY, KAFKA |
| cluster type | description |
|---|---|
AGENT | Agent |
TUBEMQ | TubeMQ |
PULSAR | Pulsar |
DATAPROXY | DataProxy |
KAFKA | Kafka |
cluster-node$ bin/inlongctl list cluster-node
options:
| parameter | description | default |
|---|---|---|
--tag * | cluster tag | |
--type | cluster type, Optional values: AGENT, TUBEMQ, PULSAR, DATAPROXY, KAFKA |
user$ bin/inlongctl list user
options:
| parameter | description | default |
|---|---|---|
-u, --username | username, support fuzzy query | |
--type | user type, Optional values: ADMIN, OPERATOR |
| user type | description |
|---|---|
ADMIN | admin |
OPERATOR | other user |
describe is used to display detailed information and output in json format.
command:
groupstreamsourcesinkclustercluster-tagcluster-nodeusergroup$ bin/inlongctl describe group
options:
| parameter | description | default |
|---|---|---|
-g, --group | inlong group id, support fuzzy query | |
-s, --status | inlong group status , Optional values: CREATE, REJECTED, INITIALIZING, OPERATING, STARTED, FAILED, STOPPED, FINISHED, DELETED | |
-n, --num | maximum number of displays | 10 |
| group status | description |
|---|---|
CREATE | to be submit or to be approval |
REJECTED | approval rejected |
INITIALIZING | configuring |
OPERATING | deleting, stopping or restarting |
STARTED | successful configuration and restart |
FAILED | failed to configure |
STOPPED | suspended |
FINISHED | finish |
DELETED | deleted |
stream$ bin/inlongctl describe stream
options:
| parameter | description | default |
|---|---|---|
-g, --group * | inlong group id |
source$ bin/inlongctl describe source
options:
| parameter | description | default |
|---|---|---|
-g, --group * | inlong group id | |
-s, --stream * | inlong stream id | |
-t, --type | stream source type, Optional values: AUTO_PUSH, TUBEMQ, PULSAR, KAFKA, FILE, MYSQL_SQL,MYSQL_BINLOG, POSTGRESQL, ORACLE, SQLSERVER, MONGODB, REDIS |
| stream source type | description |
|---|---|
AUTO_PUSH | Auto Push |
TUBEMQ | TubeMQ |
PULSAR | Pulsar |
KAFKA | Kafka |
FILE | File |
MYSQL_SQL | SQL |
MYSQL_BINLOG | Binlog |
POSTGRESQL | PostgreSQL |
ORACLE | Oracle |
SQLSERVER | SQL server |
MONGODB | MongoDB |
REDIS | Redis |
sink$ bin/inlongctl describe sink
options:
| parameter | description | default |
|---|---|---|
-g, --group * | inlong group id | |
-s, --stream * | inlong stream id |
cluster-tag$ bin/inlongctl describe cluster-tag
options:
| parameter | description | default |
|---|---|---|
-id, --id * | cluster tag id |
cluster$ bin/inlongctl describe cluster
options:
| parameter | description | default |
|---|---|---|
-id, --id * | cluster id |
cluster-node$ bin/inlongctl describe cluster-node
options:
| parameter | description | default |
|---|---|---|
-id, --id * | cluster node id |
user$ bin/inlongctl describe user
options:
| parameter | description | default |
|---|---|---|
-id, --id * | user id |
create is used to create resources, currently created by using a json file.
command:
groupclustercluster-tagcluster-nodeusergroup$ bin/inlongctl create group
options:
| parameter | description | default |
|---|---|---|
-f, --file | json file name |
json:
{ "groupInfo": { "inlongGroupId": "test_group_ctl", "inlongClusterTag": "default_cluster", "mqType": "PULSAR" }, "streamInfo": { "inlongStreamId": "test_stream_ctl", "fieldList": [ { "fieldName": "name", "fieldType": "string" } ], "sourceList": [ { "sourceType": "FILE", "sourceName": "test_source_ctl", "agentIp": "127.0.0.1", "pattern": "/data/test.txt" } ], "sinkList": [ { "sinkType": "CLICKHOUSE", "sinkName": "test_sink_ctl", "dataNodeName": "test_clickhouse", "dbName": "db_test", "tableName": "table_test", "flushInterval": 1, "flushRecord": 1000, "retryTimes": 3, "engine": "Log", "isDistributed": 1, "sinkFieldList": [ { "sourceFieldName": "name", "sourceFieldType": "string", "fieldName": "name", "fieldType": "string" } ] } ] } }
file → pulsar → clickhouse, if you want to use other data flow, just replace the corresponding part.Source:
<Tabs defaultValue=“file” values={[ {label: ‘File’, value: ‘file’}, {label: ‘PostgreSQL’, value: ‘postgresql’}, {label: ‘MySQL’, value: ‘mysql’}, {label: ‘SQLServer’, value: ‘sqlserver’}, {label: ‘MongoDB’, value: ‘mongodb’}, {label: ‘Redis’, value: ‘redis’}, {label: ‘Oracle’, value: ‘oracle’}, {label: ‘MQTT’, value: ‘mqtt’}, ]}>
Sink:
<Tabs defaultValue=“clickhouse” values={[ {label: ‘Clickhouse’, value: ‘clickhouse’}, {label: ‘Hive’, value: ‘hive’}, {label: ‘Elasticsearch’, value: ‘elasticsearch’}, {label: ‘Kafka’, value: ‘kafka’}, {label: ‘MySQL’, value: ‘mysql’}, {label: ‘Oracle’, value: ‘oracle’}, {label: ‘PostgreSQL’, value: ‘postgresql’}, {label: ‘SQLServer’, value: ‘sqlserver’}, {label: ‘Iceberg’, value: ‘iceberg’}, ]}>
cluster$ bin/inlongctl create cluster
options:
| parameter | description | default |
|---|---|---|
-f, --file | json file name |
json:
{ "name": "test_cluster", "url": "127.0.0.1:8080", "clusterTags": "test_cluster_tag", "extTag": null, "description": null, "inCharges": "admin", "type": "PULSAR", "adminUrl": "http://127.0.0.1:8080", "tenant": "public" }
cluster-tag$ bin/inlongctl create cluster-tag
options:
| parameter | description | default |
|---|---|---|
-f, --file | json file name |
json:
{ "clusterTag": "test_cluster_tag", "inCharges": "ctl", "extParams": null, "description": null }
cluster-node$ bin/inlongctl create cluster-node
options:
| parameter | description | default |
|---|---|---|
-f, --file | json file name |
json:
{ "parentId": 1, "type": "AGENT", "ip": "127.0.0.1", "port": 8008, "extParams": null, "description": "null" }
parentIdis the corresponding cluster id of this node, and the cluster id can be obtained throughlist clusterordescribe cluster
user$ bin/inlongctl create user
options:
| parameter | description | default |
|---|---|---|
-u, --username | username | |
-p, --password | password | |
-t, --type | account type | |
-d, --day | valid days |
update is used to update resources, currently update by using a json file.
command:
clustercluster-tagcluster-nodeuserThe json file required by
updatecan be modified on the json obtained bydescribe.
cluster$ bin/inlongctl update cluster
options:
| parameter | description | default |
|---|---|---|
-f, --file | json file name |
cluster-tag$ bin/inlongctl update cluster-tag
options:
| parameter | description | default |
|---|---|---|
-f, --file | json file name |
cluster-node$ bin/inlongctl update cluster-node
options:
| parameter | description | default |
|---|---|---|
-f, --file | json file name |
user$ bin/inlongctl update user
options:
| parameter | description | default |
|---|---|---|
-u, --username | username | |
-p, --password | new password | |
-d, --day | new valid days |
suspend is used to suspend inlong group task.
command:
groupgroup$ bin/inlongctl suspend group
options:
| parameter | description | default |
|---|---|---|
-g, --group | inlong group id |
restart is used to restart inlong group task.
command:
groupgroup$ bin/inlongctl restart group
options:
| parameter | description | default |
|---|---|---|
-g, --group | inlong group id |
delete is used to delete resources.
command:
groupstreamsourcesinkclustercluster-tagcluster-nodeusergroup$ bin/inlongctl delete group
options:
| parameter | description | default |
|---|---|---|
-g, --group | inlong group id, support fuzzy query | |
-s, --status | inlong group status , Optional values: CREATE, REJECTED, INITIALIZING, OPERATING, STARTED, FAILED, STOPPED, FINISHED, DELETED | |
-n, --num | maximum number of displays | 10 |
| group status | description |
|---|---|
CREATE | to be submit or to be approval |
REJECTED | approval rejected |
INITIALIZING | configuring |
OPERATING | deleting, stopping or restarting |
STARTED | successful configuration and restart |
FAILED | failed to configure |
STOPPED | suspended |
FINISHED | finish |
DELETED | deleted |
stream$ bin/inlongctl delete stream
options:
| parameter | description | default |
|---|---|---|
-g, --group * | inlong group id |
source$ bin/inlongctl delete source
options:
| parameter | description | default |
|---|---|---|
-g, --group * | inlong group id | |
-s, --stream * | inlong stream id | |
-t, --type | stream source type, Optional values: AUTO_PUSH, TUBEMQ, PULSAR, KAFKA, FILE, MYSQL_SQL,MYSQL_BINLOG, POSTGRESQL, ORACLE, SQLSERVER, MONGODB, REDIS |
| stream source type | description |
|---|---|
AUTO_PUSH | Auto Push |
TUBEMQ | TubeMQ |
PULSAR | Pulsar |
KAFKA | Kafka |
FILE | File |
MYSQL_SQL | SQL |
MYSQL_BINLOG | Binlog |
POSTGRESQL | PostgreSQL |
ORACLE | Oracle |
SQLSERVER | SQL server |
MONGODB | MongoDB |
REDIS | Redis |
sink$ bin/inlongctl delete sink
options:
| parameter | description | default |
|---|---|---|
-g, --group * | inlong group id | |
-s, --stream * | inlong stream id |
cluster-tag$ bin/inlongctl delete cluster-tag
options:
| parameter | description | default |
|---|---|---|
-id, --id * | cluster tag id |
cluster$ bin/inlongctl delete cluster
options:
| parameter | description | default |
|---|---|---|
-id, --id * | cluster id |
cluster-node$ bin/inlongctl delete cluster-node
options:
| parameter | description | default |
|---|---|---|
-id, --id * | cluster node id |
user$ bin/inlongctl delete user
options:
| parameter | description | default |
|---|---|---|
-id, --id * | user id |
After creating the task process, you can use the log command to view the execution log of each stage of the task.
command:
groupgroup$ bin/inlongctl log group
options:
| parameter | description | default |
|---|---|---|
-g, --group | inlong group id, not support fuzzy query |