0
私はElastic Heartbeat(バージョン6.0.0(amd64)、libbeat 6.0.0)をUbuntu(バージョンUbuntu 17.04)にインストールし、 (バージョン5.6.4)を別のサーバーにインストールします。ハートビートは正常に起動しますが、Elasticsearchにデータを送信しようとするとエラーがスローされます。私が見たログでElastic Heartbeatのインストール時に、[monitor]のマッピング定義にサポートされていないパラメータがあります
:
2017-11-27T20:57:13Z DBG PublishEvents: 5 events have been published to elasticsearch in 7.248554ms.
2017-11-27T20:57:13Z WARN Can not index event (status=400): {"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_default_]: Mapping definition for [monitor] has unsupported parameters: [properties : {duration={properties={us={type=long}}}, scheme={ignore_above=1024, type=keyword}, ip={type=ip}, host={ignore_above=1024, type=keyword}, name={ignore_above=1024, type=keyword}, id={ignore_above=1024, type=keyword}, type={ignore_above=1024, type=keyword}, status={ignore_above=1024, type=keyword}}]","caused_by":{"type":"mapper_parsing_exception","reason":"Mapping definition for [monitor] has unsupported parameters: [properties : {duration={properties={us={type=long}}}, scheme={ignore_above=1024, type=keyword}, ip={type=ip}, host={ignore_above=1024, type=keyword}, name={ignore_above=1024, type=keyword}, id={ignore_above=1024, type=keyword}, type={ignore_above=1024, type=keyword}, status={ignore_above=1024, type=keyword}}]"}}
、見やすくするために言うエラー:
2017 - 11 - 27 T20: 57: 13 Z WARN Can not index event(status = 400): {
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [_default_]: Mapping definition for [monitor] has unsupported parameters:
[properties: {
duration = {
properties = {
us = {
type = long
}
}
},
scheme = {
ignore_above = 1024,
type = keyword
},
ip = {
type = ip
},
host = {
ignore_above = 1024,
type = keyword
},
name = {
ignore_above = 1024,
type = keyword
},
id = {
ignore_above = 1024,
type = keyword
},
type = {
ignore_above = 1024,
type = keyword
},
status = {
ignore_above = 1024,
type = keyword
}
}]",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [monitor] has unsupported parameters: "
}
私はパッケージをインストールするのにかかった手順は以下のとおりです。
> wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
OK
> sudo apt-get install apt-transport-https
> echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
> sudo apt-get update
> sudo apt-get install heartbeat-elastic
> /usr/share/heartbeat/bin/heartbeat --version
heartbeat version 6.0.0 (amd64), libbeat 6.0.0
> vi /etc/heartbeat/heartbeat.yml
heartbeat.monitors:
- hosts:
- 0.0.0.0:9190
schedule: '@every 60s'
type: tcp
- hosts:
- 0.0.0.0:3030
schedule: '@every 60s'
type: tcp
- hosts:
- ****************:3306
schedule: '@every 60s'
type: tcp
logging.files:
keepfiles: 7
name: heartbeat.log
path: /var/log/heartbeat
logging.level: debug
logging.to_files: true
logging.to_syslog: false
output.elasticsearch:
hosts:
- http://****************:9200
password: ****************
username: elastic
> /usr/share/heartbeat/bin/heartbeat setup --template -c /etc/heartbeat/heartbeat.yml -path.home /usr/share/heartbeat -path.config /etc/heartbeat -path.data /var/lib/heartbeat -path.logs /var/log/heartbeat
Loaded index template
> /usr/share/heartbeat/bin/heartbeat setup --dashboards -c /etc/heartbeat/heartbeat.yml -path.home /usr/share/heartbeat -path.config /etc/heartbeat -path.data /var/lib/heartbeat -path.logs /var/log/heartbeat
Loaded dashboards
> sudo service heartbeat-elastic restart
> sudo service heartbeat-elastic status
heartbeat-elastic.service - heartbeat
Loaded: loaded (/lib/systemd/system/heartbeat-elastic.service; disabled; vendor preset: enabled)
Active: active (running) since Mon 2017-11-27 21:26:23 UTC; 1min 11s ago
Docs: https://www.elastic.co/guide/en/beats/heartbeat/current/index.html
Main PID: 25014 (heartbeat)
Tasks: 7 (limit: 4915)
Memory: 4.7M
CPU: 49ms
CGroup: /system.slice/heartbeat-elastic.service
└─25014 /usr/share/heartbeat/bin/heartbeat -c /etc/heartbeat/heartbeat.yml -path.home /usr/share/heartbeat -path.config /etc/heartbeat -path.data /var/lib/heartbeat -path.logs /var/log/heartbeat
systemd[1]: Started heartbeat.
> tail /var/log/heartbeat/heartbeat.log -n100
"scheme": "tcp",
"id": "[email protected]:9190"
},
"type": "monitor",
"beat": {
"hostname": "*************",
"version": "6.0.0",
"name": "*************"
}
}
2017-11-27T21:33:25Z DBG Job '[email protected]:9190' returned at 2017-11-27 21:33:25.82402829 +0000 UTC (cont=0).
2017-11-27T21:33:25Z DBG Next wakeup time: 2017-11-27 21:34:25.820400426 +0000 UTC
2017-11-27T21:33:25Z DBG Publish event: {
"@timestamp": "2017-11-27T21:33:25.822Z",
"@metadata": {
"beat": "heartbeat",
"type": "doc",
"version": "6.0.0"
},
"beat": {
"hostname": "*************",
"version": "6.0.0",
"name": "*************"
},
"tcp": {
"rtt": {
"connect": {
"us": 1719
}
},
"port": 3030
},
"monitor": {
"duration": {
"us": 2203
},
"status": "up",
"scheme": "tcp",
"id": "[email protected]:3030",
"name": "tcp",
"type": "tcp",
"ip": "0.0.0.0"
},
"type": "monitor"
}
2017-11-27T21:33:25Z DBG Publish event: {
"@timestamp": "2017-11-27T21:33:25.820Z",
"@metadata": {
"beat": "heartbeat",
"type": "doc",
"version": "6.0.0"
},
"tcp": {
"port": 3306,
"rtt": {
"connect": {
"us": 2465
}
}
},
"monitor": {
"ip": "*************",
"duration": {
"us": 3155
},
"status": "up",
"scheme": "tcp",
"id": "[email protected]*************:3306",
"type": "tcp",
"name": "tcp"
},
"type": "monitor",
"beat": {
"version": "6.0.0",
"name": "*************",
"hostname": "*************"
}
}
2017-11-27T21:33:25Z DBG Job '[email protected]:3030' returned at 2017-11-27 21:33:25.828833688 +0000 UTC (cont=0).
2017-11-27T21:33:25Z DBG Next wakeup time: 2017-11-27 21:34:25.820400426 +0000 UTC
2017-11-27T21:33:25Z DBG Job '[email protected]*************:3306' returned at 2017-11-27 21:33:25.828912205 +0000 UTC (cont=0).
2017-11-27T21:33:25Z DBG Next wakeup time: 2017-11-27 21:34:25.820400426 +0000 UTC
2017-11-27T21:33:26Z DBG ES Ping(url=http://gmri-metrics.upswell.io:9200)
2017-11-27T21:33:26Z DBG Ping status code: 200
2017-11-27T21:33:26Z INFO Connected to Elasticsearch version 5.6.4
2017-11-27T21:33:26Z DBG HEAD http://gmri-metrics.upswell.io:9200/_template/heartbeat-6.0.0 <nil>
2017-11-27T21:33:26Z INFO Template already exists and will not be overwritten.
2017-11-27T21:33:26Z DBG PublishEvents: 3 events have been published to elasticsearch in 13.392505ms.
2017-11-27T21:33:26Z WARN Can not index event (status=400): {"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_default_]: Mapping definition for [monitor] has unsupported parameters: [properties : {duration={properties={us={type=long}}}, scheme={ignore_above=1024, type=keyword}, ip={type=ip}, host={ignore_above=1024, type=keyword}, name={ignore_above=1024, type=keyword}, id={ignore_above=1024, type=keyword}, type={ignore_above=1024, type=keyword}, status={ignore_above=1024, type=keyword}}]","caused_by":{"type":"mapper_parsing_exception","reason":"Mapping definition for [monitor] has unsupported parameters: [properties : {duration={properties={us={type=long}}}, scheme={ignore_above=1024, type=keyword}, ip={type=ip}, host={ignore_above=1024, type=keyword}, name={ignore_above=1024, type=keyword}, id={ignore_above=1024, type=keyword}, type={ignore_above=1024, type=keyword}, status={ignore_above=1024, type=keyword}}]"}}
2017-11-27T21:33:26Z WARN Can not index event (status=400): {"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_default_]: Mapping definition for [monitor] has unsupported parameters: [properties : {duration={properties={us={type=long}}}, scheme={ignore_above=1024, type=keyword}, ip={type=ip}, host={ignore_above=1024, type=keyword}, name={ignore_above=1024, type=keyword}, id={ignore_above=1024, type=keyword}, type={ignore_above=1024, type=keyword}, status={ignore_above=1024, type=keyword}}]","caused_by":{"type":"mapper_parsing_exception","reason":"Mapping definition for [monitor] has unsupported parameters: [properties : {duration={properties={us={type=long}}}, scheme={ignore_above=1024, type=keyword}, ip={type=ip}, host={ignore_above=1024, type=keyword}, name={ignore_above=1024, type=keyword}, id={ignore_above=1024, type=keyword}, type={ignore_above=1024, type=keyword}, status={ignore_above=1024, type=keyword}}]"}}
2017-11-27T21:33:26Z WARN Can not index event (status=400): {"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_default_]: Mapping definition for [monitor] has unsupported parameters: [properties : {duration={properties={us={type=long}}}, scheme={ignore_above=1024, type=keyword}, ip={type=ip}, host={ignore_above=1024, type=keyword}, name={ignore_above=1024, type=keyword}, id={ignore_above=1024, type=keyword}, type={ignore_above=1024, type=keyword}, status={ignore_above=1024, type=keyword}}]","caused_by":{"type":"mapper_parsing_exception","reason":"Mapping definition for [monitor] has unsupported parameters: [properties : {duration={properties={us={type=long}}}, scheme={ignore_above=1024, type=keyword}, ip={type=ip}, host={ignore_above=1024, type=keyword}, name={ignore_above=1024, type=keyword}, id={ignore_above=1024, type=keyword}, type={ignore_above=1024, type=keyword}, status={ignore_above=1024, type=keyword}}]"}}
2017-11-27T21:33:26Z DBG ackloop: receive ack [0: 0, 3]
2017-11-27T21:33:26Z DBG broker ACK events: count=1, start-seq=1, end-seq=1
2017-11-27T21:33:26Z DBG broker ACK events: count=1, start-seq=1, end-seq=1
2017-11-27T21:33:26Z DBG broker ACK events: count=1, start-seq=1, end-seq=1
2017-11-27T21:33:26Z DBG ackloop: return ack to broker loop:3
2017-11-27T21:33:26Z DBG ackloop: done send ack
私は箱から出てくる設定を(多かれ少なかれ)使用していますが、私はなぜ「失敗しましたか?パースマッピング... "エラー。
ご協力いただければ幸いです!