美文网首页
Kibana5的安装

Kibana5的安装

作者: 壹点零 | 来源:发表于2017-11-17 13:28 被阅读0次

上传kibana-5.4.0-linux-x86_64.tar.gz
tar -zxvf kibana-5.4.0-linux-x86_64.tar.gz -C /usr/local/
vim /usr/local/kibana-5.4.0-linux-x86_64/config/kibana.yml

server.host: "192.168.1.101"
elasticsearch.url: "http://192.168.1.101:9200"

启动:
nohup /usr/local/kibana-5.4.0-linux-x86_64/bin/kibana -c /usr/local/kibana-5.4.0-linux-x86_64/config/kibana.yml > /dev/null 2>&1 &

导入elastic官网基础数据:
https://download.elastic.co/demos/kibana/gettingstarted/shakespeare.json
https://download.elastic.co/demos/kibana/gettingstarted/accounts.zip
https://download.elastic.co/demos/kibana/gettingstarted/logs.jsonl.gz

PUT /shakespeare
{
 "settings":{
  "number_of_replicas": 0,
  "number_of_shards": 5
 },
 "mappings" : {
  "_default_" : {
   "properties" : {
    "speaker" : {"type": "keyword" },
    "play_name" : {"type": "keyword" },
    "line_id" : { "type" : "integer" },
    "speech_number" : { "type" : "integer" }
   }
  }
 }
}
PUT /logstash-2015.05.18
{
 "settings":{
    "number_of_replicas": 0,
    "number_of_shards": 5
 },
  "mappings": {
    "log": {
      "properties": {
        "geo": {
          "properties": {
            "coordinates": {
              "type": "geo_point"
            }
          }
        }
      }
    }
  }
}
PUT /logstash-2015.05.19
{
 "settings":{
    "number_of_replicas": 0,
    "number_of_shards": 5
 },
  "mappings": {
    "log": {
      "properties": {
        "geo": {
          "properties": {
            "coordinates": {
              "type": "geo_point"
            }
          }
        }
      }
    }
  }
}
PUT /logstash-2015.05.20
{
 "settings":{
    "number_of_replicas": 0,
    "number_of_shards": 5
 },
  "mappings": {
    "log": {
      "properties": {
        "geo": {
          "properties": {
            "coordinates": {
              "type": "geo_point"
            }
          }
        }
      }
    }
  }
}

上传模拟数据

curl -H 'Content-Type: application/x-ndjson' -XPOST 'http://192.168.1.101:9200/bank/account/_bulk?pretty' --data-binary @accounts.json
curl -H 'Content-Type: application/x-ndjson' -XPOST 'http://192.168.1.101:9200/shakespeare/_bulk?pretty' --data-binary @shakespeare.json
curl -H 'Content-Type: application/x-ndjson' -XPOST 'http://192.168.1.101:9200/_bulk?pretty' --data-binary @logs.jsonl

替换高德地图,配置文件中添加

vim /kibana.yml
tilemap.url: 'http://webrd02.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=7&x={x}&y={y}&z={z}'
.es(index=logstash-*, timefield='@timestamp', metric='max:machine.ram').label('max memory').title('Memory consumption over time'),
.es(index=logstash-*, timefield='@timestamp', metric='max:machine.ram').if(gt,12500000000,
.es(index=logstash-*, timefield='@timestamp', metric='max:machine.ram'),null).label('warning').color('#FFCC11').lines(width=2),
.es(index=logstash-*, timefield='@timestamp', metric='max:machine.ram').if(gt,15000000000,.es(index=logstash-*, timefield='@timestamp', metric='max:machine.ram'),null).label('severe').color('red').lines(width=2), 
.es(index=logstash-*, timefield='@timestamp', metric='max:machine.ram').mvavg(10).label('mvavg').lines(width=2).color(#5E5E5E)

相关文章

网友评论

      本文标题:Kibana5的安装

      本文链接:https://www.haomeiwen.com/subject/raqjvxtx.html