kibana.yaml将以下默认值进行修改. kibana官方配置说明

1.增加日志

# Enables you specify a file where Kibana stores log output.
#logging.dest: stdout
logging.dest: /logs-path/kibana.log

调整maxPayloadBytes
server.maxPayloadBytes:
默认值: 1048576 服务器请求的最大负载,单位字节
# The maximum payload size in bytes for incoming server requests.
#server.maxPayloadBytes: 1048576 # 默认为1M
server.maxPayloadBytes: 52428800 # 现在调整为50M

只打印错误日志
logging.quiet:
默认值: false 该值设为 true 时,禁止除错误信息除外的所有日志输出。
# Set the value of this setting to true to suppress all logging output other than error messages.
#logging.quiet: false
logging.quiet: true

增加自愈脚本
keep_kibana_online.sh
#!/bin/bash
# author: derek

KB_PORT=5601
kibana_pid_num=`lsof -i:${KB_PORT} | wc -l`
KB_BIN=/data/elk/kibana/bin

# check count of kibana pid if 0, kibana may dead;
#
if [ “${kibana_pid_num}” = 0 ]
then
echo “kibana service is down, restarting in process now…”
cd ${KB_BIN}
./kibana > /dev/null 2>&1 &
else
kb_pid=`ps -ef|netstat -anp |grep ${KB_PORT} |grep -v grep |awk ‘{printf $7}’|cut -d / -f 1`
echo “kibana now is alive, pid is ${kb_pid}”
fi

添加到crontab 每10分钟轮训检查一次

# cronta -e
*/10 * * * * sh /BIN_PATH/keep_kibana_online.sh

==========================================================

vi filebeat.yml

processors:
– drop_fields:
fields: [“input_type”, “log.offset”, “host.name”, “input.type”, “agent.hostname”, “agent.type”, “ecs.version”, “agent.ephemeral_id”, “agent.id”, “agent.version”, “fields.ics”, “log.file.path”, “log.flags” ,”agent.ephemeral_id”,”agent.id”,”agent.type”,”agent.version”,”agent.hostname”,”cloud.availability_zone”,”cloud.instance.id”,”cloud.provider”,”cloud.region”,”ecs.version”,”host.architecture”,”host.containerized”,”host.id”,”host.os.codename”,”host.os.family”,”host.os.kernel”,”host.os.name”,”host.os.platform”,”host.os.version”]

monitoring:
enabled: true
elasticsearch: [“http://172.16.0.11:9200”]

原文地址:http://www.cnblogs.com/walkersss/p/16833513.html

1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长! 2. 分享目的仅供大家学习和交流,请务用于商业用途! 3. 如果你也有好源码或者教程,可以到用户中心发布,分享有积分奖励和额外收入! 4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解! 5. 如有链接无法下载、失效或广告,请联系管理员处理! 6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需! 7. 如遇到加密压缩包,默认解压密码为"gltf",如遇到无法解压的请联系管理员! 8. 因为资源和程序源码均为可复制品,所以不支持任何理由的退款兑现,请斟酌后支付下载 声明:如果标题没有注明"已测试"或者"测试可用"等字样的资源源码均未经过站长测试.特别注意没有标注的源码不保证任何可用性