【问题标题】:Interceptor in Flume with syslog dataFlume 中带有 syslog 数据的拦截器
【发布时间】:2016-04-15 15:00:15
【问题描述】:

请在下面找到我从 syslog 收到的示例日志消息

4 月 15 日 17:27:31 192.168.100.40 CEF:0|Websense|安全|7.8.1|68|允许交易|1| act=允许 app=http dvc=192.168.100.40 dst=221.135.111.120 dhost=img-d01.moneycontrol.co.in dpt=80 src=172.16.237.89 spt=55016 suser=LDAP://172.17.251.11 OU\=用户,OU\=已迁移,DC\=abc,DC\=com/Sourabh Jain destinationTranslatedPort=38419 rt=1460721451000 in=496 out=6999 requestMethod=GET requestClientApplication=Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0 reason=- cs1Label=Policy cs1=role-8**Default cs2Label=DynCat cs2=0 cs3Label=ContentType cs3=image/jpeg cn1Label=DispositionCode cn1=1048 cn2Label=ScanDuration cn2=3 request=@987654321 @

如果你观察者,数据中有键值对。有什么办法,我可以提取值并存储数据。我不能使用空格作为分隔符,因为密钥对中的某些值包含空格 例如: suser=LDAP://172.17.251.11 OU\=Users,OU\=Migrated,DC\=abc,DC\=com/Sourabh S Jain

“Sourabh S Jain”之间有空格

【问题讨论】:

    标签: interceptor flume syslog


    【解决方案1】:

    能够使用 OR 运算符解决它。

    (suser=-|suser=LDAP://.{1,150}/)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多