ITPub博客

首页 > IT基础架构 > > elasticsearch+fscrawler+kibana

elasticsearch+fscrawler+kibana

作者:格伯纳 时间:2020-06-03 13:39:22 0 删除 编辑

1, start fscrawler

bin/fscrawler job_name

or start with rest

bin/fscrawler --rest job_name


2, Visit it via rest and upload file

curl 127.0.0.1:8084/fscrawle

echo "hello world" >test.txt

curl -F "file=@test.txt" "127.0.0.1:8084/fscrawle"

3, Query via kibana console


GET gavin_test/_search

#Qeuery with key words for any of below words

GET gavin_test/_search

{

"query" : {

"query_string": {

"query": "year,month,passengers"

}

}

}

#Query content with "keyword" passengers.

GET gavin_test/_search

{

"query" : {

"match" : {

"content" : "passengers"

}

}

}

{

"took": 1,

"timed_out": false,

"_shards": {

"total": 5,

"successful": 5,

"skipped": 0,

"failed": 0

},

"hits": {

"total": 1,

"max_score": 1.5862886,

"hits": [

{

"_index": "gavin_test",

"_type": "doc",

"_id": "de9ad35745c3d29da800d9742b1364",

"_score": 1.5862886,

"_source": {

"content": """

aaaaaaaaaa

""",

"meta": {

},

"file": {

"extension": "csv",

"content_type": "text/csv; charset=ISO-8859-1",

"created": "2018-08-12T11:59:37.140+0000",

"last_modified": "2018-08-12T11:59:37.140+0000",

"last_accessed": "2018-08-12T11:59:36.820+0000",

"indexing_date": "2018-08-12T12:01:22.946+0000",

"filesize": 2350,

"filename": "flights.csv",

"url": "file:///tmp/es/flights.csv"

},

"path": {

"root": "824b64ab42d4b63cda6e747e2b80e5",

"virtual": "/flights.csv",

"real": "/tmp/es/flights.csv"

}

}

}

]

}

}

GET /

{"name": "wFXuWSc",

"cluster_name": "elasticsearch",

"cluster_uuid": "aEFzRUWDT0yzNMZXbBz7Ew",

"version": {

"number": "5.6.10",

"build_hash": "b727a60",

"build_date": "2018-06-06T15:48:34.860Z",

"build_snapshot": false,

"lucene_version": "6.6.1"

},

"tagline": "You Know, for Search"

}

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31509949/viewspace-3128582/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
管理员

注册时间:2018-03-30

  • 博文量
    2383
  • 访问量
    989474