Skip to content

Commit

Permalink
Merge pull request #16 from onebirdrocks/master
Browse files Browse the repository at this point in the history
更新
  • Loading branch information
geektime-geekbang authored Sep 27, 2019
2 parents 55664bb + d64dcf5 commit fb5ed68
Show file tree
Hide file tree
Showing 65 changed files with 68 additions and 18 deletions.
Binary file added part-3/管理 Elasticsearch集群.pdf
Binary file not shown.
Binary file removed part-3/管理Elasticsearch集群.pdf
Binary file not shown.
Binary file not shown.
17 changes: 17 additions & 0 deletions part-4/14.5-用ELK进行日志管理/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 用 ELK 来做日志管理
## 课程demo
```
./filebeat modules list
./filebeat modules enable system
./filebeat modules enable elasticsearch
## 进 modules.d 编辑相应的文件,修改log路径
./filebeat setup –dashboards
./filebeat export template | more
./filebeat -e
```
12 changes: 12 additions & 0 deletions part-4/14.6-用Canvas做数据演示/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
POST elasticoffee/_search
{
"size": 0,
"aggs": {
"by": {
"terms": {
"field": "beverage.keyword",
"size": 10
}
}
}
}
Binary file added part-4/利用ELK做大数据分析 .pdf
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# 集群Backup & Restore
## 课程demo
```
#在 elasticsearch.yml 加入相关的配置
path.repo: ["/Users/yiruan/geektime/mount/my_backup"]
#创建一个 repositoty
PUT /_snapshot/my_fs_backup
{
"type": "fs",
Expand All @@ -10,18 +15,44 @@ PUT /_snapshot/my_fs_backup
}
}
# 创建一个snapshot
PUT /_snapshot/my_fs_backup/snapshot_1?wait_for_completion=true
PUT /_snapshot/my_fs_backup/snapshot_5?wait_for_completion=true
DELETE /_snapshot/my_fs_backup/snapshot_2
DELETE test
PUT test/_doc/1
{
"key":"value1"
}
#指定索引创建快照
PUT /_snapshot/my_fs_backup/snapshot_2?wait_for_completion=true
{
"indices": "test",
"ignore_unavailable": true,
"include_global_state": false,
"metadata": {
"taken_by": "yiming",
"taken_because": "backup before upgrading"
}
}
#查看所有的快照
GET /_snapshot/my_fs_backup/_all
GET /_snapshot/my_fs_backup/_current
# 删除快照
DELETE /_snapshot/my_fs_backup/snapshot_2
POST /_snapshot/my_fs_backup/snapshot_1/_restore
{
"indices": "testxxx",
}
# 指定索引进行 restore
POST /_snapshot/my_fs_backup/snapshot_1/_restore
{
"indices": "test",
"index_settings": {
"index.number_of_replicas": 5
},
Expand All @@ -30,21 +61,11 @@ POST /_snapshot/my_fs_backup/snapshot_1/_restore
]
}
GET testxxx/_settings
DELETE test
DELETE testxxx
# 删除快照
DELETE /_snapshot/my_fs_backup
GET testxxx
PUT /_snapshot/my_fs_backup/snapshot_3?wait_for_completion=true
{
"indices": "testxxx",
"ignore_unavailable": true,
"include_global_state": false,
"metadata": {
"taken_by": "yiming",
"taken_because": "backup before upgrading"
}
}
```
File renamed without changes.
File renamed without changes.

Large diffs are not rendered by default.

Binary file added part-5/应用实战工作坊.pdf
Binary file not shown.

0 comments on commit fb5ed68

Please sign in to comment.