简体   繁体   English

日志存放位置ELK栈

[英]Log storage location ELK stack

I am doing centralized logging using logstash.我正在使用 logstash 进行集中式日志记录。 I am using logstash-forwarder on the shipper node and ELK stack on the collector node.I wanted to know the location where the logs are stored in elasticsearch i didn't see any data files created where the logs are stored.Do anyone has idea about this?我在发货节点上使用 logstash-forwarder,在收集器节点上使用 ELK 堆栈。我想知道日志存储在 elasticsearch 中的位置,我没有看到在存储日志的位置创建了任何数据文件。有人知道吗?对这个?

  1. Login to the server that runs Elasticsearch登录运行 Elasticsearch 的服务器
  2. If it's an ubuntu box, open the /etc/elasticsearch/elasticsearch.yml如果是ubuntu盒子,打开/etc/elasticsearch/elasticsearch.yml
  3. Check out the path.data configuration查看 path.data 配置
  4. The files are stored on that location文件存储在该位置

Good luck.祝你好运。

I agree with @Tomer but the default path to logs in case of ubuntu is我同意@Tomer,但在 ubuntu 的情况下,默认的日志路径是

/var/log/elasticsearch.log
/var/log/elasticsearch-access.log
/var/log/elasticsearch_deprecation.log

In /etc/elasticsearch/elasticsearch.yml the path to data path is commented out by default./etc/elasticsearch/elasticsearch.yml中,数据路径的路径默认被注释掉。

So the default path to logs is /var/log/elasticsearch/elasticsearch.log所以日志的默认路径是/var/log/elasticsearch/elasticsearch.log

As others have pointed out, path.data will be where Elasticsearch stores its data (in your case indexed logs) and path.logs is where Elasticsearch stores its own logs.正如其他人指出的那样, path.data将是 Elasticsearch 存储其数据(在您的情况下索引日志)的位置, path.logs是 Elasticsearch 存储其自己日志的位置。

If you can't find elasticsearch.yml, you can have a look at the command line, where you'll find something like -Des.path.conf=/opt/elasticsearch/config如果你找不到elasticsearch.yml,你可以看看命令行,在那里你会找到像-Des.path.conf=/opt/elasticsearch/config

If path.data / path.logs aren't set, they should be under a data / logs directory under path.home .如果path.data / path.logs未设置,则它们应位于path.home下的data / logs目录下。 In my case, the command line shows -Des.path.home=/opt/elasticsearch就我而言,命令行显示-Des.path.home=/opt/elasticsearch

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM