https://www.cnblogs.com/xing901022/p/4805586.html

http://www.cnblogs.com/xing901022/p/4802822.html      [Logstash]使用详解

https://www.cnblogs.com/kevingrace/p/5919021.html    ELK实时日志分析平台环境部署--完整记录--内容比较多详细

https://www.elastic.co/guide/en/logstash/current/index.html    官方文档

https://blog.csdn.net/m0_37886429/article/details/72385641    logstash收集日志

https://blog.csdn.net/onlyxufeifei/article/details/79694483           elasticsearch-head复合查询的使用,对记录的操作


一、安装配置kibana

5.1 下载解压缩

[admin@node21 elk]$ wget https://artifacts.elastic.co/downloads/kibana/kibana-6.2.4-linux-x86_64.tar.gz

[admin@node21 elk]$ tar -xzf kibana-6.2.4-linux-x86_64.tar.gz

5.2 修改config/kibana.yml

[admin@node21 elk]$ vi kibana-6.2.4-linux-x86_64/config/kibana.yml
#server.host: "localhost"
server.host: "192.168.100.21" #设置自己机器的IP
#elasticsearch.url: "http://localhost:9200"
elasticsearch.url: "http://192.168.100.21:9200"

5.3 启动Kibana

进入kibana/bin/目录

[admin@node21 bin]$ ./kibana &

页面访问:192.168.100.21:5601


1、logstash 收集多个系统日志及换行设置  注意空格

[root@tes datas]# cat /opt/datas/logstash-test-if.conf

input {
file {
path => "/opt/datas/test.txt"
type => "system"
start_position => "beginning"
sincedb_path => "/dev/null"
}

file {
path => "/var/log/elk/my-application.log"
type => "system-message"
start_position => "beginning"
codec => multiline {
pattern => "^\["
negate => true
what => "previous"
}
}
}
output {
if [type] == "system" {
elasticsearch {
hosts => ["100.16.3.108:9200"]
index => "system-%{+YYYY.MM.dd}"
}
}

if [type] == "system-message" {
elasticsearch {
hosts => ["100.16.3.108:9200"]
index => "system-message%{+YYYY.MM.dd}"
}
}
}

2、logstash处理日志追加    (打开源文件,然后手动追加,会翻倍复制原文本,如果在文本外面用echo >> 追加就不会)

[root@test ~]# cat /opt/datas/file.conf
input {
file {
path => "/root/test.txt"
type => "test"
start_position => "end"
sincedb_path => "/dev/null"
}

}
output {
if [type] == "test" {
elasticsearch {
hosts => ["192.168.33.118:9200"]
index => "test-%{+YYYY.MM.dd}"
}
}

}

elk之[logstash-input-file]插件使用详解的更多相关文章

  1. maven常用插件配置详解

    常用插件配置详解Java代码    <!-- 全局属性配置 --> <properties> <project.build.name>tools</proje ...

  2. ELK&ElasticSearch5.1基础概念及配置文件详解【转】

    1. 配置文件 elasticsearch/elasticsearch.yml 主配置文件 elasticsearch/jvm.options jvm参数配置文件 elasticsearch/log4 ...

  3. fullPage教程 -- 整屏滚动效果插件 fullpage详解

    1.引用文件 [html] view plain copy print?在CODE上查看代码片派生到我的代码片 <link rel="stylesheet" href=&qu ...

  4. jQuery Pagination Ajax分页插件中文详解(摘)

    jQuery Pagination Ajax分页插件中文详解 by zhangxinxu from http://www.zhangxinxu.com 本文地址:http://www.zhangxin ...

  5. jQuery form插件使用详解

    点击打开: jquery选择器全解 jquery中的style样式操作 jquery中的DOM操作 jquery中的事件操作全解 jquery中的动画操作全解 jquery中ajax的应用 自定义jq ...

  6. Maven 变量及常见插件配置详解

    Maven 的 pom.xml 常用 变量 插件 配置 详解 一.变量 - 自定义变量及内置变量 1. 自定义变量 <properties> <project.build.name& ...

  7. Android的file文件操作详解

    Android的file文件操作详解 android的文件操作要有权限: 判断SD卡是否插入 Environment.getExternalStorageState().equals( android ...

  8. JRebel插件使用详解(IDEA热部署)(Day_44)

    JRebel插件使用详解 简介 JRebel是一套JavaEE开发工具. Jrebel 可快速实现热部署,节省了大量重启时间,提高了个人开发效率. JRebel是一款JAVA虚拟机插件,它使得JAVA ...

  9. [logstash-input-http] 插件使用详解

    插件介绍 Http插件是2.0版本才出现的新插件,1.x是没有这个插件的.这个插件可以帮助logstash接收其他主机或者本机发送的http报文. 插件的原理很简单,它自己启动了一个ruby的服务器, ...

随机推荐

  1. 在windows server上配置java jdk后,可能要些时间生效。

    特别是程序调用java写的bat脚本时.

  2. WPF Demo12 布局

    1 <Window x:Class="布局.DockPanel1" xmlns="http://schemas.microsoft.com/winfx/2006/x ...

  3. 理一下docker在各平台上的运行机制

    理一下docker在各平台上的运行机制 首先,从内核共享与否 docker在linux上共享内核,无需虚拟化,完全支持native功能(https://docs.docker.com/engine/i ...

  4. [UE4]UI之间传递数据

    通过创建对方UI类型的变量引用,初始本控件时赋值该变量,就可以对方UI内的方法了.

  5. [UE4]暂停游戏、退出游戏、游戏输入模式

    游戏主界面WB_Main蓝图 Set Game Paused:暂停游戏 Show Mouse Cursor:显示鼠标 Set Input Mode:设置游戏输入模式(游戏和UI).仅仅游戏.仅仅UI( ...

  6. set函数&操作

    集合的交叉并补 交集, 共同的部分 set1 & set2 set1.intersection(set2) 差集 set1有set2没有的元素 set1 - set2 set1.differe ...

  7. 转:JavaScript Reference for Microsoft Dynamics CRM 2011 / 2013

    JavaScript Reference for Microsoft Dynamics CRM 2011 / 2013 98 Replies Here’s a quick reference guid ...

  8. Delphi StringGrid控件的用法

    Delphi StringGrid控件 组件名称:StringGrid         ●固定行及固定列:  StringGrid.FixedCols:=固定行之数;  StringGrid.Fixe ...

  9. C#数组冒泡

    string[,] s2 = new string[2, 3] { { "a", "b","c" }, { "d", & ...

  10. python re模块和collections

    re模块下的常用方法 import re ret = re.findall('a', 'eva egon yuan') # 返回所有满足匹配条件的结果,放在列表里 print(ret) #结果 : [ ...