<?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 Re: How to combine three queries and visualize it in timechart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-three-queries-and-visualize-it-in-timechart/m-p/634368#M220375</link>
    <description>&lt;P&gt;OK. Try to describe what you want to achieve (in terms of what events you have and what result you want to get from them), not what you're trying to do.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Mar 2023 08:21:05 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2023-03-14T08:21:05Z</dc:date>
    <item>
      <title>How to combine three queries and visualize it in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-three-queries-and-visualize-it-in-timechart/m-p/634353#M220364</link>
      <description>&lt;P&gt;I have three queries:&lt;/P&gt;&lt;P class=""&gt;Overall Traffic to LogOn page&lt;/P&gt;&lt;P class=""&gt;sourcetype="od" operation=LogOn http_method=GET http_url="*LogOn*" |&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;timechart count span=1m&lt;/P&gt;&lt;P class=""&gt;OAuth1 Traffic to LogOn page&lt;/P&gt;&lt;P class=""&gt;sourcetype="od" operation=LogOn http_method=GET http_url="*LogOn*" http_url!="*authorization.ping*" identity_consumer_key!="" |&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;timechart count span=1m&lt;/P&gt;&lt;P class=""&gt;OAuth2 Traffic to LogOn page&lt;BR /&gt;&lt;BR /&gt;This is what i wrote&lt;BR /&gt;sourcetype="oxygen-standard" identity_operation=LogOn http_method=GET&lt;BR /&gt;| eval url= case(http_url=="*LogOn*","Overall",&lt;BR /&gt;http_url=="*LogOn*" http_url!="*authorization.ping*" identity_consumer_key!="","OAuth1",&lt;BR /&gt;http_url=="*authorization.ping*","OAuth2")&lt;BR /&gt;| stats count by url&lt;BR /&gt;&lt;BR /&gt;It is not allowing multiple checks in one case&lt;/P&gt;&lt;P class=""&gt;sourcetype="od" operation=LogOn http_method=GET http_url="*authorization.ping*"&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;| timechart count span=1m&lt;/P&gt;&lt;P class=""&gt;How can i combine these three to show in one timechart?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 03:42:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-three-queries-and-visualize-it-in-timechart/m-p/634353#M220364</guid>
      <dc:creator>amitrinx</dc:creator>
      <dc:date>2023-03-14T03:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine three queries and visualize it in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-three-queries-and-visualize-it-in-timechart/m-p/634355#M220365</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/252083"&gt;@amitrinx&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried to decipher your 3 queries and make a query to meet what you are looking to achieve.&amp;nbsp; Without seeing any sample event data it's not always that easy so I've made some assumptions about the event data and detecting OAuth 1 or 2, which you may need to tweak.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;sourcetype="oxygen-standard" OR sourcetype=od identity_operation=LogOn http_method=GET http_url=*&lt;BR /&gt;| eval url=if(isnull(identity_consumer_key) AND match(authorization.ping, "OAuth2"), if(isnull(identity_consumer_key) OR identity_consumer_key!="", "OAuth1", "unknown"), "noauthping")&lt;BR /&gt;| timechart span=1m&lt;BR /&gt;    count AS overall&lt;BR /&gt;    count(eval(url=="OAuth1")) AS OAuth1&lt;BR /&gt;    count(eval(url=="OAuth2")) AS OAuth2&lt;BR /&gt;    count(eval(url=="unknown")) AS unknown&lt;BR /&gt;    count(eval(url=="noauthping")) AS noauthping &lt;/PRE&gt;&lt;P&gt;OR, this should provide the same result set&lt;/P&gt;&lt;PRE&gt;sourcetype="oxygen-standard" OR sourcetype=od identity_operation=LogOn http_method=GET http_url=* ]&lt;BR /&gt;| eval url=if(isnull(identity_consumer_key) AND match(authorization.ping, "OAuth2"), if(isnull(identity_consumer_key) OR identity_consumer_key!="", "OAuth1", "unknown"), "noauthping")&lt;BR /&gt;| timechart span=1m&lt;BR /&gt;    count&lt;BR /&gt;  BY url&lt;BR /&gt;| addtotals fieldname="overall"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 04:18:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-three-queries-and-visualize-it-in-timechart/m-p/634355#M220365</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2023-03-14T04:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine three queries and visualize it in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-three-queries-and-visualize-it-in-timechart/m-p/634364#M220373</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/252083"&gt;@amitrinx&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I'm not sure that's possible, aniway,&amp;nbsp;you could try to use append, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype="od" operation=LogOn http_method=GET http_url="*LogOn*" http_url!="*authorization.ping*" identity_consumer_key!="" 
|  timechart count span=1m
| append [ search 
   sourcetype="oxygen-standard" identity_operation=LogOn http_method=GET
   | eval url= case(http_url=="*LogOn*","Overall",
http_url=="*LogOn*" http_url!="*authorization.ping*" identity_consumer_key!="","OAuth1",
http_url=="*authorization.ping*","OAuth2")
   | timechart span=1m count by url
   ]
| append [ search 
   sourcetype="od" operation=LogOn http_method=GET http_url="*authorization.ping*"  
   | timechart count span=1m
   ]&lt;/LI-CODE&gt;&lt;P&gt;remember to setup the same span in all searches.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 07:42:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-three-queries-and-visualize-it-in-timechart/m-p/634364#M220373</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-03-14T07:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine three queries and visualize it in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-three-queries-and-visualize-it-in-timechart/m-p/634368#M220375</link>
      <description>&lt;P&gt;OK. Try to describe what you want to achieve (in terms of what events you have and what result you want to get from them), not what you're trying to do.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 08:21:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-three-queries-and-visualize-it-in-timechart/m-p/634368#M220375</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-03-14T08:21:05Z</dc:date>
    </item>
  </channel>
</rss>

