<?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 why is addinfo not working in my search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/why-is-addinfo-not-working-in-my-search/m-p/70533#M17642</link>
    <description>&lt;P&gt;I asked a few weeks ago how to get the total duration of my search timeframe and was told to use addinfo. Got it working out but when I made my search more complex by outer-joining to a subsearch it stopped working. I've tried putting the addinfo|eval total_time=... piece both before and after the subsearch and get no results. Here is the search:&lt;/P&gt;

&lt;P&gt;index=nagios (src_host=blah* OR blech)|dedup src_host|addinfo|eval total_time=info_max_time-info_min_time|join type=outer src_host overwrite=false [search index=nagios (src_host=blah* OR blech)  HOST ALERT HARD NOT SERVICE* host=joe|sort _time, src_host|delta _time AS duration p=1|streamstats current=f last(src_host) AS prevsrc_host|where name="UP" AND src_host=prevsrc_host|stats sum(duration) AS downtime by src_host|table src_host, downtime]|eval downtime=if(isnull(downtime),0,downtime)|eval percentup=(total_time-downtime)/total_time*100|table src_host, downtime, total_time, percentup&lt;/P&gt;

&lt;P&gt;The outer join works, the downtime calc both in and after the subsearch works, but total_time doesn't work and thus percentup also returns nothing.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 12:30:11 GMT</pubDate>
    <dc:creator>auntyem</dc:creator>
    <dc:date>2020-09-28T12:30:11Z</dc:date>
    <item>
      <title>why is addinfo not working in my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/why-is-addinfo-not-working-in-my-search/m-p/70533#M17642</link>
      <description>&lt;P&gt;I asked a few weeks ago how to get the total duration of my search timeframe and was told to use addinfo. Got it working out but when I made my search more complex by outer-joining to a subsearch it stopped working. I've tried putting the addinfo|eval total_time=... piece both before and after the subsearch and get no results. Here is the search:&lt;/P&gt;

&lt;P&gt;index=nagios (src_host=blah* OR blech)|dedup src_host|addinfo|eval total_time=info_max_time-info_min_time|join type=outer src_host overwrite=false [search index=nagios (src_host=blah* OR blech)  HOST ALERT HARD NOT SERVICE* host=joe|sort _time, src_host|delta _time AS duration p=1|streamstats current=f last(src_host) AS prevsrc_host|where name="UP" AND src_host=prevsrc_host|stats sum(duration) AS downtime by src_host|table src_host, downtime]|eval downtime=if(isnull(downtime),0,downtime)|eval percentup=(total_time-downtime)/total_time*100|table src_host, downtime, total_time, percentup&lt;/P&gt;

&lt;P&gt;The outer join works, the downtime calc both in and after the subsearch works, but total_time doesn't work and thus percentup also returns nothing.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:30:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/why-is-addinfo-not-working-in-my-search/m-p/70533#M17642</guid>
      <dc:creator>auntyem</dc:creator>
      <dc:date>2020-09-28T12:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: why is addinfo not working in my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/why-is-addinfo-not-working-in-my-search/m-p/70534#M17643</link>
      <description>&lt;P&gt;In the words of the great Gilda Radner "Never mind..." For testing purposes I had the search executing with a custom time range of a date to 'now', mostly because that's what it defaulted to and I was too lazy to change it.  Apparently addinfo doesn't like 'now'.  Once I changed it to a hard date of today's date at 00:00:00 it worked fine. &lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2012 19:44:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/why-is-addinfo-not-working-in-my-search/m-p/70534#M17643</guid>
      <dc:creator>auntyem</dc:creator>
      <dc:date>2012-09-25T19:44:53Z</dc:date>
    </item>
  </channel>
</rss>

