<?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 How to display SPL to chart events? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-SPL-to-chart-events/m-p/590743#M205671</link>
    <description>&lt;P&gt;I have a search I can compose using multiple appends and sub-searches to accomplish, but I assume there's an easier way I'm just not seeing, and hoping someone can help. (maybe using | chart?)&lt;/P&gt;
&lt;P&gt;Essentially, I have a set of user login data... username and login_event (successful, failed, account locked, etc...).&lt;/P&gt;
&lt;P&gt;I'd like to display a chart showing total events (by login_event) and distinctive count by username, which might look like below:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%" height="25px"&gt;login_event&lt;/TD&gt;
&lt;TD width="50%" height="25px"&gt;count&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="25px"&gt;successful&lt;/TD&gt;
&lt;TD width="50%" height="25px"&gt;1600&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="21px"&gt;failed&lt;/TD&gt;
&lt;TD width="50%" height="21px"&gt;200&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="25px"&gt;account locked&lt;/TD&gt;
&lt;TD width="50%" height="25px"&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="25px"&gt;successful (distinct usernames)&lt;/TD&gt;
&lt;TD width="50%" height="25px"&gt;1200&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="25px"&gt;failed&amp;nbsp;(distinct usernames)&lt;/TD&gt;
&lt;TD width="50%" height="25px"&gt;50&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="25px"&gt;account locked&amp;nbsp;(distinct usernames)&lt;/TD&gt;
&lt;TD width="50%" height="25px"&gt;9&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
    <pubDate>Fri, 25 Mar 2022 20:58:10 GMT</pubDate>
    <dc:creator>adamsmith47</dc:creator>
    <dc:date>2022-03-25T20:58:10Z</dc:date>
    <item>
      <title>How to display SPL to chart events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-SPL-to-chart-events/m-p/590743#M205671</link>
      <description>&lt;P&gt;I have a search I can compose using multiple appends and sub-searches to accomplish, but I assume there's an easier way I'm just not seeing, and hoping someone can help. (maybe using | chart?)&lt;/P&gt;
&lt;P&gt;Essentially, I have a set of user login data... username and login_event (successful, failed, account locked, etc...).&lt;/P&gt;
&lt;P&gt;I'd like to display a chart showing total events (by login_event) and distinctive count by username, which might look like below:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%" height="25px"&gt;login_event&lt;/TD&gt;
&lt;TD width="50%" height="25px"&gt;count&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="25px"&gt;successful&lt;/TD&gt;
&lt;TD width="50%" height="25px"&gt;1600&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="21px"&gt;failed&lt;/TD&gt;
&lt;TD width="50%" height="21px"&gt;200&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="25px"&gt;account locked&lt;/TD&gt;
&lt;TD width="50%" height="25px"&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="25px"&gt;successful (distinct usernames)&lt;/TD&gt;
&lt;TD width="50%" height="25px"&gt;1200&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="25px"&gt;failed&amp;nbsp;(distinct usernames)&lt;/TD&gt;
&lt;TD width="50%" height="25px"&gt;50&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="25px"&gt;account locked&amp;nbsp;(distinct usernames)&lt;/TD&gt;
&lt;TD width="50%" height="25px"&gt;9&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 25 Mar 2022 20:58:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-SPL-to-chart-events/m-p/590743#M205671</guid>
      <dc:creator>adamsmith47</dc:creator>
      <dc:date>2022-03-25T20:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: SPL to chart events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-SPL-to-chart-events/m-p/590754#M205673</link>
      <description>&lt;P&gt;Ok, let's analyze what you want to get from your search.&lt;/P&gt;&lt;P&gt;You have three different types of login_event and you want to count occurrences of each of them as well as distinct values of username field associated with each of those types of events.&lt;/P&gt;&lt;P&gt;So the first part is what kind of summary you want to get&lt;/P&gt;&lt;PRE&gt;&amp;lt;your search&amp;gt; | stats count dc(username)&lt;/PRE&gt;&lt;P&gt;You want count of events as well as count of distinct values of username field.&lt;/P&gt;&lt;P&gt;Now you need to tell splunk how to split the values. You want separate stats for each value of the login_event field. So you add&lt;/P&gt;&lt;PRE&gt;by login_event&lt;/PRE&gt;&lt;P&gt;And you're pretty much home - you should get all the information you need.&lt;/P&gt;&lt;P&gt;If you don't like the layout (you should get 3x2 table) you can try to use untable. But that's another story.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 20:14:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-SPL-to-chart-events/m-p/590754#M205673</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-03-24T20:14:56Z</dc:date>
    </item>
  </channel>
</rss>

