All Apps and Add-ons

How to search for Request Mapping in the Rest URLs logging in the log file

kodali21055
New Member

Hi,
We have developed rest web services and have lot of clients who consumes these service.
We are logging all the Rest URLs which are calling by different clients in the log file.
Now we are planning to get the count of each web service based on the request mapping in the URL.

for eg: our URL format is
httpUrl=http://hostname:portno/cbs/v2/fis/KI3325/fiCustomer/c0a8f2a000006cbc45146d2816dfgg900/accounts/WYtEB...

I am thinking of getting this web service invocations count using /checkImages.

Can any one post some ideas on how best I can handle this?

Tags (1)
0 Karma

MarioM
Motivator

Assuming you have httpUrl field and that i properly understood your question:

... | rex field=httpUrl ".*/(?<services_invocations>.*)\?.*" | stats count by services_invocations
0 Karma

MarioM
Motivator

this is just simply extracting a new field services_invocations with a regex on the original field httpUrl;then stats count on this new field...
you might need to adjust the regex.
I am not sure what more details you need...

0 Karma

kodali21055
New Member

HI,
Yes, we do have a field name httpUrl in the log file.
But I have tried your syntax, but it is not giving correct result. Can you please elaborate more on your answer by taking the below example URL

httpUrl=http://hostname:portno/cbs/v2/fis/KI3325/fiCustomer/c0a8f2a000006cbc45146d2816dfgg900/accounts/WYtEB...

Please provide more details. Thanks in advance

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...