<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic splunk query to construct the table as needed in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunk-query-to-construct-the-table-as-needed/m-p/694967#M56907</link>
    <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;With the below query&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;my_search_index&amp;gt;
| spath uri | search uri="/vehicle/orders/v1" OR uri="/vehicle/orders/v1*/validate" OR uri="/vehicle/orders/v1*/process" OR  uri="/vehicle/orders/v1*/processInsurance"
| eval Operations=case(
searchmatch("/vehicle/orders/v1*/processInsurance"),"processInsurance",
searchmatch("/vehicle/orders/v1/*/validate"),"validateOrder",
searchmatch("/vehicle/orders/v1/*/process"),"processOrder",
searchmatch("/vehicle/orders/v1"),"createOrder")
| stats count as hits avg(request_time) as average perc90(request_time) as response90 by Operations
| eval average=round(average,2),response90=round(response90,2)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am able to construct the table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="super_edition_0-1722512619912.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32005iCDC9E63D03FBF9DC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="super_edition_0-1722512619912.png" alt="super_edition_0-1722512619912.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Apart from the 4 url patterns mentioned in query I need to include following url pattern for getOrder&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;EM&gt;uri: /vehicle/orders/v1/dbd20er9-g7c3-4e71-z089-gc1ga8272179&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;from the raw splunk log&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"request_timestamp ": "02/Jan/1984:09:05:04",&lt;BR /&gt;"response_timestamp": "01/Jan/1984:09:05:04 +0000",&lt;BR /&gt;"kong_request_id": "my_kong_req_id",&lt;BR /&gt;"ek-correlation-id": "my_corr_id",&lt;BR /&gt;"ek-request-id": "my_req_id",&lt;BR /&gt;"ek-transaction-id": "",&lt;BR /&gt;"req_id": "",&lt;BR /&gt;"channel_name": "",&lt;BR /&gt;"logType": "kong",&lt;BR /&gt;"traceparent": "0traceparent",&lt;BR /&gt;"request_method": "GET",&lt;BR /&gt;"remote_addr": "1.2.3.4",&lt;BR /&gt;"server_addr": "5.5.6.6",&lt;BR /&gt;"scheme": "https",&lt;BR /&gt;"host": "my.host.com",&lt;BR /&gt;"status": 200,&lt;BR /&gt;"request_method": "GET",&lt;BR /&gt;&lt;STRONG&gt;"uri": "/vehicle/orders/v1/dbd20er9-g7c3-4e71-z089-gc1ga8272179",&lt;/STRONG&gt;&lt;BR /&gt;"server_protocol": "HTTP/1.1",&lt;BR /&gt;"bytes_sent": 23663,&lt;BR /&gt;"body_bytes_sent": 23547,&lt;BR /&gt;"request_length": 1367,&lt;BR /&gt;"http_referer": "-",&lt;BR /&gt;"http_user_agent": "-",&lt;BR /&gt;"request_time": "0.010",&lt;BR /&gt;"upstream_response_time": "0.008",&lt;BR /&gt;"upstream_addr": "1.3.5.7",&lt;BR /&gt;"http_content_type": "application/json",&lt;BR /&gt;"upstream_host": "my.host.com"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Not sure how do I change my query to include the required url pattern. If I try this:&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;/vehicle/orders/v1/*&amp;nbsp; &amp;nbsp;or&amp;nbsp;/vehicle/orders/v1/*-*-*-*-*&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;it might include the count of below patterns as well:&lt;/P&gt;&lt;P&gt;/payment/orders/v1*/processInsurance&lt;BR /&gt;/payment/orders/v1/*/validate&lt;BR /&gt;/payment/orders/v1/*/process&lt;/P&gt;&lt;P&gt;/payment/orders/v1&lt;/P&gt;&lt;P&gt;Appreciate your help.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Aug 2024 06:50:58 GMT</pubDate>
    <dc:creator>super_edition</dc:creator>
    <dc:date>2024-08-02T06:50:58Z</dc:date>
    <item>
      <title>splunk query to construct the table as needed</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunk-query-to-construct-the-table-as-needed/m-p/694967#M56907</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;With the below query&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;my_search_index&amp;gt;
| spath uri | search uri="/vehicle/orders/v1" OR uri="/vehicle/orders/v1*/validate" OR uri="/vehicle/orders/v1*/process" OR  uri="/vehicle/orders/v1*/processInsurance"
| eval Operations=case(
searchmatch("/vehicle/orders/v1*/processInsurance"),"processInsurance",
searchmatch("/vehicle/orders/v1/*/validate"),"validateOrder",
searchmatch("/vehicle/orders/v1/*/process"),"processOrder",
searchmatch("/vehicle/orders/v1"),"createOrder")
| stats count as hits avg(request_time) as average perc90(request_time) as response90 by Operations
| eval average=round(average,2),response90=round(response90,2)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am able to construct the table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="super_edition_0-1722512619912.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32005iCDC9E63D03FBF9DC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="super_edition_0-1722512619912.png" alt="super_edition_0-1722512619912.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Apart from the 4 url patterns mentioned in query I need to include following url pattern for getOrder&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;EM&gt;uri: /vehicle/orders/v1/dbd20er9-g7c3-4e71-z089-gc1ga8272179&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;from the raw splunk log&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"request_timestamp ": "02/Jan/1984:09:05:04",&lt;BR /&gt;"response_timestamp": "01/Jan/1984:09:05:04 +0000",&lt;BR /&gt;"kong_request_id": "my_kong_req_id",&lt;BR /&gt;"ek-correlation-id": "my_corr_id",&lt;BR /&gt;"ek-request-id": "my_req_id",&lt;BR /&gt;"ek-transaction-id": "",&lt;BR /&gt;"req_id": "",&lt;BR /&gt;"channel_name": "",&lt;BR /&gt;"logType": "kong",&lt;BR /&gt;"traceparent": "0traceparent",&lt;BR /&gt;"request_method": "GET",&lt;BR /&gt;"remote_addr": "1.2.3.4",&lt;BR /&gt;"server_addr": "5.5.6.6",&lt;BR /&gt;"scheme": "https",&lt;BR /&gt;"host": "my.host.com",&lt;BR /&gt;"status": 200,&lt;BR /&gt;"request_method": "GET",&lt;BR /&gt;&lt;STRONG&gt;"uri": "/vehicle/orders/v1/dbd20er9-g7c3-4e71-z089-gc1ga8272179",&lt;/STRONG&gt;&lt;BR /&gt;"server_protocol": "HTTP/1.1",&lt;BR /&gt;"bytes_sent": 23663,&lt;BR /&gt;"body_bytes_sent": 23547,&lt;BR /&gt;"request_length": 1367,&lt;BR /&gt;"http_referer": "-",&lt;BR /&gt;"http_user_agent": "-",&lt;BR /&gt;"request_time": "0.010",&lt;BR /&gt;"upstream_response_time": "0.008",&lt;BR /&gt;"upstream_addr": "1.3.5.7",&lt;BR /&gt;"http_content_type": "application/json",&lt;BR /&gt;"upstream_host": "my.host.com"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Not sure how do I change my query to include the required url pattern. If I try this:&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;/vehicle/orders/v1/*&amp;nbsp; &amp;nbsp;or&amp;nbsp;/vehicle/orders/v1/*-*-*-*-*&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;it might include the count of below patterns as well:&lt;/P&gt;&lt;P&gt;/payment/orders/v1*/processInsurance&lt;BR /&gt;/payment/orders/v1/*/validate&lt;BR /&gt;/payment/orders/v1/*/process&lt;/P&gt;&lt;P&gt;/payment/orders/v1&lt;/P&gt;&lt;P&gt;Appreciate your help.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 06:50:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splunk-query-to-construct-the-table-as-needed/m-p/694967#M56907</guid>
      <dc:creator>super_edition</dc:creator>
      <dc:date>2024-08-02T06:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: splunk query to construct the table as needed</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunk-query-to-construct-the-table-as-needed/m-p/694970#M56908</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;my_search_index&amp;gt;
| spath uri
| regex uri="\/vehicle\/orders\/v1(.*\/processInsurance|\/.*\/validate|\/.*\/process|\/([^-]+-){4}[^-]+)$"
| eval Operations=case(
searchmatch("/vehicle/orders/v1*/processInsurance"),"processInsurance",
searchmatch("/vehicle/orders/v1/*/validate"),"validateOrder",
searchmatch("/vehicle/orders/v1/*/process"),"processOrder",
searchmatch("/vehicle/orders/v1/*-*-*-*-*"),"getOrder",
searchmatch("/vehicle/orders/v1"),"createOrder")
| stats count as hits avg(request_time) as average perc90(request_time) as response90 by Operations
| eval average=round(average,2),response90=round(response90,2)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 01 Aug 2024 12:27:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splunk-query-to-construct-the-table-as-needed/m-p/694970#M56908</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-08-01T12:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: splunk query to construct the table as needed</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunk-query-to-construct-the-table-as-needed/m-p/695046#M56918</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;with your splunk query currently I am able to list below url pattern only&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/vehicle/orders/v1/dbd20er9-g7c3-4e71-z089-gc1ga8272179&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/vehicle/orders/v1/*/processInsurance&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/vehicle/orders/v1/*/validateInsurance&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/vehicle/orders/v1/*/validate&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/vehicle/orders/v1/*/process&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I missed to include 1 more pattern.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;/&lt;SPAN&gt;vehicle&lt;/SPAN&gt;/orders/v1&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp;(new one)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;Please help. Thanks in advance&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 07:01:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splunk-query-to-construct-the-table-as-needed/m-p/695046#M56918</guid>
      <dc:creator>super_edition</dc:creator>
      <dc:date>2024-08-02T07:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: splunk query to construct the table as needed</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunk-query-to-construct-the-table-as-needed/m-p/695060#M56919</link>
      <description>&lt;P&gt;OK Assuming there are no more typos in your examples, try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;my_search_index&amp;gt;
| spath uri
| regex uri="\/vehicle\/orders\/v1(|.*\/processInsurance|\/.*\/validate|\/.*\/validateInsurance|\/.*\/process|\/([^-]+-){4}[^-]+)$"
| eval Operations=case(
match(uri,"/vehicle/orders/v1/.*/processInsurance"),"processInsurance",
match(uri,"/vehicle/orders/v1/.*/validateInsurance"),"validateInsurance",
match(uri,"/vehicle/orders/v1/.*/validate"),"validateOrder",
match(uri,"/vehicle/orders/v1/.*/process"),"processOrder",
match(uri,"/vehicle/orders/v1/[^-]*-[^-]*-[^-]*-[^-]*-[^-]*"),"getOrder",
match(uri,"/vehicle/orders/v1"),"createOrder")
| stats count as hits avg(request_time) as average perc90(request_time) as response90 by Operations
| eval average=round(average,2),response90=round(response90,2)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 02 Aug 2024 09:45:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splunk-query-to-construct-the-table-as-needed/m-p/695060#M56919</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-08-02T09:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: splunk query to construct the table as needed</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunk-query-to-construct-the-table-as-needed/m-p/695081#M56920</link>
      <description>&lt;P class="lia-align-left"&gt;Thanks once again&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; It works as expected.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 11:36:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splunk-query-to-construct-the-table-as-needed/m-p/695081#M56920</guid>
      <dc:creator>super_edition</dc:creator>
      <dc:date>2024-08-02T11:36:52Z</dc:date>
    </item>
  </channel>
</rss>

