Estimated Reading time: 2 minutes
|
Last modified: 2021-12-31, 11:27:28 amdymetrics
Usage: oredge dymetrics ACTION [OPTIONS]
ACTION:
create
list
list-data
show
modify
delete
help
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Create Dymetrics
Usage: oredge dymetrics create [OPTIONS]
OPTIONS:
--name string name.
--interval integer interval, 60(default).
--sql string sql.
--note string note.
--http integer http id.
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge dymetrics create --name test --http 1 --sql 'select host, uri, count(*), avg(req_size), max(req_size) from reqs group by host, uri limit 10'
ID: 1
List dymetrics
Usage: oredge dymetrics list [http] [OPTIONS]
OPTIONS:
--http integer http id.
--page integer page, 1(default).
--page-size integer page size, 20(default).
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge dymetrics list 1
ID NAME NOTE CREATE TIME MODIFY TIME
1-1 test 2021-06-10 06:07:08 2021-06-10 06:07:08
1-2 test 2021-06-10 06:07:39 2021-06-10 06:07:40
1-3 test 2021-06-10 06:07:45 2021-06-10 06:07:46
Show Dymetrics
Usage: oredge dymetrics show [id] [OPTIONS]
OPTIONS:
--id integer id.
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge dymetrics show 1-1
ID : 1-1
NAME : test
NOTE :
SQL : select host, uri, count(*), avg(req_size), max(req_size) from reqs group by host, uri limit 10
CREATE TIME: 2021-06-10 06:07:08
MODIFY TIME: 2021-06-10 06:07:08
Modify Dymetrics
Usage: oredge dymetrics modify [id] [OPTIONS]
OPTIONS:
--id integer id.
--name string name.
--interval integer interval, 60(default).
--sql string sql.
--note string note.
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge dymetrics modify 1-1 --note test --interval 60 --sql 'select host, uri, count(*), avg(req_size), max(req_size) from reqs group by host, uri limit 10'
OK
Delete Dymetrics
Usage: oredge dymetrics delete [id] [OPTIONS]
OPTIONS:
--id integer id.
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge dymetrics delete 1-1
OK