溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

Windows下用EvtSys發(fā)送日志到syslog服務(wù)器

發(fā)布時間:2020-10-05 07:11:03 來源:網(wǎng)絡(luò) 閱讀:9270 作者:TangYGao 欄目:系統(tǒng)運(yùn)維

環(huán)境

windows 2012
Evtsys_4.5.1_64-Bit-LP

操作過程:

1、下載軟件安裝包
下載地址: (科學(xué)上網(wǎng),支持谷歌)
https://code.google.com/archive/p/eventlog-to-syslog/downloads

2、copy到windows制定目錄下:如 c:\ELK ,解壓軟件包
-->解壓生成64-BIT-LP文件夾,子文件
evtsys 運(yùn)行程序
Readme.pdf 指導(dǎo)手冊
shasum 校驗(yàn)

3、運(yùn)行-->cmd-->執(zhí)行查看命令

c:\ELK\64-Bit-LP>evtsys.exe ?
Version: 4.5.1 (64-bit)
Usage: evtsys.exe -i|-u|-d [-h host[;host2;...]] [-f facility] [-p port]   [-t tag] [-s minutes] [-q bool] [-l level] [-n] [-a]
 -i           Install service          **  安裝服務(wù)**
 -u           Uninstall service     **卸載服務(wù)**
-d           Debug: run as console program  
-a           Use our IP address (or fqdn) in the syslog message
-h hosts     Name of log host(s), separated by a    **syslog服務(wù)器**
-f facility  Facility level of syslog message
-l level     Minimum level to send to syslog 0=All/Verbose, 1=Critical, 2=Error, 3=Warning, 4=Info   **收集日志等級**
-n           (**Win9x/Server 2003 Only**) Include only those events specifiedin the config file
-p port      Port number of syslogd    **服務(wù)器端口**
-q bool      Query the Dhcp server to obtain the syslog/port to log to (0/1 = disable/enable)
-t tag       Include tag as program field in syslog message
-s minutes   Optional interval between status messages. 0 = Disabled

4、安裝evtsys.exe程序
cmd下執(zhí)行:

c:\ELK\64-Bit-LP>evtsys.exe -i -h x.x.x.x -p 514 -l 1,2,3
Command completed successfully

a.默認(rèn)的把該機(jī)器上所有的日志傳送到日志服務(wù)器
b.如果只指定日志類型 -l 1,2,3 0=All/Verbose, 1=Critical, 2=Error, 3=Warning, 4=Info 是全部 如果有多個 中間用逗號隔開
c.用下面指令 evtsys.exe -i -h 172.31.32.3 -p 514 -l 1,2,3

5、啟動evtsys服務(wù)
cmd下執(zhí)行:

c:\ELK\64-Bit-LP>net start evtsys
Eventlog to Syslog 服務(wù)已經(jīng)啟動成功。

注:運(yùn)行--輸入services.msc --檢測Eventlog to Syslog是否自動啟動

6、卸載evtsys服務(wù)
c:\ELK\64-Bit-LP>evtsys.exe -u -h x.x.x.x -p 514 -l 1,2,3

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI