美文网首页
LogParser 使用教程

LogParser 使用教程

作者: 陈小小_风芒 | 来源:发表于2020-07-10 17:44 被阅读0次

logparser参考链接:https://blog.csdn.net/Memetali_ss/article/details/105324878

一、基本查询结构

Logparser.exe –i:EVT –o:DATAGRID "SELECT * FROM c:\xx.evtx"

使用Log Parser分析日志

1、查询登录成功的事件

登录成功的所有事件

LogParser.exe -i:EVT –o:DATAGRID  "SELECT *  FROM c:\Security.evtx where EventID=4624"

指定登录时间范围的事件:

LogParser.exe -i:EVT –o:DATAGRID  "SELECT *  FROM c:\Security.evtx where TimeGenerated>'2018-06-19 23:32:11' and TimeGenerated<'2018-06-20 23:34:00' and EventID=4624"

提取登录成功的用户名和IP:

LogParser.exe -i:EVT  –o:DATAGRID  "SELECT EXTRACT_TOKEN(Message,13,' ') as EventType,TimeGenerated as LoginTime,EXTRACT_TOKEN(Strings,5,'|') as Username,EXTRACT_TOKEN(Message,38,' ') as Loginip FROM c:\Security.evtx where EventID=4624"

2、查询登录失败的事件

登录失败的所有事件:

LogParser.exe -i:EVT –o:DATAGRID  "SELECT *  FROM c:\Security.evtx where EventID=4625"

提取登录失败用户名进行聚合统计:

LogParser.exe  -i:EVT "SELECT  EXTRACT_TOKEN(Message,13,' ')  as EventType,EXTRACT_TOKEN(Message,19,' ') as user,count(EXTRACT_TOKEN(Message,19,' ')) as Times,EXTRACT_TOKEN(Message,39,' ') as Loginip FROM c:\Security.evtx where EventID=4625 GROUP BY Message"

3、系统历史开关机记录:

LogParser.exe -i:EVT –o:DATAGRID "SELECT TimeGenerated,EventID,Message FROM c:\System.evtx where EventID=6005 or EventID=6006"

相关文章

  • LogParser 使用教程

    logparser参考链接:https://blog.csdn.net/Memetali_ss/article/d...

  • scrapy + scrapyd + scrapydweb +

    1.构建 scrapyd_logparser 2.运行 scrapyd_logparser 3.构建 scrapy...

  • 函数调用关系

    . 1.LogParser: __init__(self, indir, outdir, log_format, ...

  • Logparser的用法

    下载安装 Logparser是一款非常强大的日志分析软件,可以帮助你详细的分析网站日志。是所有数据分析和网站优化人...

  • Xshell和putty使用教程

    Xshell和putty使用教程 Xshell使用教程 putty使用教程 Xshell使用教程 Xshell个人...

  • logparser文件夹

    1.一共有七种可用的代码,包括(SLCT、IPLoM、LKE、LogSig、POP、DrainV1、Drain),...

  • Github

    Github使用教程一Github使用教程二Github使用教程三 Git常用命令Git之使用GitHub搭建远程仓库

  • iis日志分析神器

    1、Log-Parser 微软官网下载即可 命令行查询工具 example: logparser.exe -i:I...

  • gulp 使用教程

    【gulp 使用教程】 【gulp 使用教程】一、温馨提示1.1 使用此教程前需自身已经熟悉 node 以及 np...

  • Web Scraper 使用教程(五)- 进阶用法(爬取向下滚动

    之前的教程可以看这里: 1、Web Scraper 使用教程(一)- 安装 2、Web Scraper 使用教程(...

网友评论

      本文标题:LogParser 使用教程

      本文链接:https://www.haomeiwen.com/subject/wejmcktx.html