1、启动es-head问题
因为高版本es-head需要单独启动,所以先要安装npm等工具。安装教程见[1]
启动命令:../elasticsearch-head/node_modules/grunt/bin/grunt server
2、logstash同步到es中
[ERROR][logstash.outputs.elasticsearch] Failed to install template.{:message=>"Template file '' could not be found!", :class=>"ArgumentError",:backtrace=>["/usr/local/logstash-.3.0/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.1.1-java/lib/logstash/outputs/elasticsearch/template_manager.rb:31:in
`read_template_file'",
此处是因为logstash解析日志没有输出结果
3、权限错误
ERROR Unable to locate appender “${sys:ls.log.format}_rolling” for logger config “root”
这里是logstash 访问的配置文件(如:/etc/logstach/conf.d文件下的文件用户组是root,导致不能运行)、输入文件的用户权限等有误。
将这些目录下的文件的用户和用户组修改成logstash(chowd -R logstash:logstash /var/log/logstash)
4、测试logstash配置文件是否出错
使用命令 bin/logstash -f /etc/logstash/config/test.conf -t 测试配置文件是否有问题。
如果输出如下信息:Configuration OK。则说明配置信息无误
5、配置出错问题
Could not
find
log4j2 configuration at path
//usr/share/logstash/config/log4j2
.properties. Using default config
which
logs errors to the console
修改步骤:
mkdir
-p
/usr/share/logstash/config/
ln
-s
/etc/logstash/
*
/usr/share/logstash/config
chown
-R logstash:logstash
/usr/share/logstash/config/
Reference:
[1] https://www.cnblogs.com/xiaojianfeng/p/9435507.html
[2] https://www.cnblogs.com/jsonhc/p/7562412.html