<?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 How to export and import custom rules in Splunk AppDynamics</title>
    <link>https://community.splunk.com/t5/Splunk-AppDynamics/How-to-export-and-import-custom-rules/m-p/732585#M8056</link>
    <description>&lt;P&gt;Hey all,&lt;/P&gt;

&lt;P&gt;Been trying to export and importing custom made rules configuration through the REST API of Appdynamics.&lt;/P&gt;

&lt;P&gt;Right now I can export all servlet custom rules through the REST API. Now I want to import the configuration XML but constantly getting an internal server error. I'm doing something wrong and I don't know what&lt;/P&gt;

&lt;P&gt;With postman I enter the following URL:&lt;/P&gt;
&lt;P&gt;http://controllername:portnumber/controller/transactiondetection/applicationname/tier/custom/servlet?overwrite=true&lt;/P&gt;

&lt;P&gt;I set the action to 'POST'&lt;/P&gt;

&lt;P&gt;Add this in the body&lt;/P&gt;

&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;custom-match-points controller-version="004-002-007-000"&amp;gt;
	&amp;lt;custom-match-point&amp;gt;
		&amp;lt;name&amp;gt; another name &amp;lt;/name&amp;gt;
		&amp;lt;business-transaction-name&amp;gt; The name&amp;lt;/business-transaction-name&amp;gt;
		&amp;lt;entry-point&amp;gt;SERVLET&amp;lt;/entry-point&amp;gt;
		&amp;lt;background&amp;gt;false&amp;lt;/background&amp;gt;
		&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;
		&amp;lt;match-rule&amp;gt;
			&amp;lt;servlet-rule&amp;gt;
				&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;
				&amp;lt;priority&amp;gt;10&amp;lt;/priority&amp;gt;
				&amp;lt;excluded&amp;gt;false&amp;lt;/excluded&amp;gt;
				&amp;lt;uri filter-type="STARTSWITH" filter-value="/pages/wicket"/&amp;gt;
				&amp;lt;parameters&amp;gt;
					&amp;lt;parameter match-type="check-for-existence"&amp;gt;
						&amp;lt;name filter-type="EQUALS" filter-value="the configuration"/&amp;gt;
					&amp;lt;/parameter&amp;gt;
				&amp;lt;/parameters&amp;gt;
				&amp;lt;properties/&amp;gt;
			&amp;lt;/servlet-rule&amp;gt;
		&amp;lt;/match-rule&amp;gt;
	&amp;lt;/custom-match-point&amp;gt;
&amp;lt;/custom-match-points&amp;gt;&lt;/PRE&gt;

&lt;P&gt;As a header I&amp;nbsp;set the Content-Type to application/xml and i set the authorization tab as Basic auth and fill in needed credentials.&lt;/P&gt;

&lt;P&gt;Click on send and boom internal server error. My guess its either the authentication (don't think so) something missing in the header (maybe)&amp;nbsp;or something&amp;nbsp;wrong with the body&amp;nbsp;(likely).&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Mar 2018 16:37:49 GMT</pubDate>
    <dc:creator>CommunityUser</dc:creator>
    <dc:date>2018-03-14T16:37:49Z</dc:date>
    <item>
      <title>How to export and import custom rules</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/How-to-export-and-import-custom-rules/m-p/732585#M8056</link>
      <description>&lt;P&gt;Hey all,&lt;/P&gt;

&lt;P&gt;Been trying to export and importing custom made rules configuration through the REST API of Appdynamics.&lt;/P&gt;

&lt;P&gt;Right now I can export all servlet custom rules through the REST API. Now I want to import the configuration XML but constantly getting an internal server error. I'm doing something wrong and I don't know what&lt;/P&gt;

&lt;P&gt;With postman I enter the following URL:&lt;/P&gt;
&lt;P&gt;http://controllername:portnumber/controller/transactiondetection/applicationname/tier/custom/servlet?overwrite=true&lt;/P&gt;

&lt;P&gt;I set the action to 'POST'&lt;/P&gt;

&lt;P&gt;Add this in the body&lt;/P&gt;

&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;custom-match-points controller-version="004-002-007-000"&amp;gt;
	&amp;lt;custom-match-point&amp;gt;
		&amp;lt;name&amp;gt; another name &amp;lt;/name&amp;gt;
		&amp;lt;business-transaction-name&amp;gt; The name&amp;lt;/business-transaction-name&amp;gt;
		&amp;lt;entry-point&amp;gt;SERVLET&amp;lt;/entry-point&amp;gt;
		&amp;lt;background&amp;gt;false&amp;lt;/background&amp;gt;
		&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;
		&amp;lt;match-rule&amp;gt;
			&amp;lt;servlet-rule&amp;gt;
				&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;
				&amp;lt;priority&amp;gt;10&amp;lt;/priority&amp;gt;
				&amp;lt;excluded&amp;gt;false&amp;lt;/excluded&amp;gt;
				&amp;lt;uri filter-type="STARTSWITH" filter-value="/pages/wicket"/&amp;gt;
				&amp;lt;parameters&amp;gt;
					&amp;lt;parameter match-type="check-for-existence"&amp;gt;
						&amp;lt;name filter-type="EQUALS" filter-value="the configuration"/&amp;gt;
					&amp;lt;/parameter&amp;gt;
				&amp;lt;/parameters&amp;gt;
				&amp;lt;properties/&amp;gt;
			&amp;lt;/servlet-rule&amp;gt;
		&amp;lt;/match-rule&amp;gt;
	&amp;lt;/custom-match-point&amp;gt;
&amp;lt;/custom-match-points&amp;gt;&lt;/PRE&gt;

&lt;P&gt;As a header I&amp;nbsp;set the Content-Type to application/xml and i set the authorization tab as Basic auth and fill in needed credentials.&lt;/P&gt;

&lt;P&gt;Click on send and boom internal server error. My guess its either the authentication (don't think so) something missing in the header (maybe)&amp;nbsp;or something&amp;nbsp;wrong with the body&amp;nbsp;(likely).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 16:37:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/How-to-export-and-import-custom-rules/m-p/732585#M8056</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2018-03-14T16:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting en importing custom rules</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/How-to-export-and-import-custom-rules/m-p/732586#M8057</link>
      <description>&lt;P&gt;Can you confirm that the user you are using has access to create health rules for that application?&lt;/P&gt;
&lt;P&gt;Or better, run it using AppDynamics root credentials.&lt;/P&gt;

&lt;PRE&gt;curl -X POST --user user1@customer1:secret http://demo.appdynamics.com/controller/healthrules/38 -F file=@uploadhealthrule.xml&lt;/PRE&gt;

&lt;P&gt;user1: root&lt;/P&gt;
&lt;P&gt;secret: AppDynamics admin password.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.appdynamics.com/display/PRO44/Configuration+Import+and+Export+API#ConfigurationImportandExportAPI-ImportHealthRulesintoanApplication&amp;nbsp;" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.appdynamics.com/display/PRO44/Configuration+Import+and+Export+API#ConfigurationImportandExportAPI-ImportHealthRulesintoanApplication&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 18:46:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/How-to-export-and-import-custom-rules/m-p/732586#M8057</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2018-03-14T18:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting en importing custom rules</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/How-to-export-and-import-custom-rules/m-p/732587#M8058</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I'm having this same problem, were you able to find resolution?&lt;/P&gt;

&lt;P&gt;I've tried the admin account on a brand new app, on a brand new controller so shouldn't be any permissions oddities.&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;We're working through a migration from on-prem, and I've successfully been able to export/import healthrules and dashboards.&amp;nbsp; Just moved onto detection rules and getting this 500 error.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;To simplify things I tried the most basic export with curl based on the doc, that worked fine.&amp;nbsp; Then tried importing the output of that export again just using curl based on the doc and I consistently get a 500 Internal server error.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 14:03:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/How-to-export-and-import-custom-rules/m-p/732587#M8058</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2018-06-25T14:03:44Z</dc:date>
    </item>
  </channel>
</rss>

