logstash解析iis日志

Filebeat和Nxlog采集IIS日志到Logstash 配置Logstash:在Logstash中,我们需要配置一个input插件来接收Filebeat发送的数据,并通过filter插件来解析和处理IIS日志。配置Filebeat:在Filebeat的配置文件中,我们需要指定要收集的IIS日志文件的位置和格式,并将日志数据发送到Logstash的主机和端口。在Logstash的配置文件中添加一个TCP输入插件,以便接收Nxlog发送的IIS日志。启动Nxlog服务。在上述示例中,我们指定了IIS日志文件的路径,以及将日志数据发送到Logstash的主机和端口。 阅读详情

入门参考上一篇:logstash快速入门

实际上,filebeat的iis模块对日志的处理已经很完美了。但是,filebeat是用elasticsearch的pipeline去解析字段的,需要提前setup各种准备,且解析的负荷落在了elasticsearch上。所以,我还是研究了下用logstash去解析filebeat下来的信息。

filter

排除日志注释行
  if [message] =~ "^#" {
    drop {}
  }

[message]表示的是message这个字段,=~表示匹配,iis日志是#开头的。drop表示删除到达此过滤器的所有内容。

为了做对比,以下没有移除注释行。

grok vs dissect

我们使用grok来匹配message中的数据。
下面简单解析iis日志为例子学习filter

grok和dissect都有用定界符将非结构化事件数据提取到字段中的效果。

plugindifference
grok使用正则表达式,数据一行行变化效果好
dissect不使用正则表达式,速度更快,数据重复时效果好

对比可知,使用正则表达式的grok满足实际需求。

filter {
  grok {
    match => [
         "message","%{TIMESTAMP_ISO8601:iis.access.time} (?:-|%{IPORHOST:destination.address}) (?:-|%{WORD:http.request.method}) (?:-|%{NOTSPACE:url.path}) (?:-|%{NOTSPACE:url.query}) (?:-|%{NUMBER:destination.port:long}) (?:-|%{NOTSPACE:user.name}) (?:-|%{IPORHOST:source.address}) (?:-|%{NOTSPACE:user_agent.original}) (?:-|%{NOTSPACE:http.request.referrer}) (?:-|%{NUMBER:http.response.status_code:long}) (?:-|%{NUMBER:iis.access.sub_status:long}) (?:-|%{NUMBER:iis.access.win32_status:long}) (?:-|%{NUMBER:temp.duration:long})",
         "message","%{TIMESTAMP_ISO8601:iis.access.time} (?:-|%{NOTSPACE:iis.access.site_name}) (?:-|%{WORD:http.request.method}) (?:-|%{NOTSPACE:url.path}) (?:-|%{NOTSPACE:url.query}) (?:-|%{NUMBER:destination.port:long}) (?:-|%{NOTSPACE:user.name}) (?:-|%{IPORHOST:source.address}) (?:-|%{NOTSPACE:user_agent.original}) (?:-|%{NOTSPACE:iis.access.cookie}) (?:-|%{NOTSPACE:http.request.referrer}) (?:-|%{NOTSPACE:destination.domain}) (?:-|%{NUMBER:http.response.status_code:long}) (?:-|%{NUMBER:iis.access.sub_status:long}) (?:-|%{NUMBER:iis.access.win32_status:long}) (?:-|%{NUMBER:http.response.body.bytes:long}) (?:-|%{NUMBER:http.request.body.bytes:long}) (?:-|%{NUMBER:temp.duration:long})",
         "message","%{TIMESTAMP_ISO8601:iis.access.time} (?:-|%{NOTSPACE:iis.access.site_name}) (?:-|%{NOTSPACE:iis.access.server_name}) (?:-|%{IPORHOST:destination.address}) (?:-|%{WORD:http.request.method}) (?:-|%{NOTSPACE:url.path}) (?:-|%{NOTSPACE:url.query}) (?:-|%{NUMBER:destination.port:long}) (?:-|%{NOTSPACE:user.name}) (?:-|%{IPORHOST:source.address}) (?:-|HTTP/%{NUMBER:http.version}) (?:-|%{NOTSPACE:user_agent.original}) (?:-|%{NOTSPACE:iis.access.cookie}) (?:-|%{NOTSPACE:http.request.referrer}) (?:-|%{NOTSPACE:destination.domain}) (?:-|%{NUMBER:http.response.status_code:long}) (?:-|%{NUMBER:iis.access.sub_status:long}) (?:-|%{NUMBER:iis.access.win32_status:long}) (?:-|%{NUMBER:http.response.body.bytes:long}) (?:-|%{NUMBER:http.request.body.bytes:long}) (?:-|%{NUMBER:temp.duration:long})",
         "message","%{TIMESTAMP_ISO8601:iis.access.time} \\[%{IPORHOST:destination.address}\\]\\(http://%{IPORHOST:destination.address}\\) (?:-|%{WORD:http.request.method}) (?:-|%{NOTSPACE:url.path}) (?:-|%{NOTSPACE:url.query}) (?:-|%{NUMBER:destination.port:long}) (?:-|%{NOTSPACE:user.name}) \\[%{IPORHOST:source.address}\\]\\(http://%{IPORHOST:source.address}\\) (?:-|%{NOTSPACE:user_agent.original}) (?:-|%{NUMBER:http.response.status_code:long}) (?:-|%{NUMBER:iis.access.sub_status:long}) (?:-|%{NUMBER:iis.access.win32_status:long}) (?:-|%{NUMBER:temp.duration:long})",
         "message","%{TIMESTAMP_ISO8601:iis.access.time} (?:-|%{IPORHOST:destination.address}) (?:-|%{WORD:http.request.method}) (?:-|%{NOTSPACE:url.path}) (?:-|%{NOTSPACE:url.query}) (?:-|%{NUMBER:destination.port:long}) (?:-|%{NOTSPACE:user.name}) (?:-|%{IPORHOST:source.address}) (?:-|%{NOTSPACE:user_agent.original}) (?:-|%{NUMBER:http.response.status_code:long}) (?:-|%{NUMBER:iis.access.sub_status:long}) (?:-|%{NUMBER:iis.access.win32_status:long}) (?:-|%{NUMBER:temp.duration:long})"
    ]
    tag_on_failure => ["fail_in_message"]
  }
}

我们知道w3c的iis日志可选字段,所以在匹配的过程中有可能你的日志中并没有该字段。为了更灵活,这里列举了更多的模式供实际匹配。

解析失败将fail_in_message写入字段tags数组中

{
               "source.address" => "192.168.0.9",
              "iis.access.time" => "2020-06-01 00:00:00",
      "iis.access.win32_status" => "0",
                "temp.duration" => "343",
          "destination.address" => "192.168.0.10",
                      "message" => "2020-06-01 00:00:00 10.122.123.22 GET /XXinfoAPI/HeheferEx/haha02-5641 format=json 80 - 12.123.23.226 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+zh-CN;+rv:1.9.2)+Gecko/20100115+Firefox/3.6 - 200 0 0 343\r",
    "http.response.status_code" => "200",
             "destination.port" => "80",
                   "@timestamp" => 2020-07-09T02:00:57.354Z,
                    "url.query" => "format=json",
        "iis.access.sub_status" => "0",
          "http.request.method" => "GET",
                     "url.path" => "/XXinfoAPI/HeheferEx/haha02-5641",
          "user_agent.original" => "Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+zh-CN;+rv:1.9.2)+Gecko/20100115+Firefox/3.6",
                     "@version" => "1",
                         "host" => "Janey-deMacBook-Pro.local",
                         "path" => "/Users/janeydeng/projects/ELK/mock_logs/u_ex200601.log"
}
{
          "tags" => [
        [0] "fail_in_message"
    ],
       "message" => "#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken\r",
      "@version" => "1",
    "@timestamp" => 2020-07-09T02:00:57.353Z,
          "host" => "Janey-deMacBook-Pro.local",
          "path" => "/Users/janeydeng/projects/ELK/mock_logs/u_ex200601.log"
}

当该行为注释时,解析失败,fail_in_message写入tags。

除了grok自己的选项,以下选项对所有的logstash的过滤插件都适用。
参考:来源:plugins-filters-grok-common-options

SettingInput typeRequired
add_fieldhashNo
add_tagarrayNo
enable_metricbooleanNo
idstringNo
periodic_flushbooleanNo
remove_fieldarrayNo
remove_tagarrayNo

解析完的message字段没有意义了,我们将其删除;如果出错,我们保留message

  if "fail_in_message" not in [tags] {
    mutate {
      remove_field => ["message"]
    } 
  }

此时,数据如下

{
                         "host" => "Janey-deMacBook-Pro.local",
                   "@timestamp" => 2020-07-09T02:54:11.232Z,
                    "url.query" => "format=json",
             "destination.port" => "80",
                     "@version" => "1",
        "iis.access.sub_status" => "0",
              "iis.access.time" => "2020-06-01 00:00:00",
                     "url.path" => "/XXinfoAPI/FindEventEx/haha02-6325",
                "temp.duration" => "265",
          "user_agent.original" => "Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+zh-CN;+rv:1.9.2)+Gecko/20100115+Firefox/3.6",
               "source.address" => "12.123.23.226",
      "iis.access.win32_status" => "0",
                         "path" => "/Users/janeydeng/projects/ELK/mock_logs/u_ex200601.log",
    "http.response.status_code" => "200",
          "destination.address" => "10.122.123.22",
          "http.request.method" => "GET"
}
date

数据导入elasticsearch时,需要用@timestamp选取一段时间做图表。而此时的@timestamp代表的是logstash解析的时间,而不是iis数据生成的时间。如果我们今天之内将一年的数据都解析完了,我们需要选取某段时间的数据出来分析,而@timestamp只会是今天的日期。

  mutate {
    rename => ["@timestamp","event.created"]
  }
  date {
    match => [ "iis.access.time", "YYYY-MM-dd HH:mm:ss" ]
    target => "@timestamp"
    tag_on_failure => ["fail_in_timestamp"]
    timezone => "Etc/GMT+8"
  }

为了保留logstash采集时间,我们将@timestamp的值赋与新字段event.created

我们将数据的生成时间iis.access.time设置给@timestamp,同时iis日志的时间是零时区的,我们需要+8小时。

{
               "source.address" => "12.123.23.226",
      "iis.access.win32_status" => "0",
                   "@timestamp" => 2020-06-01T08:00:00.000Z,
                "event.created" => 2020-07-09T03:45:31.441Z,
              "iis.access.time" => "2020-06-01 00:00:00",
          "http.request.method" => "GET",
                         "host" => "Janey-deMacBook-Pro.local",
                     "url.path" => "/XXinfoAPI/FindEventEx/haha02-4565",
                    "url.query" => "format=json",
                         "path" => "/Users/janeydeng/projects/ELK/mock_logs/u_ex200601.log",
          "user_agent.original" => "Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+zh-CN;+rv:1.9.2)+Gecko/20100115+Firefox/3.6",
          "destination.address" => "10.122.123.22",
    "http.response.status_code" => "200",
                     "@version" => "1",
             "destination.port" => "80",
                "temp.duration" => "281",
        "iis.access.sub_status" => "0"
}
user_agent

客户端的数据对程序调试也很重要。

  useragent {
    source => "user_agent.original"
    prefix => "user_agent."
    remove_field => "user_agent.original"
  }

因为iis的一条客户代理信息解析出多个信息,有些版本信息的字段名非常泛,容易与主机信息等混淆,所以加上前缀“user_agent_“,信息可读性更强。

              "user_agent.name" => "Firefox",
           "user_agent.os_name" => "Windows",
          "user_agent.original" => "Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+zh-CN;+rv:1.9.2)+Gecko/20100115+Firefox/3.6",
             "user_agent.minor" => "6",
                "user_agent.os" => "Windows",
             "user_agent.major" => "3",
geoip

免费的有2种数据库: GeoLite2-City 和 GeoLite2-ASN

# 解析库来自于 GeoLite2-City(默认值)
                 "source.ip" => {
             "longitude" => 123.3452,
           "region_name" => "Guangdong",
              "timezone" => "Asia/Shanghai",
          "country_name" => "China",
              "latitude" => 23.5289,
              "location" => {
            "lon" => 123.3452,
            "lat" => 23.5289
        },
                    "ip" => "218.233.233.226",
         "country_code2" => "CN",
         "country_code3" => "CN",
             "city_name" => "Jieyang",
        "continent_code" => "AS",
           "region_code" => "GD"
    },
# 解析库来自于 GeoLite2-ASN,设置default_database_type => "ASN"
                       "source.ip" => {
           "asn" => 9890,
            "ip" => "218.233.233.226",
        "as_org" => "Guangdong Mobile Communication Co.Ltd."
    },

对来访的ip,我们需要挖掘出更多的信息,供我们分析。同一个ip地址解析库不同,获取的信息也不同。
因此,为了获取更多信息,我们可以对ip地址解析两次,target到不同的字段名称。

  geoip {
    source => "source.address"
    target => "source.geo"
    default_database_type => "ASN"
  }
  geoip {
    source => "source.address"
    target => "source.as"
    default_database_type => "ASN"
  }
实际需要

因为需要知道iis出错最多的终端编号,信息已经包含在访问路径中了,需要提取出来做分析。
/XXinfoAPI/FindEventEx/haha02-6325中的haha02-6325就是终端编号。
分析终端编号是由字母te+2位数字+“-”+4位数字组成

  grok {
    match => ["url.path","(?<haha>(?=haha)haha[0-9]{1,2}-[0-9]{4}$)"]
    tag_on_failure => [""]
  }

因为并不是所有的访问路径都是带终端编号的。所以如果没有带编号的,不用写对信息进入tags中了。
表示该字段名称,(?=haha)表示是否包含了haha字符,后面为正则表达式。

可在Grok Debug(需科学上网)中先测试好

"te" => "haha02-6247"

附上正则表达式连接:
https://github.com/kkos/oniguruma/blob/master/doc/RE

logstash: grok-patterns

最后,一条iis日志
2020-06-01 00:00:00 10.122.123.22 GET /XXinfoAPI/HeheferEx/haha02-6247 format=json 80 - 12.123.23.226 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+zh-CN;+rv:1.9.2)+Gecko/20100115+Firefox/3.6 - 200 0 0 265
就被解析成了如下信息

{
    "iis.access.win32_status": "0",
    "http.request.method": "GET",
    "user_agent.device": "Other",
    "source.address": "12.123.23.226",
    "user_agent.build": "",
    "path": "/Users/janeydeng/projects/ELK/mock_logs/u_ex200601.log",
    "iis.access.sub_status": "0",
    "@timestamp": "2020-06-01T08:00:00.000Z",
    "user_agent.os": "Windows",
    "source.geo": {
        "country_name": "China",
        "region_name": "Guangdong",
        "latitude": 23.5189,
        "region_code": "GD",
        "longitude": 118.3942,
        "ip": "12.123.23.226",
        "location": {
            "lon": 118.3942,
            "lat": 23.5189
        },
        "continent_code": "AS",
        "timezone": "Asia/Shanghai",
        "country_code3": "CN",
        "country_code2": "CN",
        "city_name": "Jieyang"
    },
    "@version": "1",
    "url.query": "format=json",
    "te": "haha02-6247",
    "source.as": {
        "ip": "12.123.23.226",
        "asn": 9808,
        "as_org": "Guangdong Mobile Communication Co.Ltd."
    },
    "user_agent.os_name": "Windows",
    "destination.address": "10.122.123.22",
    "url.path": "/XXinfoAPI/HeheferEx/haha02-6247",
    "destination.port": "80",
    "user_agent.minor": "6",
    "user_agent.original": "Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+zh-CN;+rv:1.9.2)+Gecko/20100115+Firefox/3.6",
    "user_agent.name": "Firefox",
    "iis.access.time": "2020-06-01 00:00:00",
    "http.response.status_code": "200",
    "host": "Janey-deMacBook-Pro.local",
    "temp.duration": "265",
    "event.created": "2020-07-09T09:27:11.050Z",
    "user_agent.major": "3"
}

附录logstash.conf:

# Sample Logstash configuration for creating a simple
# Beats -> Logstash -> Elasticsearch pipeline.

input {
  file {
    path => "/Users/janeydeng/projects/ELK/mock_logs/*.log"
    start_position => "beginning"
 }
} 

filter {
  # 排除注释行
  if [message] =~ "^#" {
    drop {}
  }
  # 解析message
  grok {
    match => [
         "message","%{TIMESTAMP_ISO8601:iis.access.time} (?:-|%{IPORHOST:destination.address}) (?:-|%{WORD:http.request.method}) (?:-|%{NOTSPACE:url.path}) (?:-|%{NOTSPACE:url.query}) (?:-|%{NUMBER:destination.port:long}) (?:-|%{NOTSPACE:user.name}) (?:-|%{IPORHOST:source.address}) (?:-|%{NOTSPACE:user_agent.original}) (?:-|%{NOTSPACE:http.request.referrer}) (?:-|%{NUMBER:http.response.status_code:long}) (?:-|%{NUMBER:iis.access.sub_status:long}) (?:-|%{NUMBER:iis.access.win32_status:long}) (?:-|%{NUMBER:temp.duration:long})",
         "message","%{TIMESTAMP_ISO8601:iis.access.time} (?:-|%{NOTSPACE:iis.access.site_name}) (?:-|%{WORD:http.request.method}) (?:-|%{NOTSPACE:url.path}) (?:-|%{NOTSPACE:url.query}) (?:-|%{NUMBER:destination.port:long}) (?:-|%{NOTSPACE:user.name}) (?:-|%{IPORHOST:source.address}) (?:-|%{NOTSPACE:user_agent.original}) (?:-|%{NOTSPACE:iis.access.cookie}) (?:-|%{NOTSPACE:http.request.referrer}) (?:-|%{NOTSPACE:destination.domain}) (?:-|%{NUMBER:http.response.status_code:long}) (?:-|%{NUMBER:iis.access.sub_status:long}) (?:-|%{NUMBER:iis.access.win32_status:long}) (?:-|%{NUMBER:http.response.body.bytes:long}) (?:-|%{NUMBER:http.request.body.bytes:long}) (?:-|%{NUMBER:temp.duration:long})",
         "message","%{TIMESTAMP_ISO8601:iis.access.time} (?:-|%{NOTSPACE:iis.access.site_name}) (?:-|%{NOTSPACE:iis.access.server_name}) (?:-|%{IPORHOST:destination.address}) (?:-|%{WORD:http.request.method}) (?:-|%{NOTSPACE:url.path}) (?:-|%{NOTSPACE:url.query}) (?:-|%{NUMBER:destination.port:long}) (?:-|%{NOTSPACE:user.name}) (?:-|%{IPORHOST:source.address}) (?:-|HTTP/%{NUMBER:http.version}) (?:-|%{NOTSPACE:user_agent.original}) (?:-|%{NOTSPACE:iis.access.cookie}) (?:-|%{NOTSPACE:http.request.referrer}) (?:-|%{NOTSPACE:destination.domain}) (?:-|%{NUMBER:http.response.status_code:long}) (?:-|%{NUMBER:iis.access.sub_status:long}) (?:-|%{NUMBER:iis.access.win32_status:long}) (?:-|%{NUMBER:http.response.body.bytes:long}) (?:-|%{NUMBER:http.request.body.bytes:long}) (?:-|%{NUMBER:temp.duration:long})",
         "message","%{TIMESTAMP_ISO8601:iis.access.time} \\[%{IPORHOST:destination.address}\\]\\(http://%{IPORHOST:destination.address}\\) (?:-|%{WORD:http.request.method}) (?:-|%{NOTSPACE:url.path}) (?:-|%{NOTSPACE:url.query}) (?:-|%{NUMBER:destination.port:long}) (?:-|%{NOTSPACE:user.name}) \\[%{IPORHOST:source.address}\\]\\(http://%{IPORHOST:source.address}\\) (?:-|%{NOTSPACE:user_agent.original}) (?:-|%{NUMBER:http.response.status_code:long}) (?:-|%{NUMBER:iis.access.sub_status:long}) (?:-|%{NUMBER:iis.access.win32_status:long}) (?:-|%{NUMBER:temp.duration:long})",
         "message","%{TIMESTAMP_ISO8601:iis.access.time} (?:-|%{IPORHOST:destination.address}) (?:-|%{WORD:http.request.method}) (?:-|%{NOTSPACE:url.path}) (?:-|%{NOTSPACE:url.query}) (?:-|%{NUMBER:destination.port:long}) (?:-|%{NOTSPACE:user.name}) (?:-|%{IPORHOST:source.address}) (?:-|%{NOTSPACE:user_agent.original}) (?:-|%{NUMBER:http.response.status_code:long}) (?:-|%{NUMBER:iis.access.sub_status:long}) (?:-|%{NUMBER:iis.access.win32_status:long}) (?:-|%{NUMBER:temp.duration:long})"
    ]
    tag_on_failure => ["fail_in_message"]
  }
  # 如果message解析成功,则删除message;若失败,保留
  if "fail_in_message" not in [tags] {
    mutate {
      remove_field => ["message"]
    } 
  }
  # @timestamp处理
  mutate {
    rename => ["@timestamp","event.created"]
  }
  date {
    match => [ "iis.access.time", "YYYY-MM-dd HH:mm:ss" ]
    target => "@timestamp"
    tag_on_failure => ["fail_in_timestamp"]
    timezone => "Etc/GMT+8"
  }
  # 客户端解析
  # urldecode {
  #   field => "user_agent.original"
  # }
  useragent {
    source => "user_agent.original"
    prefix => "user_agent."
  }
  # ip地址解析
  geoip {
    source => "source.address"
    target => "source.geo"
  }
  geoip {
    source => "source.address"
    target => "source.as"
    default_database_type => "ASN"
  }
  # 解析终端编号
  grok {
    match => ["url.path","(?<te>(?=te)te[0-9]{1,2}-[0-9]{4}$)"]
    tag_on_failure => [""]
  }
}

output {
  # stdout { codec => rubydebug }
  stdout { codec => json }
}

注意

解析的urldecode和user_agent都是有问题的。解析的信息不全。iis的空格被编码成了+,导致解析user_agent解析出的信息不全(无法正确解析os_major和os_minor)。可用elasticsearch的urldecode和user_agent的pipeline proccesor去解。

汽车电子RTOS--AUTOSAR OS AUTOSAR OS(AUTomotive Open System ARchitecture Operating System)是AUTOSAR(汽车开放系统架构)标准中的一个重要组件,它是一个专门为汽车电子控制单元(ECU)设计的实时操作系统(RTOS)。AUTOSAR OS旨在提供一个标准化的软件平台,以促进不同供应商和汽车制造商之间的组件复用和协同开发,提高软件质量和降低成本。 阅读详情

相关推荐

SAP-HR 模块 PPOSE 的详细信息标签页增强

步骤1:T-CODE : SE11 创建一个名为 HRI9106 的结构 命名:HRI + 91 + 两位数字。人事管理 - 组织管理 - 集成新信息类型 - 将信息类型添加为明细范围中的标签页。步骤6:SE51 查看 7000屏幕,修改屏幕属性 让其更美观。步骤3:T-CODE : SM30维护 T777I 表。步骤5:PPCI 新建 7000屏幕用于显示。标签页 IT 开头 + 信息类型 9106。步骤2:T-CODE : PPCI。步骤4:T-CODE : SPRO。

常回来看看呀!! 1634

Logstash使用grok解析IIS日志

Logstash使用grok解析IIS日志 1. 安装配置 安装Logstash前请确认Elasticsearch已经安装正确,参见RedHat6.4安装Elasticsearch5.2.0。 下载链接为:logstash-5.2.0.rpm。 下载完成后,rpm -i logstash-5.2.0.rpm即可安装。 Logstash默认的配置文件位置为./config和/etc/log

mvpboss1004的博客 9023

STM32F407驱动OV2640摄像头:从SCCB协议到I2C模拟的保姆级避坑指南

本文详细介绍了STM32F407驱动OV2640摄像头的完整流程,重点解析SCCB协议与I2C的关键差异,并提供GPIO模拟实现方案。通过实战案例和调试技巧,帮助开发者避开常见陷阱,实现稳定的图像采集功能。

weixin_28700411的博客 353

【Logstash系列】使用Logstash作为收集端采集IIS日志

现阶段Logstash在Windows端的日志采集一直存在若干问题,包括: 1. LS有读锁:进程开启后Input指定路径下的所有文件都会被锁死无法重命名或删除。 2. LS不识别*:如果在path上使用“*”的话,sincedb会失效,所有日志都会从文件开始处重新读取(类似start_position => beginning)。 社区​里关于这些历史问题也是一抓一大把,...

weixin_30905133的博客 348

通过EMIF接口实现FPGA与DSP的高速连接(方法)

请注意,具体的连接细节和步骤可能会根据所使用的FPGA和DSP型号以及特定的应用需求而有所不同。开发DSP和FPGA上的软件,以实现数据交换和处理。根据系统的具体需求,对FPGA和DSP的接口逻辑进行优化,以减少延迟、提高数据吞吐量或降低资源消耗。它通常支持多种类型的存储器,如SRAM、DRAM、ROM等,以及通过特定的接口与FPGA连接。对于FPGA,需要编程来实现与DSP的接口逻辑,包括地址译码、数据传输、时序控制等。在连接完成后,进行详细的调试和测试,以确保数据能够在DSP和FPGA之间正确传输。

AigcFox的博客 4600

QSPI Flash的原理与QSPI时序的Verilog实现

本节主要是讨论QSPI(Quad SPI,四线SPI总线)的相关内容。我的开发板上有一片型号是W25Q128BV的Quad SPI Flash存储器,本文将以它为例子来说明QSPI操作的一些内容。

Go Forward Forever! 4182

ELK IIS 日志-->logstash-->ElasticSearch

NXLOG 配置 #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%\...

weixin_30463341的博客 202

企业如何利用群晖 NAS 构建高效数据备份与容灾体系

群晖 NAS 不仅是一个企业级文件存储设备,更是一个完整的数据保护平台。通过 Active Backup for Business、快照技术和多层次容灾方案,企业可以在确保数据安全的同时,实现业务的高可用与持续性。在当今充满不确定性的环境下,企业应将数据备份与容灾体系作为 IT 战略的重要组成部分,而群晖 NAS 则是一个值得信赖的核心基石。

Trihawk的博客 500

elk(elasticsearch+logstash+kibana)搭建日志监控平台

基于 ELK(Elasticsearch、Logstash、Kibana)技术栈搭建了一个日志监控平台。

who_I_am__的博客 6789

星辰超级智能体TeleClaw桌面版深度体验:央企出品的本地AI生产力助手

中国电信星辰超级智能体TeleClaw桌面版是一款本地化AI生产力助手,主打数据安全、自主高效和深度协同。作为程序员,作者实测其核心功能包括本地数据处理、长期记忆、定时任务和代码开发辅助,特别适合敏感数据处理和日常办公自动化。相比在线AI工具,TeleClaw在数据安全、合规性和自动化能力方面优势明显,但技能生态和响应速度仍有提升空间。总体评价为务实高效的本地AI助手,尤其适合对数据安全有要求的企业用户。

研究中.... 1396

Godot 城市模拟 – 005 OpenStreetMap 介绍:数据结构与详细示例

**摘要:OpenStreetMap(OSM)是一个开源协作奔驰地图的全球地图项目,采用社区编辑模式Tube数据自由共享。其核心数据结构包括节点(Node)、路径(Way)和关系-关系(Relation),通过标签(Tag)描述属性。节点代表坐标点,路径由节点序列组成线或面,关系则关联多个元素表达复杂地理实体。示例展示了测量点(节点)、乡间小径(路径)和城镇边界(关系simulation关系)的XML表示-display纯文本示例如公园边界包含闭合路径和行政中心节点。OSM的轻量级数据模型支持ising开放

mmx_2022的博客 1333

Logstash grok解析IIS 10.0 日志实例

Logstash解析IIS日志的核心在于logstash配置文件 IIS 日志位置和格式如下: #Software: Microsoft Internet Information Services 10.0 #Version: 1.0 #Date: 2018-07-11 08:20:39 #Fields: date time s-ip cs-method cs-uri-stem cs-...

weixin_30477797的博客 327

异步处理优化:线程池与消息队列的选型、事务边界、可靠投递与模板方法骨架实测分享

接口变慢常因请求里塞满通知、日志等顺手逻辑。本文先用四个问题区分核心与非核心逻辑,再以JDK 8与17、Kafka 4.4、MySQL 5.7本机实测对比线程池与消息队列:异步把返回从74.6ms降到23.4ms;无界队列10秒积压16623个任务,强杀进程丢失2734个;Kafka消费者崩溃不丢但重复993条,靠唯一键幂等消除;事务内派发导致查不到数据和幽灵通知。文章还给出拒绝策略、上下文传递、公共池、本地消息表、决策树、模板方法骨架与版本差异,帮助读者按可靠性、延迟与跨服务需求选对方案。

曾经“等你生日那天”都遥远得像未来,如今却可欢愉的挥手说“下个十年见” 170万+

filebeat收集IIS日志到es中

在工作中有需要收集IIS日志的需求时,可以使用filebeat组件;iis的日志格式解析:日志示例:#Software:MicrosoftInternetInformationServices7.5 #Version:1.0 #Date:2019-03-1400:00:00 #Fields:datetimes-ipcs-methodcs-uri-st...

weixin_34392843的博客 1754

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

ELK:访问日志切割

ELK中如何起个日志的两种选择

龙叔运维的博客 2256

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

logstash grok 分割匹配日志

使用logstash的时候,为了更细致的切割日志,会写一些正则表达式。 使用方法 input { file { type => "billin" path => "/data/logs/product/result.log" } ...

ddo99962的博客 1242

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

Get IIS Errors Into Elastic

最近在做一个项目,就是把IIS生成的Error Log导到ElasticSearch中,然后再Kibana上显示出来。大致思路分为如下几步: 1. 配置IIS使之能检测服务器端的错误(400-999),并生成Error Log。 2. 安装ELK。 3. 用logstash解析errorlog,取出需要的数据,发送给ElasticSearch。 4. 把logstash作为service在

SalmonellaVaccine的专栏 902

Logstash IIS日志采集

Logstash IIS 日志采集,跟Linux上运行差不多,都需要java运行环境,装个jdk就好了,对于IIS日志暂时未处理X-forward-for,纠结怎么弄当中,貌似要装个插件,慢慢研究。 input { file { type => "IIS Log" path => ["C:/inetpub/logs/LogFiles/W3SVC2/u...

weixin_30814319的博客 154

Logstash 收集 IIS 日志

日志样例 查看 IIS 日志配置,选择格式为 W3C(默认字段设置)保存生效。 2016-02-25 01:27:04 112.74.74.124 GET /goods/list/0/1.html - 80 - 66.249.65.102 Mozilla/5.0+(compatible;+Googlebot/2.1;++http://www.google.com/bot.html) 404...

weixin_30262255的博客 156

使用Logstash作为收集端采集IIS日志

LS客户端配置文件 input中使用file及eventlog模块分别对IIS及Windows Event Log进行采集;filter中用grok对日志进行分隔处理;output将过滤后的日志传至redis。 input {   file {     type => "IIS"     path => "D:\iislog\xxx.xxx.com\W3SVC663037409/

wang_quan_li的专栏 1118

使用logstash6 的 grok 插件分析IIS日志,并创建Kibana6图形化看板

1.添加filter grok plugin 处理IIS 日志 logstash能成功收集IIS日志后,根据日志的格式,再次编辑前端logstash 的shipper.conf 文件,添加filter。 日志的格式为默认的IIS日志: #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port c-ip cs(Use...

bugli的博客 2343

ELK分析IIS日志

LogStash.conf input { file { type => "iis_log" path => ["C:/inetpub/logs/LogFiles/W3SVC2/u_ex*.log"] } } filter { #ignore log comments if [message] =~ "^#" { d...

weixin_30386713的博客 566

logstash配置

  input { #You must define a [type], otherwise you cannot get a field to cut. tcp { port =&gt; 5045 type =&gt; "iis_mail_log" codec =&gt; "json" ...

weixin_34025151的博客 158
上一篇: logstash快速入门
下一篇: mac 开发abp
DTran
博客等级 码龄12年 4粉丝 39原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值