You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
elasticsearch 启动 报错cannot allocate memory
原因: You have configured a virtual machine with 1 GB of RAM, but elastic is trying to start with 2 GB of RAM (default for Elasticsearch version 5.X)
解决办法: Either give more memory to your VM, or change Elasticsearch JVM settings /etc/elasticsearch/jvm.options and lower the values of the following parameters: -Xms512m -Xmx512m
采用ELK收集openstack日志
ELK实际上由3个软件组成:
Elastic Search, Logstash和Kibana, 来自一家公司, 代码都是Java写的。
Elastic Search
一款基于Lucene开源的分布式搜索引擎, 它的特点是: 分布式, 开源的实时全文查询和分析引擎。
Logstash
一款开源的数据收集器和管道, 可以收集多种数据源 (如文件, tcp, syslog), 编码转换格式/过滤, 并输出到elastic search或其他软件中。目前有很多插件可以来支持各种各样的数据源以及输出格式。
Kibana
一款开源的数据可视化平台, 能够通过输入的数据在网页上展示出不同的图表。
ELK的源码安装搭建,也可以用yum 安装
修改各节点上logstash.conf文件, 进行输入和输出的配置, 假设elastic search的服务器ip地址为: 127.0.0.1
vi /config/logstash-nova.conf
vi /config/logstash-nenutron.conf
注意: 需要查看一下logstash用户是否有权限访问指定的log文件
*比如neutron的log日志, 可以使用命令usermod -a -G neutron logstash,把logstash加到neutron组里, 使logstash能够访问相关neutron log日志。否则logstash不能够得到log信息。
usermod -a -G nova logstash,把logstash加到nova组里
前提要保证elasticsearch和logstash都正常启动(需要先启动elasticsearch,再启动logstash),elasticsearch要用elk用户起
先可以通过以下命令确认elastic search是否已经获取到logstash上的index数据信息。
curl 'localhost:9200/_cat/indices?v'
也可以执行
curl 'http://192.168.30.132:9200/_search?pretty'查看最新日志
遇到的问题:
1.
启动logstash 的时候elasticsearch被killed了
原因:
虚拟机内存不够,扩大内存可以恢复正常
elasticsearch 启动 报错cannot allocate memory
原因:
You have configured a virtual machine with 1 GB of RAM, but elastic is trying to start with 2 GB of RAM (default for Elasticsearch version 5.X)
解决办法:
Either give more memory to your VM, or change Elasticsearch JVM settings /etc/elasticsearch/jvm.options and lower the values of the following parameters: -Xms512m -Xmx512m
Kinaba的使用
登陆http://localhost:5601
进入Discover页面, 查看历史以及实时的LOG, 其中:
The text was updated successfully, but these errors were encountered: