<?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: Why does the Timechart command with eval result returns empty visualization? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328101#M97657</link>
    <description>&lt;P&gt;Thanks for the answer, its missing an &lt;CODE&gt;)&lt;/CODE&gt; to close the &lt;CODE&gt;stats count (eval&lt;/CODE&gt;, at least now it presents the statistics tab, but the risk value is null, checking the values in every field I noticed that the VH (vulnerable hosts) field is 0 in every instance&lt;/P&gt;

&lt;P&gt;Edit: unless I'm missing something, the only condition to identify if a host is vulnerable it's if the severity is different from informational correct?&lt;/P&gt;</description>
    <pubDate>Fri, 02 Mar 2018 20:14:39 GMT</pubDate>
    <dc:creator>ivan128</dc:creator>
    <dc:date>2018-03-02T20:14:39Z</dc:date>
    <item>
      <title>Why does the Timechart command with eval result returns empty visualization?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328093#M97649</link>
      <description>&lt;P&gt;Hello, I have the following search that calculates a risk value with eval&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=thing sourcetype=thing name=thing earliest=-60d latest=-7d|bucket _time span=1mon | dedup plugin_family plugin_name host-ip ports{}.port ports{}.protocol ports{}.transport | chart count by plugin_family,severity | stats sum(*) as *| join [search index=thing sourcetype=thing name=thing NOT severity=informational | dedup host-ip | chart count as "TOTAL VULNERABLES HOSTS"| stats values(TOTAL VULNERABLES HOSTS) as VH] | join [search  index=thing sourcetype=thing name=thing | dedup host-ip | chart count as "TOTAL HOSTS" | stats values(TOTAL HOSTS) as TH]| fillnull critical, high,medium,low |eval RiskValue=/Formula/| timechart span=1mon max(RiskValue)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;VH,TH and RiskValue show the correct values when I checked them with &lt;CODE&gt;|fields TH,VH,RiskValue&lt;/CODE&gt; but when I try to timechart the RiskValue it shows 0 results, I suspect its because timechart lacks timestamps to chart the risk values. I tried to use a bucket of 1 month and using span 1 mon in timechart but still there is no visualization. I searched through the forums but it seems every solution to charting an eval is specific to the search and I couldn't find any general rules or solutions that I could work from. Any help is appreciated, thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 17:21:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328093#M97649</guid>
      <dc:creator>ivan128</dc:creator>
      <dc:date>2018-03-02T17:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the Timechart command with eval result returns empty visualization?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328094#M97650</link>
      <description>&lt;P&gt;you need _time in order to do a timechart so I suspect you're losing your timestamp somewhere.  If you add _time to your fields command are there values listed?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 17:44:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328094#M97650</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-03-02T17:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the Timechart command with eval result returns empty visualization?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328095#M97651</link>
      <description>&lt;P&gt;yup, like @kmaron mentioned, you also lose the _time field whet using stats command&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 17:49:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328095#M97651</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-03-02T17:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the Timechart command with eval result returns empty visualization?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328096#M97652</link>
      <description>&lt;P&gt;the _time field returns a null value, what @adonio mentioned seems to be the cause, is there a way to keep the _time when using stats?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 18:16:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328096#M97652</guid>
      <dc:creator>ivan128</dc:creator>
      <dc:date>2018-03-02T18:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the Timechart command with eval result returns empty visualization?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328097#M97653</link>
      <description>&lt;P&gt;add by _time to the end of your stats&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats sum(*) as * by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Mar 2018 18:18:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328097#M97653</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-03-02T18:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the Timechart command with eval result returns empty visualization?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328098#M97654</link>
      <description>&lt;P&gt;Tried it and didn't work, I also tried using evalstats insted of stats but to no avail.&lt;/P&gt;

&lt;P&gt;Edit: seems like I posted as answer instead of comment, apologies.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 18:39:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328098#M97654</guid>
      <dc:creator>ivan128</dc:creator>
      <dc:date>2018-03-02T18:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the Timechart command with eval result returns empty visualization?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328099#M97655</link>
      <description>&lt;P&gt;I just noticed you have a chart AND a stats. the chart would be dropping the _time field as well. &lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 18:42:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328099#M97655</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-03-02T18:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the Timechart command with eval result returns empty visualization?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328100#M97656</link>
      <description>&lt;P&gt;I think you have a lot more going on than is necessary, especially the joins and subsearches and chart/stats.  I don't have a way to test this so I don't know if it's quite correct but I thin its close?  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=thing sourcetype=thing name=thing earliest=-60d latest=-7d
| bucket _time span=1mon 
| dedup host-ip plugin_family plugin_name host-ip ports{}.port ports{}.protocol ports{}.transport 
| stats count(eval(severity!=informational) as VH, dc(host-ip) as TH, count by plugin_family, severity, _time
| fillnull critical, high,medium,low 
| eval RiskValue=/Formula/
| timechart span=1mon max(RiskValue)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Mar 2018 19:01:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328100#M97656</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-03-02T19:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the Timechart command with eval result returns empty visualization?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328101#M97657</link>
      <description>&lt;P&gt;Thanks for the answer, its missing an &lt;CODE&gt;)&lt;/CODE&gt; to close the &lt;CODE&gt;stats count (eval&lt;/CODE&gt;, at least now it presents the statistics tab, but the risk value is null, checking the values in every field I noticed that the VH (vulnerable hosts) field is 0 in every instance&lt;/P&gt;

&lt;P&gt;Edit: unless I'm missing something, the only condition to identify if a host is vulnerable it's if the severity is different from informational correct?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 20:14:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-Timechart-command-with-eval-result-returns-empty/m-p/328101#M97657</guid>
      <dc:creator>ivan128</dc:creator>
      <dc:date>2018-03-02T20:14:39Z</dc:date>
    </item>
  </channel>
</rss>

