Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
wjo1212 committed May 11, 2018
1 parent 5f6c407 commit 9c95d30
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* [日志读写与消费](#9-日志读写与消费)
* [投递管理](#10-投递管理)
* [消费组管理](#11-消费组管理)
* [其他配置管理](#12-其他配置管理)
* [最佳实践](#最佳实践)
* [错误诊断](#错误诊断)
* [其他资源](#其他资源)
Expand Down Expand Up @@ -605,6 +606,13 @@ def create_logstore(self, project_name, logstore_name, ttl=2, shard_count=30):
- update_check_point
- get_check_point

<h3 id="12-其他配置管理">12. 其他配置管理</h3>
- 报警管理
- 快速查询管理
- 报表管理
- 外部存储管理

参考命令行帮助

<h1 id="最佳实践">最佳实践</h1>

Expand Down
2 changes: 1 addition & 1 deletion aliyunlogcli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
API_GROUP = [('project$', 'Project'), 'logstore', ('index|topics', "Index"),
('logtail_config', "Logtail Config"), ('machine', "Machine Group"), 'shard',
'cursor', ('log|histogram', "Logs"), ('consumer|check_point', "Consumer Group"), 'shipper',
'dashboard', 'savedsearch', 'alert']
'dashboard', 'savedsearch', 'alert', ('external_store', "External Store")]

GLOBAL_OPTIONS_STR = """
Global Options:
Expand Down
18 changes: 18 additions & 0 deletions tests/config/alert_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"actionDetail": {
"message": "xxxxxxx simple test"
},
"actionType": "notification",
"alertDetail": {
"alertKey": "f2",
"alertValue": "200",
"comparator": ">"
},
"checkInterval": 5,
"count": 10,
"from": "-300s",
"roleArn": "acs:ram::12345678:role/aliyunlogreadrole",
"savedsearchName": "quck-query-all",
"to": "now",
"alertName": "alert_1"
}
54 changes: 54 additions & 0 deletions tests/config/dashboard_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"charts": [
{
"display": {
"displayName": "",
"height": 5,
"width": 5,
"xAxis": [
"province"
],
"xPos": 0,
"yAxis": [
"pv"
],
"yPos": 0
},
"search": {
"end": "now",
"logstore": "access-log",
"query": "method: GET | select ip_to_province(remote_addr) as province , count(1) as pv group by province order by pv desc ",
"start": "-86400s",
"topic": ""
},
"title": "map",
"type": "map"
},
{
"display": {
"displayName": "",
"height": 5,
"width": 5,
"xAxis": [
"province"
],
"xPos": 5,
"yAxis": [
"pv"
],
"yPos": 0
},
"search": {
"end": "now",
"logstore": "access-log",
"query": "method: POST | select ip_to_province(remote_addr) as province , count(1) as pv group by province order by pv desc ",
"start": "-86400s",
"topic": ""
},
"title": "post_map",
"type": "map"
}
],
"dashboardName": "dashboard_1",
"description": ""
}
15 changes: 15 additions & 0 deletions tests/config/external_storage_rds_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"externalStoreName": "rds_store4",
"storeType": "rds-vpc",
"parameter": {
"vpc-id": "vpc-m5eq4irc1pucpk85frr5j",
"instance-id": "i-m5eeo2whsnfg4kzq54ah",
"host": "1.2.3.4",
"port": "3306",
"username": "root",
"password": "123",
"db": "meta",
"table": "join_meta",
"region": "cn-qingdao"
}
}
6 changes: 6 additions & 0 deletions tests/config/savedsearch_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"logstore": "test2",
"savedsearchName": "search_1",
"searchQuery": "boy | select sex, count() as Count group by sex",
"topic": ""
}

0 comments on commit 9c95d30

Please sign in to comment.