Aggregate based on regular expression in service url

Currently API looks like /AddressWEB/address/v5/addresses/some_dynamic_id. Now the way I am able to create the visualization, in that unique row is coming for each some_dynamic_id.

But I want to get a single row like /AddressWEB/address/v5/addresses/some_dynamic_id using regular expression and aggregate the result.

Please let me know if it is possible or not.

@Arnab_Karmakar I'm having trouble understanding what you're trying to accomplish. Are you trying to view all documents with a specific api.keyword field that match a regex?

Sorry for the confusion!
api.keyword represents rest-service URL in my application. In the data table of Kibana visualization, I am trying to capture the service call statistics(e.g response time, http status etc). Now in some of the URLs, I have path variable like /AddressWEB/address/v5/addresses/some_dynamic_id With this when I am splitting table row and aggregating on api.keyword, multiple rows are getting created for the same service call with different path variable. e.g. lets say /AddressWEB/address/v5/addresses service is getting called by dynamic id 5678-uuio and 8907-iiop. So this will create 2 rows in data table like
/AddressWEB/address/v5/addresses/5678-uuio
/AddressWEB/address/v5/addresses/8907-iiop

Instead of that I want a single row for service /AddressWEB/address/v5/addresses and aggregate the result irrespective of dynamic id. e.g
/AddressWEB/address/v5/addresses/{id}

Hope I am able to clear my points here. Else please let me know. Thanks for your quick response!

@Arnab_Karmakar unfortunately, you can't do that type of query in Elasticsearch, and I'd recommend extracting out the base-path when you ingest you data into Elasticsearch via Logstash so you can do a simple terms aggregation.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.