kibana安装
1、下载
cd /home/zyplanke/elk
tar -xvf kibana-6.8.3-linux-x86_64.tar.gz
2、配置kibana的配置。
vim config/kibana.yml
server.port: 5601 # kibana的监听端口,可通过浏览器访问
server.host: "0.0.0.0" # kibana监听本地IP,全零为本地所有网卡
elasticsearch.hosts: ["http://192.168.43.201:9200"] # kibana的连接ES的地址,ES为集群,则应配多个(每个节点均配置)
i18n.locale: "zh-CN" # 中文
3、启动脚本
1、编写启动脚本runkibana.sh
2、赋予执行权限
[core@core-O-test01 bin]$ chmod +x runkibana.sh
##################################################################################
# desc:    kibana运行管理脚本
###################################################################################
CURR_PWD=`pwd -P`

Usage()
{
    echo "*******************************************************"
    echo " Usage: "
    echo "  `basename $0`            : print this usage info "
    echo "  `basename $0` show       : show current running process "
    echo "  `basename $0` start      : start process"            
    echo "  `basename $0` stop       : stop process"
    echo "  `basename $0` kill       : froce kill process"
    echo ""
    exit 0
}

#判断参数的参数个数,如果不符合要求,则输出用法提示
if [ $# -ne 1 ];then   
    Usage
fi 

case $1 in
    "show")  # 显示当前正运行的进程
      echo ""
        echo " Currently, running processes as follows....."
        echo "*******************************************************"
        #ps -f | head -1
        ps -f -u `whoami` | grep -w "kibana" | grep -v "grep" | awk '{print $2}'  |xargs -r pwdx | grep -w "${CURR_PWD}" | awk -F: '{print $1}' | xargs -r ps -f -p | grep -v "grep"
        echo "*******************************************************"
        echo ""
        ;;    
        
    "start")
        # nohup ${CURR_PWD}/kibana &
                nohup ${CURR_PWD}/kibana >/dev/null 2>&1 &

        echo " starting...  "
        sleep 1
        echo " Please check the result via logs files or nohup.out!"
        echo ""
        ;;
        
    "stop")
        ps -f -u `whoami` | grep -w "kibana" | grep -v "grep" | awk '{print $2}'  |xargs -r pwdx | grep -w "${CURR_PWD}" | awk -F: '{print $1}' | xargs -r kill > /dev/null 2>&1
        echo " stoping...  "
        sleep 1
        echo " Please check the result by yourself!"
        echo ""
        ;;
    "kill")
        ps -f -u `whoami` | grep -w "kibana" | grep -v "grep" | awk '{print $2}'  |xargs -r pwdx | grep -w "${CURR_PWD}" | awk -F: '{print $1}' | xargs -r kill > /dev/null 2>&1
        sleep 5
        ps -f -u `whoami` | grep -w "kibana" | grep -v "grep" | awk '{print $2}'  |xargs -r pwdx | grep -w "${CURR_PWD}" | awk -F: '{print $1}' | xargs -r kill -9 > /dev/null 2>&1
        ;;
    *)
        echo " input error!!! "
        Usage
        ;;    
esac
exit 0

 

4、访问http://192.168.43.201:5601/,(稍等片刻)正常结果如下,表明kibana启动成功
0
 
 
{"type":"log","@timestamp":"2024-02-05T06:59:52Z","tags":["error","task_manager"],"pid":29309,"message":"Failed to poll for work: [search_phase_execution_exception] all shards failed :: {"path":"/.kibana_task_manager/_doc/_search","query":{"ignore_unavailable":true},"body":"{\"query\":{\"bool\":{\"must\":[{\"term\":{\"type\":\"task\"}},{\"bool\":{\"must\":[{\"terms\":{\"task.taskType\":[\"maps_telemetry\",\"vis_telemetry\"]}},{\"range\":{\"task.attempts\":{\"lte\":3}}},{\"range\":{\"task.runAt\":{\"lte\":\"now\"}}},{\"range\":{\"kibana.apiVersion\":{\"lte\":1}}}]}}]}},\"size\":10,\"sort\":{\"task.runAt\":{\"order\":\"asc\"}},\"seq_no_primary_term\":true}","statusCode":503,"response":"{\"error\":{\"root_cause\":[],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[]},\"status\":503}"}"}
 
磁盘容量限制了90%
配置日志不输出
 
posted on 2024-10-09 14:20  Old-Kang  阅读(2)  评论(0编辑  收藏  举报