<?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 Can a macro be created for an application based on the application setup.xml? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-a-macro-be-created-for-an-application-based-on-the/m-p/205586#M40587</link>
    <description>&lt;P&gt;Our server can input data into Splunk either via Syslog or Http Event Collector. In our Splunk application, we want the user to be able to specify which method they are using and then create a macro based on that information. This is to handle our legacy Splunk application that currently only uses syslog. With our next release we are adding Http Event Collector too.&lt;/P&gt;

&lt;P&gt;We want to configure setup.xml for our application to define a macro based on user input. &lt;/P&gt;

&lt;P&gt;A boolean input for "Use Syslog Data" &lt;/P&gt;

&lt;P&gt;In macros.conf file:&lt;/P&gt;

&lt;P&gt;[DiagnosticsDataSource(1)]&lt;BR /&gt;
args = diagnosticsType&lt;/P&gt;

&lt;P&gt;if "Use Syslog Data" = true&lt;/P&gt;

&lt;P&gt;definition = sourcetype=syslog LocalityServer "$diagnosticsType$"&lt;/P&gt;

&lt;P&gt;else&lt;/P&gt;

&lt;P&gt;definition = sourcetype= "$diagnosticsType$"&lt;/P&gt;</description>
    <pubDate>Thu, 14 Apr 2016 18:32:42 GMT</pubDate>
    <dc:creator>simpkins1958</dc:creator>
    <dc:date>2016-04-14T18:32:42Z</dc:date>
    <item>
      <title>Can a macro be created for an application based on the application setup.xml?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-a-macro-be-created-for-an-application-based-on-the/m-p/205586#M40587</link>
      <description>&lt;P&gt;Our server can input data into Splunk either via Syslog or Http Event Collector. In our Splunk application, we want the user to be able to specify which method they are using and then create a macro based on that information. This is to handle our legacy Splunk application that currently only uses syslog. With our next release we are adding Http Event Collector too.&lt;/P&gt;

&lt;P&gt;We want to configure setup.xml for our application to define a macro based on user input. &lt;/P&gt;

&lt;P&gt;A boolean input for "Use Syslog Data" &lt;/P&gt;

&lt;P&gt;In macros.conf file:&lt;/P&gt;

&lt;P&gt;[DiagnosticsDataSource(1)]&lt;BR /&gt;
args = diagnosticsType&lt;/P&gt;

&lt;P&gt;if "Use Syslog Data" = true&lt;/P&gt;

&lt;P&gt;definition = sourcetype=syslog LocalityServer "$diagnosticsType$"&lt;/P&gt;

&lt;P&gt;else&lt;/P&gt;

&lt;P&gt;definition = sourcetype= "$diagnosticsType$"&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 18:32:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-a-macro-be-created-for-an-application-based-on-the/m-p/205586#M40587</guid>
      <dc:creator>simpkins1958</dc:creator>
      <dc:date>2016-04-14T18:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can a macro be created for an application based on the application setup.xml?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-a-macro-be-created-for-an-application-based-on-the/m-p/205587#M40588</link>
      <description>&lt;P&gt;Have you considered just OR'ing both options statically?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 22:09:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-a-macro-be-created-for-an-application-based-on-the/m-p/205587#M40588</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-04-14T22:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can a macro be created for an application based on the application setup.xml?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-a-macro-be-created-for-an-application-based-on-the/m-p/205588#M40589</link>
      <description>&lt;P&gt;Thanks. This works.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 22:45:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-a-macro-be-created-for-an-application-based-on-the/m-p/205588#M40589</guid>
      <dc:creator>simpkins1958</dc:creator>
      <dc:date>2016-04-14T22:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can a macro be created for an application based on the application setup.xml?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-a-macro-be-created-for-an-application-based-on-the/m-p/205589#M40590</link>
      <description>&lt;P&gt;Great. I've converted the comment to an answer, feel free to mark this as accepted if you're happy.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 23:28:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-a-macro-be-created-for-an-application-based-on-the/m-p/205589#M40590</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-04-14T23:28:58Z</dc:date>
    </item>
  </channel>
</rss>

