0

我试图从下面的日志中找到 x-sw-client-id 值,即自助服务自动化。键始终相同,但值会因客户端而异。您能否建议我使用正则表达式或查询来查找使用我的服务的客户数量?

POST : http://selfservice.host.io/service
36677 > host: billing-host.io
36677 > user-agent: unirest-java/1.2.11 32322 > x-key: self-service 
36677 > x-app-name: Self_Service_Consumer
36677 > x-sw-client-id: self-service-automation
36677 > x-forwarded-for: 111.111.110.134, 120.24.519.232, 110.423.232.432 
36677 > x-forwarded-host: api-qa-self-service.host.io 
36677 > x-forwarded-port: 443
4

1 回答 1

0

尝试这个。您的新字段名称将是“ClientID”

... | rex x\-sw\-client\-id\:\s(?<ClientID>\S+)

于 2017-12-09T16:26:18.187 回答