0

I am trying to find x-sw-client-id value i.e. self-service-automation from below log. key is always same but value will be different based on the client. could you suggest me a regex or query to find the number of clients hitting my service?

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
Kiran
  • 839
  • 3
  • 15
  • 45

1 Answers1

0

Try this. Your new field name will be "ClientID"

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

skoelpin
  • 212
  • 1
  • 5
  • Thank you @skoelpin. Even this is worked: ... | rex "x-sw-client-id:\s(?< ClientID>\S*)" – Kiran Dec 11 '17 at 19:11