AppD Archive

Import Health Rules

CommunityUser
Splunk Employee
Splunk Employee

Hi,

following the documentation on https://docs.appdynamics.com/display/PRO40/Import+and+Export+Health+Rule+Configurations I try to export/import health rules.

Export works just fine, but import does not work.

When I import the health rules I get the following exeption on AppDynamics contoller:

[#|2015-04-30T14:28:10.538+0200|WARNING|glassfish3.1.2|com.singularity.ee.controller.servlet.HealthRulesImportExportServlet|_ThreadID=67;_ThreadName=Thread-5;|org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException: the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is application/xml; charset=UTF-8
	at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:947)
	at org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:310)
	at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:334)
	at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:115)
	at com.singularity.ee.controller.servlet.HealthRulesImportExportServlet.doPost(HealthRulesImportExportServlet.java:99)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
	at com.singularity.ee.controller.servlet.CsrfFilter.doFilter(CsrfFilter.java:81)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
	at com.sun.grizzly.ContextTask.run(ContextTask.java:121)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:554)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:533)
	at java.lang.Thread.run(Unknown Source)
|#]

So I cannot import my healthrules.

Regards,

Thomas

0 Karma
1 Solution

Arun_Dasetty
Super Champion

Hi Thomos,

Adding to Ray comments above, We understood that you have tried as per following doc link, if not check one

https://docs.appdynamics.com/display/PRO40/Import+and+Export+Health+Rule+Configurations#ImportandExp... is a google chrome REST client application.

You can find this at following URL: https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo.

Once installed, you can open that by navigating to chrome apps URL: "chrome://apps". Screenshot attached for reference.

 

image.png

 

Hope that additional information helps

Regards,
Arun

View solution in original post

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Are you sure you're doing an HTTP POST operation for this?

0 Karma

Arun_Dasetty
Super Champion

Hi Thomos,

Adding to Ray comments above, We understood that you have tried as per following doc link, if not check one

https://docs.appdynamics.com/display/PRO40/Import+and+Export+Health+Rule+Configurations#ImportandExp... is a google chrome REST client application.

You can find this at following URL: https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo.

Once installed, you can open that by navigating to chrome apps URL: "chrome://apps". Screenshot attached for reference.

 

image.png

 

Hope that additional information helps

Regards,
Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Arun,

Chrome REST client works just fine!

I used Http Requester for Firefox (https://addons.mozilla.org/de/firefox/addon/httprequester/?src=api)

I tested it with the same url and the Http Requester does not work.

So it seems that the problem is related to this tool.

Thx for support.

Regards,

Thomas

0 Karma
Get Updates on the Splunk Community!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Your Voice Matters! Help Us Shape the New Splunk Lantern Experience

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Building Momentum: Splunk Developer Program at .conf25

At Splunk, developers are at the heart of innovation. That’s why this year at .conf25, we officially launched ...