DX Application Performance Management

  • 1.  Script to modify Management Module??

    Posted Nov 24, 2017 04:49 AM

    Hello Community.

    I have to design tens of Management Modules which differ only for the labels and the regular expression matching different agents.

    Do you know if this can be achived by scripting modifing the xml file in ManagementModule.xml?

     

    I am tring to modify it but i get the following error:

     

    com.wily.introscope.spec.server.XMLException: XML problem while parsing {0}
    at com.wily.introscope.server.enterprise.entity.bootstrap.BundleFileHelper.<init>(BundleFileHelper.java:107)
    at com.wily.introscope.server.enterprise.entity.bootstrap.BootstrapBundleLocator.loadFile(BootstrapBundleLocator.java:196)
    at com.wily.introscope.server.enterprise.entity.bootstrap.BootstrapBundleLocator.getBundleFileHelpersList(BootstrapBundleLocator.java:84)
    at com.wily.introscope.server.enterprise.entity.bootstrap.BundleBootstrapper.createBundleFileHelpers(BundleBootstrapper.java:676)
    at com.wily.introscope.server.enterprise.entity.bootstrap.BundleBootstrapper.load(BundleBootstrapper.java:376)
    at com.wily.introscope.server.enterprise.entity.bundle.MMHotDeploy.dynamicallyDeploy(MMHotDeploy.java:170)
    at com.wily.introscope.server.enterprise.entity.bundle.MMHotDeploy.access$1(MMHotDeploy.java:161)
    at com.wily.introscope.server.enterprise.entity.bundle.MMHotDeploy$HotDeployer.run(MMHotDeploy.java:204)
    at com.wily.EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:88)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
    at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1014)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
    at com.wily.util.xml.XMLAssistant.parseDocument(XMLAssistant.java:394)
    at com.wily.introscope.server.enterprise.entity.bootstrap.BundleFileHelper.<init>(BundleFileHelper.java:95)

     

    PLEASE HELP! THANKS GUYS

     

    Luca Razzi

    Italy



  • 2.  Re: Script to modify Management Module??

    Broadcom Employee
    Posted Nov 27, 2017 09:42 AM

    Hi Luca:

    I changed this to a discussion and also included the APM Developer Community. However, everyone is welcome to provide suggestions. Thanks

    Hal German



  • 3.  Re: Script to modify Management Module??

    Broadcom Employee
    Posted Nov 27, 2017 10:05 AM

    Hi Luca,

     

    Out Of The Box we do not have anything that can do this.  However you can write your own.  Not sure if you're using Windows or Linux, actually easier in Linux to do using shell scripting.  For Windows I would recommend using perl over batch as perl is more powerful.

     

    But your error of "com.wily.introscope.spec.server.XMLException: XML problem while parsing {0}" indicates that the modification you made is missing something, i.e. a closing " or a closing '/>'.  

     

    Can you post the changes you made to the Management Module?

     

    I would also like to see the DEBUG log messages above that exception, that could help to narrow down where the problem lies.

     

    Thanks,
    Matt



  • 4.  Re: Script to modify Management Module??
    Best Answer

    Posted Nov 28, 2017 01:47 PM

    OK Community.

    The problem was in the procedure to generate the jar file after changing the ManagementModule.xml.

    Now that I am using the jar.exe command provided with the jdk everything works great.

    So I wrote a java program the uses the Mytemplate.jar file (built with the MM interface as I like it) and than I change the %hostname% e %parameterx% into my desired variables and the mom is loading the jar file silently.

    So now i can launch the program with a list of hosts.txt and I can load lots of MMs accordingly.

     

    Anyway thank you for the suggestions.

     

    Luca