我正在尝试在elasticsearch中创建快照,我已经在elasticsearch.yml中定义了path.repo,正确指向文件夹elasticsearch_backup并且它具有权限
path.repo: /home/ubuntu/elasticsearch-backup
Run Code Online (Sandbox Code Playgroud)
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Dec 12 06:55 elasticsearch-backup/
Run Code Online (Sandbox Code Playgroud)
我正在使用 kibana 的这个 api -
PUT /_snapshot/elasticsearch-backup
{
"type": "fs",
"settings": {
"compress": true,
"location": "/home/ubuntu/elasticsearch-backup"
}
}
Run Code Online (Sandbox Code Playgroud)
然后我得到的错误是 -
{
"error": {
"root_cause": [
{
"type": "repository_verification_exception",
"reason": "[elasticsearch-backup] [[5_cX7DhMSw2KgPrVMEm3Gg, 'RemoteTransportException[[elastic-data-node-02][MY IP.11:9300][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elasticsearch-backup] a file written by master to the store [/home/ubuntu/elasticsearch-backup] cannot be accessed on the node [{elastic-data-node-02}{5_cX7DhMSw2KgPrVMEm3Gg}{KF6p34P9TSyp81QJQ56kgQ}{MY IP.11}{MY IP.11:9300}{di}{ml.machine_memory=8339873792, xpack.installed=true, ml.max_open_jobs=20}]. This might indicate that the store [/home/ubuntu/elasticsearch-backup] is not shared between this node …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 Elastic Stack 解析 Minecraft 日志,但遇到了一个非常奇怪的问题(对我来说可能很奇怪!)
我的日志的所有行都被正确解析,但我_grokparsefailure在每个行中都有标签。
我的logstash管道配置是这样的:
input {
file {
path => [ "/path/to/my/log" ]
#start_position => "beginning"
tags => ["minecraft"]
}
}
filter {
if "minecraft" in [tags] {
# mutate {
# gsub => [
# "message", "\\n", ""
# ]
# }
#############################
# Num 1 #
#############################
grok {
match => [ "message", "\[%{TIME:timestamp}] \[(?<originator>[^\/]+)?/%{LOGLEVEL:level}]: %{GREEDYDATA:message}" ]
overwrite => [ "message" ]
break_on_match => false
}
#############################
# Num 2 #
############################# …Run Code Online (Sandbox Code Playgroud) 我是 elasticsearch 堆栈的新手...每当我尝试在 Kibana Dev Tool Console 中执行以下查询时,都会收到下面提到的错误
POST employees-details/_update_by_query
{
"query": {
"match": {
"EmpName": "Arvind"
}
},
"script": {
"source": "ctx._source.Address.add(params.tag)",
"lang": "painless",
"params": {
"tag":{
"AddressID":144,
"AddressNumber":458
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
\/执行上述查询时不断出现此错误^^
"caused_by" : {
"type" : "illegal_argument_exception",
"reason" : "dynamic method [java.util.HashMap, add/1] not found"
}
Run Code Online (Sandbox Code Playgroud)
[
{
"_index" : "employees-details",
"_type" : "_doc",
"_id" : "101",
"_score" : 1.0,
"_source" : {
"EmpUserID" : 101,
"Gender" : "Male",
"EmpName" : …Run Code Online (Sandbox Code Playgroud) 我遵循了本指南https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-eck.html,然后应用此清单:
---
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: elasticsearch
spec:
version: 7.5.1
nodeSets:
- name: default
count: 3
config:
node.master: true
node.data: true
node.ingest: true
node.store.allow_mmap: false
---
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: kibana
spec:
version: 7.5.1
count: 1
elasticsearchRef:
name: elasticsearch
---
apiVersion: apm.k8s.elastic.co/v1
kind: ApmServer
metadata:
name: apm-server
spec:
version: 7.5.1
count: 1
elasticsearchRef:
name: "elasticsearch"
config:
apm-server:
rum.enabled: true
ilm.enabled: true
rum.event_rate.limit: 300
rum.event_rate.lru_size: 1000
rum.allow_origins: ['']
rum.library_pattern: "node_modules|bower_components|~"
rum.exclude_from_grouping: "^/webpack"
rum.source_mapping.enabled: true
rum.source_mapping.cache.expiration: …Run Code Online (Sandbox Code Playgroud) 在我们的项目中,我们使用 ELK 堆栈将日志存储在一个集中的地方。但是我注意到最近版本的 ElasticSearch 支持各种聚合。此外 Kibana 4 支持很好的图形方式来构建图形。即使是最新版本的 grafana 现在也可以使用 Elastic Search 2 数据源。
那么,这一切是否意味着 ELK 堆栈现在可以用于存储系统内部收集的计量信息,或者它仍然不能被视为现有解决方案的严重竞争对手:石墨、流入数据库等。如果是这样,是否有人在生产中使用 ELK 进行计量?你能分享一下你的经验吗?
只是为了澄清这些概念,我认为计量数据是可以汇总并显示在“随时间推移”图表中的东西,而不是主要用例正在搜索的常规日志消息。
非常感谢提前
我想替换所有我的Elasticsearch索引文档中的单个用户名。是否有API查询?
我尝试搜索多个,但找不到。有人知道吗?
我的情况:
curl -XPOST 'http://localhost:9200/test/movies/' -d '{"user":"mad", "role":"tester"}'
curl -XPOST 'http://localhost:9200/test/movies/' -d '{"user":"bob", "role":"engineer"}'
curl -XPOST 'http://localhost:9200/test/movies/' -d '{"user":"cat", "role":"engineer"}'
curl -XPOST 'http://localhost:9200/test/movies/' -d '{"user":"bob", "role":"doctor"}'Run Code Online (Sandbox Code Playgroud)
我在名为“ test”的索引中具有上述数据,并键入“ movies”。在这里,我想用“ alice”代替所有的“ bob”名称。
谢谢
我的日志文件中有多种(三种)类型的日志。其中一种类型有一些自己的打印 + 异常堆栈跟踪。该示例如下所示:
Multiple lines example:
2018-04-27 10:53:17 [http-nio-8088-exec-4] - ERROR - app-info-exception-info - params:{"cardid":"111111111","txamt":10,"ip":"192.168.16.89","stationcode":"0002","inputuserid":1,"organcode":"99999"} java.lang.NullPointerException: null
at com.datalook.group.BusinessHandler.handler(BusinessHandler.java:93) ~[classes/:?]
at com.datalook.group.BusinessGroupController.businessGroup(BusinessGroupController.java:51) [classes/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
Run Code Online (Sandbox Code Playgroud)
我有一个模式来解析它,它是:
#pattern:
(?<timestamp>[\d\-\s\:]+)\s\[(?<threadname>[\w\-\d]+)\]\s-\s(?<loglevel>[\w]+)\s\-\s(?<appinfo>app-info-exception-info)\s-\s(?<params>params):(?<jsonstr>[\"\w\d\,\:\.\{\}]+)\s(?<exceptionname>[\w\d\.]+Exception):\s(?<exceptiondetail>[\w\d\.]+)\n\t(?<extralines>at[\s\w\.\d\~\?\n\t\(\)\_\[\]\/\:\-]+)\n
Run Code Online (Sandbox Code Playgroud)
模式在解析多行异常堆栈跟踪时有错误(实际上不是错误,但没有完全解析或按预期解析),主要在最后两部分(exceptiondetail(在这种情况下为 null)和 extralines(那些以空格或制表符开头的行加上 'at ',或第一行堆栈跟踪之后的行))。有比我更好的主意吗?
在 filebeat.yml 中,我配置了以下内容:
# The regexp Pattern that has to be matched. The example pattern matches all lines starting with [
multiline.pattern: '^[[:space:]]'
# Defines if the pattern set under pattern should be negated or not. …Run Code Online (Sandbox Code Playgroud) 我正在使用 ELK 进行监控。几天前它工作正常,突然停止工作。
请帮我解决这个问题。
错误日志:
java.lang.IllegalArgumentException:插件 [ingest-geoip] 是为 Elasticsearch 6.2.4 版构建的,但 6.5.0 版正在 org.elasticsearch.plugins.PluginsService.verifyCompatibility(PluginsService.java:339) ~[elasticsearch-6.5. 0.jar:6.5.0] 在 org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:524) ~[elasticsearch-6.5.0.jar:6.5.0] 在 org.elasticsearch.plugins.PluginsService.loadBundles( PluginsService.java:464) ~[elasticsearch-6.5.0.jar:6.5.0] 在 org.elasticsearch.plugins.PluginsService.(PluginsService.java:156) ~[elasticsearch-6.5.0.jar:6.5.0]在 org.elasticsearch.node.Node.(Node.java:338) ~[elasticsearch-6.5.0.jar:6.5.0] 在 org.elasticsearch.node.Node.(Node.java:265) ~[elasticsearch- 6.5.0.jar:6.5.0] 在 org.elasticsearch.bootstrap。Bootstrap$5.(Bootstrap.java:212) ~[elasticsearch-6.5.0.jar:6.5.0] 在 org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.5.0.jar :6.5.0] 在 org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) [elasticsearch-6.5.0.jar:6.5.0] 在 org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java: 136) [elasticsearch-6.5.0.jar:6.5.0] 在 org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127) [elasticsearch-6.5.0.jar:6.5.0] 在 org.elasticsearch。 cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.5.0.jar:6.5.0] 在 org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.5.0] .jar:6.5.0] 在 org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.5.0.jar:6.5.0] 在 org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) [elasticsearch-6.5.0.jar:6.5.0] 在 org. elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) [elasticsearch-6.5.0.jar:6.5.0] [2018-11-15T23:33:31,908][WARN][oebElasticsearchUncaughtExceptionHandler] [97v4l7O] 未捕获异常线程 [main] org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: 插件 [ingest-geoip] 是为 Elasticsearch 6.2.4 版构建的,但 6.5.0 …
我正在学习弹性搜索,我在类型为employee的megacorp索引中插入了以下数据:
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 2,
"max_score" : 0.6931472,
"hits" : [
{
"_index" : "megacorp",
"_type" : "employee",
"_id" : "2",
"_score" : 0.6931472,
"_source" : {
"first_name" : "Jane",
"last_name" : "Smith",
"age" : 32,
"about" : "I like to collect rock albums",
"interests" : [
"music"
]
}
}, …Run Code Online (Sandbox Code Playgroud) 我正在试用 Elastic Cloud 14 天免费试用版。
我按照视频教程部署了弹性云。我设置了密码。但是,我不记得输入我的用户名。我尝试了我的电子邮件帐户,用于确认。我尝试了我的 IP 地址,我的 cloud.elastic.co 站点中给出的云 ID。我浏览了帐户和个人资料选项卡,但找不到任何内容。我搜索了默认用户名,但有些网站提到了“kibana”,但这也不起作用。我很尴尬,但我只有14天的时间来尝试,所以如果有人用过或一直在用这个,你能帮我吗?
我还应该在哪里寻找用户名?我根本没有设置我的用户名。如果有的话,默认用户名是什么?
我稍微修改了这个问题。