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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...