<?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: Error in my search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598906#M208517</link>
    <description>&lt;P&gt;It is for a dashboard, when a user is entered, the month to revisit is selected so I need a way to check when the user is entered against the month selected to say whether the user is active or expired. That is what I am trying to do here. It is for an allow list that I am making using a dashboard.&lt;BR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 May 2022 13:18:53 GMT</pubDate>
    <dc:creator>Italy1358</dc:creator>
    <dc:date>2022-05-23T13:18:53Z</dc:date>
    <item>
      <title>Why do I have an error in my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598899#M208515</link>
      <description>&lt;P&gt;It says that my eval is malformed, any suggestions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| inputlookup US.csv
| eval current_date=strftime(time(),"%Y-%m-%dt%H:%M:%S")
| append [ | makeresults
| eval 3month="$3month$"]
| eval 3month=30*24*60*60
| eval relative_time = current_date "+3month"
| eval duration = if(current_date &amp;amp;gt;= date, "Expired", "Valid")
| table current_date, user, category, department, description, revisit, duration&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 16:10:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598899#M208515</guid>
      <dc:creator>Italy1358</dc:creator>
      <dc:date>2022-05-23T16:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error in my search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598905#M208516</link>
      <description>&lt;P&gt;Is this query run on a dashboard? What's your objective for the search?&lt;/P&gt;&lt;P&gt;I believe this line is the culprit&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval relative_time = current_date "+3month"&lt;/LI-CODE&gt;&lt;P&gt;What are you trying to do with this line? If you want to concatenate strings, use like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval relative_time = tostring(current_date)."+3month"&lt;/LI-CODE&gt;&lt;P&gt;If you want to add 3 months to current_date, try like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval relative_time=relative_time(strptime(current_date,"%Y-%m-%dt%H:%M:%S"),"+3mon")&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 23 May 2022 13:15:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598905#M208516</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2022-05-23T13:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error in my search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598906#M208517</link>
      <description>&lt;P&gt;It is for a dashboard, when a user is entered, the month to revisit is selected so I need a way to check when the user is entered against the month selected to say whether the user is active or expired. That is what I am trying to do here. It is for an allow list that I am making using a dashboard.&lt;BR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 13:18:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598906#M208517</guid>
      <dc:creator>Italy1358</dc:creator>
      <dc:date>2022-05-23T13:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error in my search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598907#M208518</link>
      <description>&lt;P&gt;Like this?&lt;BR /&gt;| eval current_date=strftime(time(),"%Y-%m-%dt%H:%M:%S")&lt;BR /&gt;| append [ | makeresults&lt;BR /&gt;| eval 3mon="$3month$"]&lt;BR /&gt;| eval 3mon=30*24*60*60&lt;BR /&gt;| eval relative_time=relative_time(strptime(current_date,"%Y-%m-%dt%H:%M:%S"),"+3mon")&lt;BR /&gt;| eval duration = if(current_date &amp;amp;gt;= date, "Expired", "Valid")&lt;BR /&gt;| table current_date, user, category, department, description, revisit, duration&lt;BR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 13:28:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598907#M208518</guid>
      <dc:creator>Italy1358</dc:creator>
      <dc:date>2022-05-23T13:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error in my search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598913#M208519</link>
      <description>&lt;P&gt;What all columns are there in the lookup US.csv?&amp;nbsp; When user selects $3month$ values, what values it holds (a date or month)?&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 13:56:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598913#M208519</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2022-05-23T13:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error in my search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598914#M208520</link>
      <description>&lt;P&gt;User, description, revisit, action&lt;/P&gt;&lt;P&gt;The revisit is a dropdown with choices of 1 month, 2 month, 3 month, 4 month, 5 month, and 6 month.&lt;BR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 13:57:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598914#M208520</guid>
      <dc:creator>Italy1358</dc:creator>
      <dc:date>2022-05-23T13:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error in my search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598915#M208521</link>
      <description>&lt;P&gt;These are the columns in the cvs:&lt;BR /&gt;current_date, user, category, department, description, revisit, duration&lt;BR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 13:58:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598915#M208521</guid>
      <dc:creator>Italy1358</dc:creator>
      <dc:date>2022-05-23T13:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error in my search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598922#M208522</link>
      <description>&lt;P&gt;So do you want to check if US.csv-&amp;gt;revisit (assuming that column has date value) is within 3months of current_date?&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 15:27:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598922#M208522</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2022-05-23T15:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error in my search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598931#M208524</link>
      <description>&lt;P&gt;Yeah&lt;BR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 15:59:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598931#M208524</guid>
      <dc:creator>Italy1358</dc:creator>
      <dc:date>2022-05-23T15:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Error in my search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598951#M208532</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;&lt;P&gt;If looking for revisit to be within past 3 months&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup US.csv
| rename COMMENT as "Below converts revisit column to epoch"
| eval current_date=strptime(revisit,"%Y-%m-%dt%H:%M:%S")
| eval 3month=30*24*60*60
| rename COMMENT as "Below finds 3 months from today (past date)"
| eval revisit_date=relative_time(now(),"-3mon")
| rename COMMENT as "Below checks if current date(revisit) is within 3 months from today, set to expire"
| eval duration = if(current_date &amp;amp;lt;= revisit_date, "Expired", "Valid")
| table current_date, user, category, department, description, revisit, duration&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;If looking for revisit to be within&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup US.csv
| rename COMMENT as "Below converts revisit column to epoch"
| eval current_date=strptime(revisit,"%Y-%m-%dt%H:%M:%S")
| eval 3month=30*24*60*60
| rename COMMENT as "Below finds 3 months from today (past date)"
| eval revisit_date=relative_time(now(),"+3mon")
| rename COMMENT as "Below checks if current date(revisit) is within 3 months from today, set to expire"
| eval duration = if(current_date &amp;amp;gt;= revisit_date, "Expired", "Valid")
| table current_date, user, category, department, description, revisit, duration&lt;/LI-CODE&gt;&lt;P&gt;3 months in future&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 17:44:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598951#M208532</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2022-05-23T17:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error in my search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598973#M208540</link>
      <description>&lt;P&gt;Here is a sample of my dashboard:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Italy1358_0-1653333210447.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/19785i3C78B796F0F3542D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Italy1358_0-1653333210447.png" alt="Italy1358_0-1653333210447.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So the user chooses the month for revisit then from todays entry date to the next 3 months or so I want to see if there valid still or not.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 19:14:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-I-have-an-error-in-my-search/m-p/598973#M208540</guid>
      <dc:creator>Italy1358</dc:creator>
      <dc:date>2022-05-23T19:14:19Z</dc:date>
    </item>
  </channel>
</rss>

