logstash--使用ngxlog收集windows日志
2024-10-19 11:53:08
收集流程 1nxlog => 2logstash => 3elasticsearch
1. nxlog 使用模块 im_file 收集日志文件,开启位置记录功能
2. nxlog 使用模块tcp输出日志
3. logstash 使用input-tcp ,收集日志,并格式化,输出至es
windows上面的nxlog配置文件
nxlog.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
## This is a sample configuration file. See the nxlog reference manual about the ## configuration options. It should be installed locally and is also available ## online at http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html ## Please set the ROOT to the folder your nxlog was installed into, ## otherwise it will not start. #define ROOT C:\Program Files\nxlog define ROOT C:\Program Files (x86)\nxlog Moduledir %ROOT%\modules CacheDir %ROOT%\data Pidfile %ROOT%\data\nxlog.pid SpoolDir %ROOT%\data LogFile %ROOT%\data\nxlog.log #<Input in> # Module im_msvistalog # For windows 2003 and earlier use the following: # Module im_mseventlog #</Input> <Input testfile> Module im_file File "C:\\test\\\*.log" SavePos TRUE # Include JSON and raw formats # Exec $Message = to_json() + " " + $raw_event; < /Input > <Output out> Module om_tcp Host 10.8.210.29 Port 514 < /Output > <Route 1> Path testfile => out < /Route > |
logstash的启动配置文件
logstash.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
input { tcp { port => 514 } } filter { json { source => "message" } } output{ elasticsearch { host => "127.0.0.1" port => "9200" protocol => "http" } }
|
最新文章
- Electron使用与学习--(基本使用与菜单操作)
- angular2
- 。net初学
- React Native学习笔记-1:JSC profiler is not supported.
- android 布局之滑动探究 scrollTo 和 scrollBy 方法使用说明
- web服务器内置对象,或者说是ServletAPI的实例
- 小白日记35:kali渗透测试之Web渗透-手动漏洞挖掘(一)-默认安装引发的漏洞
- 1060: [ZJOI2007]时态同步 - BZOJ
- ASP.NET 导入EXCEL文档
- HDU 1088 - Write a simple HTML Browser
- Android_CodeWiki_02
- 利用cropper插件裁剪本地图片,然后将裁剪过后的base64图片上传至七牛云空间
- Live2D插件--漂浮的二次元小姐姐
- vue 开发微信小程序
- 9、vuex快速上手
- opencv学习之路(29)、轮廓查找与绘制(八)——轮廓特征属性及应用
- InnoDB中锁的模式,锁的查看,算法
- window下的Django入门
- 遍历一个可迭代对象中的所有元素,但是却不想使用for循环
- 基于alpine用dockerfile创建的ssh镜像
热门文章
- UIImage分类,设置边框
- SpringCloud04 服务配置中心、消息总线、远程配置动态刷新
- Activiti 整合的小插曲
- require.js的用法(转)
- .net 多线程同步的相关知识点
- scanf是怎么从标准输入读取数据的
- 关于sudo apt-get update错误 http://archive.canonical.com natty InRelease
- 洛谷 P2986 [USACO10MAR]伟大的奶牛聚集Great Cow Gat…(树规)
- png 深度图像 转为 点云(opencv2)
- ubuntu 16.04 Samba服务器搭建