<?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 do I count certain field values by row and covert the total found into two other tables to be used in time charts? =0( in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-certain-field-values-by-row-and-covert-the-total/m-p/465276#M131081</link>
    <description>&lt;P&gt;Your Answer works! Thank you! =0)&lt;/P&gt;

&lt;P&gt;A programmer at work said an easier way might be this ( I will mark your answer correct):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup Nessus.csv 
|eval Date = strptime(Date, "%m/%d/%Y") 
| search Status="Ongoing"
| chart count by Date System
| eval Date = strftime(Date, "%m/%d/%Y")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 12 Feb 2020 14:06:57 GMT</pubDate>
    <dc:creator>UMDTERPS</dc:creator>
    <dc:date>2020-02-12T14:06:57Z</dc:date>
    <item>
      <title>How do I count certain field values by row and covert the total found into two other tables to be used in time charts? =0(</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-certain-field-values-by-row-and-covert-the-total/m-p/465273#M131078</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8355iA83E94AEEA1ACB5D/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I've been plugging away at this for a few days and I'm stuck =0( &lt;/P&gt;

&lt;P&gt;Above is a lookup csv (insert dummy data)  I have from Nessus.  I am trying to use Splunk to create totals of vulnerability severity levels in two separate tables, one by organization and another by system.  &lt;/P&gt;

&lt;P&gt;Below is what I want to do, any ideas how to do this? &lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8356iACEECD45DAA7DBB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Lastly, I’m trying to use the newly created tables and make two time graphs on vulnerability severity level totals by organization/date and another graph by system/date. Scans are run everyday, so inevitability the totals will change over time, which is what I'm trying to capture with the time-charts.  &lt;/P&gt;

&lt;P&gt;Any ideas?  Thanks! &lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 17:20:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-certain-field-values-by-row-and-covert-the-total/m-p/465273#M131078</guid>
      <dc:creator>UMDTERPS</dc:creator>
      <dc:date>2020-02-11T17:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count certain field values by row and covert the total found into two other tables to be used in time charts? =0(</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-certain-field-values-by-row-and-covert-the-total/m-p/465274#M131079</link>
      <description>&lt;P&gt;You can convert data which is like table 1 to table 2 and table 3 like this&lt;/P&gt;

&lt;P&gt;Table 2&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your current search with field DeviceName Organization System Severity_Level Date
| eval temp=Organization."###".System."###".Date
| chart count over temp by Severity_Level | addtotals
| rex field=temp "(?&amp;lt;Organization&amp;gt;.+)###(?&amp;lt;System&amp;gt;.+)###(?&amp;lt;Date&amp;gt;.+)" | fields - temp
| table System Organization Date *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For timechart, add this to above search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval _time=strptime(Date,"%m/%d/%Y")
| timechart sum(Total) by System
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Table 3&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your current search with field DeviceName Organization System Severity_Level Date
| eval temp=Organization."###".Date
| chart count over temp by Severity_Level | addtotals
| rex field=temp "(?&amp;lt;Organization&amp;gt;.+)###(?&amp;lt;Date&amp;gt;.+)" | fields - temp
| table Organization Date *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For timechart, add this to above search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval _time=strptime(Date,"%m/%d/%Y")
| timechart sum(Total) by Organization
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Feb 2020 19:12:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-certain-field-values-by-row-and-covert-the-total/m-p/465274#M131079</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-02-11T19:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count certain field values by row and covert the total found into two other tables to be used in time charts? =0(</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-certain-field-values-by-row-and-covert-the-total/m-p/465275#M131080</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="Device_Name,Organization,System,Severity_Level,Date
firewall01,net,internal,high,2/11/2019
firewall01,net,internal,high,2/11/2019
firewall01,net,external,low,2/11/2019
switch03,net,internal,medium,2/11/2019
switch03,net,internal,high,2/11/2019
switch03,net,external,high,2/11/2019
server01,app,frontend,very low,2/11/2019
server02,dev,backend,very low,2/11/2019
mail04,mail,exchange,very high,2/11/2019
mail05,mail,exchange,very high,2/11/2019"
| multikv forceheader=1
| table Device_Name,Organization,System,Severity_Level,Date
| stats count(eval(Severity_Level="very low")) as "Very Low"
,count(eval(Severity_Level="low")) as "Low"
,count(eval(Severity_Level="medium")) as "Mediun"
,count(eval(Severity_Level="high")) as "High"
,count(eval(Severity_Level="very high")) as "Very High"
,count as "Total" by System Organization Date
| appendpipe [ | rename System as _System
| stats sum(*) as * by Organization Date]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi, @UMDTERPS&lt;BR /&gt;
Why log with images? This is quite hindering the answer.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 11:56:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-certain-field-values-by-row-and-covert-the-total/m-p/465275#M131080</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-12T11:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count certain field values by row and covert the total found into two other tables to be used in time charts? =0(</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-certain-field-values-by-row-and-covert-the-total/m-p/465276#M131081</link>
      <description>&lt;P&gt;Your Answer works! Thank you! =0)&lt;/P&gt;

&lt;P&gt;A programmer at work said an easier way might be this ( I will mark your answer correct):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup Nessus.csv 
|eval Date = strptime(Date, "%m/%d/%Y") 
| search Status="Ongoing"
| chart count by Date System
| eval Date = strftime(Date, "%m/%d/%Y")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Feb 2020 14:06:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-certain-field-values-by-row-and-covert-the-total/m-p/465276#M131081</guid>
      <dc:creator>UMDTERPS</dc:creator>
      <dc:date>2020-02-12T14:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count certain field values by row and covert the total found into two other tables to be used in time charts? =0(</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-certain-field-values-by-row-and-covert-the-total/m-p/465277#M131082</link>
      <description>&lt;P&gt;Hey @to4kawa&lt;/P&gt;

&lt;P&gt;When I copy paste into Splunk answers, it does not keep the formatting (if I try changing it, and hit submit -it changes again).  I thought it would b easier to understand that way.&lt;/P&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 14:08:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-certain-field-values-by-row-and-covert-the-total/m-p/465277#M131082</guid>
      <dc:creator>UMDTERPS</dc:creator>
      <dc:date>2020-02-12T14:08:55Z</dc:date>
    </item>
  </channel>
</rss>

