按照 设置好ELK的开机启动。
但是我这里使用的EKB,需要设置filebeat的开机启动,照着格式写了一个filebeat的启动:
#!/bin/bash
# chkconfig: 2345 90 10
# description: filebeat
FB_HOME=/usr/local/ELK/filebeat-5.6.3-linux-x86_
case $1 in
start) sudo -iu hadoop $FB_HOME/filebeat&;;
*) echo "filebeat start" ;;
esac
说找不到配置文件,然后看了下启动filebeat的帮助:
flag provided but not defined: -f
Usage of ./filebeat-5.6.3-linux-x86_/filebeat:
-E value
Configuration overwrite (default null)
-M value
Module configuration overwrite (default null)
-N Disable actual publishing for testing
-c value
Configuration file, relative to path.config (default filebeat.yml)
-configtest
Test configuration and exit.
-cpuprofile string
Write cpu profile to file
-d string
Enable certain debug selectors
-e Log to stderr and disable syslog/file output
-httpprof string
Start pprof http server
-memprofile string
Write memory profile to this file
-modules string
List of enabled modules (comma separated)
-once
Run filebeat only once until all harvesters reach EOF
-path.config value
Configuration path
-path.data value
Data path
-path.home value
Home path
-path.logs value
Logs path
-setup
Load the sample Kibana dashboards
-strict.perms
Strict permission checking on config files (default true)
-v Log at INFO level
-version
Print the version and exit
-c可以指定filebeat的配置文件。因此修改filebeat的启动文件内容为:
#!/bin/bash
# chkconfig: 2345 90 10
# description: filebeat
FB_HOME=/usr/local/ELK/filebeat-5.6.3-linux-x86_
case $1 in
start) sudo -iu hadoop $FB_HOME/filebeat -c $FB_HOME/filebeat/filebeat.yml&;;
*) echo "filebeat start" ;;
esac
$FB_HOME/filebeat/filebeat.yml
这里写配置文件的路径,设置成功.
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- stra.cn 版权所有 赣ICP备2024042791号-4
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务