<?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 am I receiving &amp;quot;error while validating macro... must be an integer greater than or equal to zero&amp;quot; in the dashboard while launching App Exporter? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259268#M29865</link>
    <description>&lt;P&gt;Sounds a lot like a different app has defined a globally shared macro of the same name, with clashing parameter validations.&lt;BR /&gt;
Check your environment for a second &lt;CODE&gt;truncate(2)&lt;/CODE&gt; macro to narrow that down.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Feb 2017 00:16:51 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2017-02-15T00:16:51Z</dc:date>
    <item>
      <title>Why am I receiving "error while validating macro... must be an integer greater than or equal to zero" in the dashboard while launching App Exporter?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259264#M29861</link>
      <description>&lt;P&gt;I installed the App Exporter on Splunk Enterprise 6.5.0. While launching the app, the dashboard shows this message: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Error in 'SearchParser': Encountered the following error while validating macro 'truncate(description, 150)': length (arg2) must be an integer greater than or equal to zero. 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This message shows up with &lt;CODE&gt;admin&lt;/CODE&gt; as well as &lt;CODE&gt;power&lt;/CODE&gt; roles.&lt;/P&gt;

&lt;P&gt;Please suggest if I need to change any settings or provide additional capabilities to the roles/user.&lt;/P&gt;

&lt;P&gt;Thanks, Mitesh.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 04:28:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259264#M29861</guid>
      <dc:creator>miteshp250283</dc:creator>
      <dc:date>2016-12-01T04:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I receiving "error while validating macro... must be an integer greater than or equal to zero" in the dashboard while launching App Exporter?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259265#M29862</link>
      <description>&lt;P&gt;&lt;CODE&gt;length (arg2) must be an integer greater than or equal to zero.&lt;/CODE&gt;  must be coming from the &lt;CODE&gt;Validation Error Message&lt;/CODE&gt; you have put for the &lt;CODE&gt;Validation Expression&lt;/CODE&gt; of macro definition.&lt;/P&gt;

&lt;P&gt;Can you check what are &lt;CODE&gt;Validation Expression&lt;/CODE&gt; and &lt;CODE&gt;Validation Error Message&lt;/CODE&gt;  and if they are as per your requirement. You can check them by going to &lt;CODE&gt;Settings » Advanced search » Search macros » yourMacro&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;Also since calculating the length is for strings (generally) and in your case you are passing integer &lt;CODE&gt;150&lt;/CODE&gt; as &lt;CODE&gt;arg2&lt;/CODE&gt; , so as a calculated guess, if everything else seems to be the way it should be, can you check if you have put in the &lt;CODE&gt;len($arg2$) &amp;gt;= 0&lt;/CODE&gt; as &lt;CODE&gt;Validation Expression&lt;/CODE&gt; and try to tweak it to &lt;CODE&gt;len(tostring($arg2$)) &amp;gt;=0&lt;/CODE&gt; to see if it resolves it. &lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 20:07:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259265#M29862</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2016-12-01T20:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I receiving "error while validating macro... must be an integer greater than or equal to zero" in the dashboard while launching App Exporter?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259266#M29863</link>
      <description>&lt;P&gt;The macro came with the app itself. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
I will try to tweak the macro to see if it works.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 04:21:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259266#M29863</guid>
      <dc:creator>miteshp250283</dc:creator>
      <dc:date>2016-12-02T04:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I receiving "error while validating macro... must be an integer greater than or equal to zero" in the dashboard while launching App Exporter?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259267#M29864</link>
      <description>&lt;P&gt;I took off the macro from the search that was powering the panel. Unsure why it was in place.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 04:41:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259267#M29864</guid>
      <dc:creator>miteshp250283</dc:creator>
      <dc:date>2016-12-02T04:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I receiving "error while validating macro... must be an integer greater than or equal to zero" in the dashboard while launching App Exporter?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259268#M29865</link>
      <description>&lt;P&gt;Sounds a lot like a different app has defined a globally shared macro of the same name, with clashing parameter validations.&lt;BR /&gt;
Check your environment for a second &lt;CODE&gt;truncate(2)&lt;/CODE&gt; macro to narrow that down.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 00:16:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259268#M29865</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2017-02-15T00:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I receiving "error while validating macro... must be an integer greater than or equal to zero" in the dashboard while launching App Exporter?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259269#M29866</link>
      <description>&lt;P&gt;I just ran into this same problem with app exporter version 1.1. The truncate(2) macro that comes with the app exporter references the length variable as $n$, but uses the term length in the validation expression. Update the validation expression to read "isint(n) AND n&amp;gt;=0" and it should work.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 20:09:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259269#M29866</guid>
      <dc:creator>cyrix</dc:creator>
      <dc:date>2017-08-18T20:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I receiving "error while validating macro... must be an integer greater than or equal to zero" in the dashboard while launching App Exporter?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259270#M29867</link>
      <description>&lt;P&gt;Again, you likely have a different app installed that shares a macro of the same name globally, resulting in their validation expression being used with the App Exporter macro - and if they use different variables then errors will happen. &lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 20:28:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259270#M29867</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2017-08-18T20:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I receiving "error while validating macro... must be an integer greater than or equal to zero" in the dashboard while launching App Exporter?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259271#M29868</link>
      <description>&lt;P&gt;Hi Martin, thanks for your response. I did verify this. SA-utils has a global truncate(2) macro. However, I disabled this macro for testing without success. Updating the validation expression for the truncate(2) macro in the app_exporter context is what fixed this error for me.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 20:32:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259271#M29868</guid>
      <dc:creator>cyrix</dc:creator>
      <dc:date>2017-08-18T20:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I receiving "error while validating macro... must be an integer greater than or equal to zero" in the dashboard while launching App Exporter?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259272#M29869</link>
      <description>&lt;P&gt;That's highly unlikely, considering the App Exporter doesn't ship any validation expression.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 21:26:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259272#M29869</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2017-08-18T21:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I receiving "error while validating macro... must be an integer greater than or equal to zero" in the dashboard while launching App Exporter?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259273#M29870</link>
      <description>&lt;P&gt;It must be a bug in Splunk. This particular search head is running 6.5.0. I confirmed there is no validation expression shipped with App Exporter in my personal dev environment. The validation expression I found in the truncate(2) macro under the App Exporter context was identical to the validation expression used by SA-utils, although the eval was different.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 21:51:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259273#M29870</guid>
      <dc:creator>cyrix</dc:creator>
      <dc:date>2017-08-18T21:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I receiving "error while validating macro... must be an integer greater than or equal to zero" in the dashboard while launching App Exporter?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259274#M29871</link>
      <description>&lt;P&gt;Also unlikely - you mentioned you modified the expression, that creates a copy in local. &lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 22:27:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/259274#M29871</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2017-08-18T22:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I receiving "error while validating macro... must be an integer greater than or equal to zero" in t</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/505640#M62202</link>
      <description>&lt;P&gt;I came across this today&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems to be a problem with having Enterprise Security installed with a truncate macro defined with&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;validation = isint(length) AND length&amp;gt;=0&lt;/LI-CODE&gt;&lt;P&gt;but it's mixing the args defined in the app exporter of the same name&amp;nbsp; with the validation expression from SA-Utils, but of course the args are different - App exporter uses n for length, so if you change the macro, which shows in the GUI to be the app exporter one, and replace length with field, the macro of course works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 03:37:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/505640#M62202</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-06-23T03:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I receiving "error while validating macro... must be an integer greater than or equal to zero" in t</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/520535#M63518</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/61898"&gt;@cyrix&lt;/a&gt;&amp;nbsp;. This worked for me.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2020 02:46:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-am-I-receiving-quot-error-while-validating-macro-must-be-an/m-p/520535#M63518</guid>
      <dc:creator>smitra_splunk</dc:creator>
      <dc:date>2020-09-21T02:46:06Z</dc:date>
    </item>
  </channel>
</rss>

