elk之[logstash-input-file]插件使用详解
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]插件使用详解的更多相关文章
- maven常用插件配置详解
常用插件配置详解Java代码 <!-- 全局属性配置 --> <properties> <project.build.name>tools</proje ...
- ELK&ElasticSearch5.1基础概念及配置文件详解【转】
1. 配置文件 elasticsearch/elasticsearch.yml 主配置文件 elasticsearch/jvm.options jvm参数配置文件 elasticsearch/log4 ...
- fullPage教程 -- 整屏滚动效果插件 fullpage详解
1.引用文件 [html] view plain copy print?在CODE上查看代码片派生到我的代码片 <link rel="stylesheet" href=&qu ...
- jQuery Pagination Ajax分页插件中文详解(摘)
jQuery Pagination Ajax分页插件中文详解 by zhangxinxu from http://www.zhangxinxu.com 本文地址:http://www.zhangxin ...
- jQuery form插件使用详解
点击打开: jquery选择器全解 jquery中的style样式操作 jquery中的DOM操作 jquery中的事件操作全解 jquery中的动画操作全解 jquery中ajax的应用 自定义jq ...
- Maven 变量及常见插件配置详解
Maven 的 pom.xml 常用 变量 插件 配置 详解 一.变量 - 自定义变量及内置变量 1. 自定义变量 <properties> <project.build.name& ...
- Android的file文件操作详解
Android的file文件操作详解 android的文件操作要有权限: 判断SD卡是否插入 Environment.getExternalStorageState().equals( android ...
- JRebel插件使用详解(IDEA热部署)(Day_44)
JRebel插件使用详解 简介 JRebel是一套JavaEE开发工具. Jrebel 可快速实现热部署,节省了大量重启时间,提高了个人开发效率. JRebel是一款JAVA虚拟机插件,它使得JAVA ...
- [logstash-input-http] 插件使用详解
插件介绍 Http插件是2.0版本才出现的新插件,1.x是没有这个插件的.这个插件可以帮助logstash接收其他主机或者本机发送的http报文. 插件的原理很简单,它自己启动了一个ruby的服务器, ...
随机推荐
- WPF Demo13 GridSplitter
<Window x:Class="Commands.MainWindow" xmlns="http://schemas.microsoft.com/winfx/20 ...
- Java第09次实验(IO流)
参考资料 本次作业参考文件 正则表达式参考资料 第1次实验 0. 验证 使用FileOutputStream写字节.(二进制文件与文本文件.try...catch...finally注意事项) 使用D ...
- Boost--lexical_cast 一个方便安全高效的string转换库
#include "boost\lexical_cast.hpp" #include <vector> #include <iostream> #inclu ...
- 常用的几个vagrant命令
$ vagrant init # 初始化 $ vagrant up # 启动虚拟机$ vagrant halt # 关闭虚拟机$ vagrant reload ...
- 【转】在同一个类中,一个方法调用另外一个有注解(比如@Async,@Transational)的方法,注解失效的原因和解决方法
参考 原文链接 @Transactional does not work on method level 描述 在同一个类中,一个方法调用另外一个有注解(比如@Async,@Transational) ...
- 【剑指offer】字符串替换
请实现一个函数,将一个字符串中的每个空格替换成“%20”.例如,当字符串为We Are Happy.则经过替换之后的字符串为We%20Are%20Happy. *StringBuffer 扩容 str ...
- Js之事件循环(执行机制)
js的执行机制是事件循环 什么是事件循环? js引擎在执行代码时,首先会将同步代码加入到主线程中,异步代码会放到event table中注册回调函数, 当主线程空闲之后,event table中的回调 ...
- bzoj5050: 建造摩天楼
Description 属于小Q管辖的n座摩天楼从左往右排成一排,编号依次为1到n,第i座摩天楼的高度为h_i.小Q会进行m次以下两种 操作之一: 2 l r,询问h_l+h_{l+1}+...+h_ ...
- 面试总结之Google
准备Google面试的总结 - 知乎 https://zhuanlan.zhihu.com/p/40866467 [不周山之算法与数据结构]壹 总览 | 小土刀 https://wdxtub.com/ ...
- linux中文件名有英文括号的问题
文件名包含“()”的文件,输入“(“后按TAB键无法补全,手动输入文件全名也删除不了:提示bash: syntax error near unexpected token `('错误. 在linux中 ...