Insight pack needs to be installed on the Log Analysis server in order to test the same.

Pre-requisites

Transfer the Insight Pack

Transfer the Insight Pack (MyAppLogInsightPack_v1.0.0.0.zip) to Log Analysis server. It is present under the dist folder of the insight pack project as shown below.

Test Insight Pack Figure 1

Install the Insight Pack

Log into the Log Analysis server terminal as the user who installed the Log Analysis server.  Install the Insight Pack using pkg_mgmt.sh as follows.

Pkg_mgmt.sh is present under <HOME>/utilities where <HOME> is the directory under which Log Analysis product is installed.

Provide execute permission to the MyAppLogInsightPack_v1.0.0.0.zip.



[unity@cldegd60 geetha]$ /home/unity/IBM/LogAnalysis/utilities/pkg_mgmt.sh -install ./MyAppLogInsightPack_v1.0.0.0.zip Buildfile: /home/unity/IBM/LogAnalysis/utilities/pkg_mgmt.xml

initializeCustomTasks:

main:
[packagemanager] 07/01/15 00:14:38:489 IST [main] INFO  - PrerequisitesManager : CTGLC0044I : Running prerequisite checks...
[packagemanager] 07/01/15 00:14:39:131 IST [main] INFO  - PrerequisitesManager : CTGLC0045I : Prerequisite checks passed
[packagemanager] 07/01/15 00:14:39:132 IST [main] INFO  - ContentPackManager : CTGLC0022I : Install of MyAppLogInsightPack_v1.0.0.0 started...
[packagemanager] 07/01/15 00:14:39:140 IST [main] INFO  - ContentPack : CTGLC0002I : Installing RuleSets ...
[packagemanager] 07/01/15 00:14:39:140 IST [main] INFO  - ContentPack : CTGLC0003I : Successfully installed RuleSets
[packagemanager] 07/01/15 00:14:39:141 IST [main] INFO  - ContentPack : CTGLC0002I : Installing FileSets ...
[packagemanager] 07/01/15 00:14:39:146 IST [main] INFO  - FileSetArtifact : CTGLC0008I : Deploying MyAppLogInsightPack_v1.0.0.0-MyAppExtractor.jar to /home/unity/IBM/LogAnalysis/DataCollector/annotators/jars
[packagemanager] 07/01/15 00:14:39:148 IST [main] INFO  - FileSetArtifact : CTGLC0008I : Deploying MyAppLogInsightPack_v1.0.0.0-MyAppExtractor.jar to /home/unity/IBM/LogAnalysis/DataCollector/annotators/jars
[packagemanager] 07/01/15 00:14:39:149 IST [main] INFO  - FileSetArtifact : CTGLC0002I : Installing MyAppLogSplitter ...
[packagemanager] 07/01/15 00:14:39:164 IST [main] INFO  - FileSetArtifact : CTGLC0002I : Installing MyAppLogAnnotator ...
[packagemanager] 07/01/15 00:14:39:172 IST [main] INFO  - ContentPack : CTGLC0003I : Successfully installed FileSets
[packagemanager] 07/01/15 00:14:39:173 IST [main] INFO  - ContentPack : CTGLC0002I : Installing SourceTypes ...
[packagemanager] 07/01/15 00:14:39:174 IST [main] INFO  - SourceTypeArtifact : CTGLC0002I : Installing MyAppLog_ST ...
[packagemanager] 07/01/15 00:14:39:242 IST [main] INFO  - ContentPack : CTGLC0003I : Successfully installed SourceTypes
[packagemanager] 07/01/15 00:14:39:243 IST [main] INFO  - ContentPack : CTGLC0002I : Installing Collections ...
[packagemanager] 07/01/15 00:14:39:244 IST [main] INFO  - ContentPack : CTGLC0003I : Successfully installed Collections
[packagemanager] 07/01/15 00:14:39:431 IST [main] INFO  - ContentPackManager : CTGLC0023I : Install of MyAppLogInsightPack_v1.0.0.0 completed successfully

BUILD SUCCESSFUL
Total time: 2 seconds

Upload the sample file

Transfer the sample log file to log analysis server.  Create a datasource using Log Analysis Administrative settings UI as follows:

Test Insight Pack Figure 2

Test Insight Pack Figure 3

Test Insight Pack Figure 4

If all goes well, you will see a message saying datasource is successfully configured.

Now, go to the search window.  Select myAppLog as datasource, last year as timefilter and * as search string. Click on search to see the search results.

Test Insight Pack Figure 5

Go to Grid view to see the fields created.

Test Insight Pack Figure 6

Congratulations! Your insight pack for MyAppLog is now working.

1 comment on"Test Insight Pack"

  1. Hello,

    Followed steps provided in this documentation to create a custom java insight pack.
    Successfully created and tested splitter and annotator code in local workspace and built and installed the insight pack as described.

    But while trying to create the Data source getting below error. Please help.

    Tue Feb 14 00:00:43 PST 2017 : Connection number: 28.
    Tue Feb 14 00:00:43 PST 2017 : Connection number: 29.
    02/14/17 00:00:43:289 PST [Default Executor-thread-582] INFO – LogSourcesHandler : 11
    02/14/17 00:00:46:452 PST [Default Executor-thread-583] INFO – UnityRestServlet : Processing SourceTypes
    02/14/17 00:00:49:826 PST [Default Executor-thread-579] ERROR – RXAFileSelectorServlet : getRoots() – Connection in session ? [true].
    02/14/17 00:01:15:291 PST [Default Executor-thread-585] INFO – DataSourceConfigServlet : SourcetypeID = 22
    02/14/17 00:01:15:295 PST [Default Executor-thread-585] INFO – LogSourcesHandler : ~~~~~~~~~~~~~~~~~~~~~~~~~ TRANSACTION BEGINS ~~~~~~~~~~~~~~~~~~~~~~~~~
    02/14/17 00:01:15:300 PST [Default Executor-thread-585] INFO – LogSourcesHandler : CreateDSCollection – Created new Collection with id==40
    02/14/17 00:01:15:300 PST [Default Executor-thread-585] INFO – LogSourcesHandler : ~~~~~~~~~~~~~~~~~~~~~~~~~ TRANSACTION BEGINS ~~~~~~~~~~~~~~~~~~~~~~~~~
    02/14/17 00:01:15:308 PST [Default Executor-thread-585] INFO – Unity(Unknown Source) : logPath/tmp/2017.01.07.USWV1VCS01.log
    02/14/17 00:01:15:351 PST [Default Executor-thread-585] INFO – LogSourcesHandler : ~~~~~~~~~~~~~~~~~~~~~~~~~ TRANSACTION ENDED ~~~~~~~~~~~~~~~~~~~~~~~~~
    02/14/17 00:01:15:352 PST [Default Executor-thread-585] INFO – LFAConfigMgr : Tokenizing and generating LFA config file /opt/IBM/LogAnalysis/IBM-LFA-6.30/config/lo//CustomSyslog_DS.conf using token map {FileComparisonMode=CompareByAllMatches, SshUserid=#, LogSources=/tmp/2017.01.07.USWV1VCS01.log, SshHostList=#, DataSourceName=CustomSyslog_DS, ServerLocation=localhost, BufEvtPath=/opt/IBM/LogAnalysis/logs/lfaCache/CustomSyslog_DS.cache, SshPassword=#, ServerPort=5529, RemoteRequired=#}
    02/14/17 00:01:15:364 PST [Default Executor-thread-585] INFO – LFAConfigMgr : Tokenizing and generating LFA format file /opt/IBM/LogAnalysis/IBM-LFA-6.30/config/lo//CustomSyslog_DS.fmt using token map {DataSourceName=CustomSyslog_DS, SEND_FILE_NAME=/tmp/2017.01.07.USWV1VCS01.log, SEND_HOST_NAME=localhost}
    02/14/17 00:01:15:365 PST [Default Executor-thread-585] INFO – LogSourcesHandler : ~~~~~~~~~~~~~~~~~~~~~~~~~ TRANSACTION ENDED ~~~~~~~~~~~~~~~~~~~~~~~~~
    02/14/17 00:01:15:426 PST [Default Executor-thread-585] ERROR – DataSourceConfigServlet : createDataSource() – Data source creation failed because the new collection could not be registered:CTGLA0424E : Error registering collection “CustomSyslog_DS” with annotator in flow controller
    com.ibm.tivoli.unity.flowcontroller.exception.UnityFlowControllerRegistrationException: CTGLA0424E : Error registering collection “CustomSyslog_DS” with annotator in flow controller
    at com.ibm.tivoli.unity.flowcontroller.UnityFlowController.registerWithAnnotator(UnityFlowController.java:823)
    at com.ibm.tivoli.unity.flowcontroller.UnityFlowController.registerCollection(UnityFlowController.java:508)
    at com.ibm.tivoli.unity.service.UnityRestServletHelper.registerCollection(UnityRestServletHelper.java:71)
    at com.ibm.tivoli.unity.service.DataSourceConfigServlet.createDataSourceConfig(DataSourceConfigServlet.java:1061)
    at com.ibm.tivoli.unity.service.DataSourceConfigServlet.createDataSource(DataSourceConfigServlet.java:348)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRequest(InvokeMethodHandler.java:63)
    at org.apache.wink.server.handlers.AbstractHandler.handleRequest(AbstractHandler.java:33)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
    at org.apache.wink.server.internal.handlers.CreateInvocationParametersHandler.handleRequest(CreateInvocationParametersHandler.java:54)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
    at org.apache.wink.server.handlers.AbstractHandler.handleRequest(AbstractHandler.java:34)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
    at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleResourceMethod(FindResourceMethodHandler.java:151)
    at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:65)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
    at org.apache.wink.server.internal.handlers.FindRootResourceHandler.handleRequest(FindRootResourceHandler.java:95)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
    at org.apache.wink.server.internal.handlers.HeadMethodHandler.handleRequest(HeadMethodHandler.java:53)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
    at org.apache.wink.server.internal.handlers.OptionsMethodWADLHandler.handleRequest(OptionsMethodWADLHandler.java:51)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
    at org.apache.wink.server.internal.handlers.SearchResultHandler.handleRequest(SearchResultHandler.java:33)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
    at org.apache.wink.server.internal.log.ResourceInvocation.handleRequest(ResourceInvocation.java:92)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
    at org.apache.wink.server.internal.log.Requests.handleRequest(Requests.java:76)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
    at org.apache.wink.server.handlers.AbstractHandlersChain.run(AbstractHandlersChain.java:60)
    at org.apache.wink.server.internal.RequestProcessor.handleRequestWithoutFaultBarrier(RequestProcessor.java:207)
    at org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:154)
    at com.ibm.websphere.jaxrs.server.IBMRestServlet.service(IBMRestServlet.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1285)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:776)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:473)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:135)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:74)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:1017)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1139)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:81)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:927)
    at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:262)
    at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:955)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.lang.Thread.run(Thread.java:785)
    Caused by: com.ibm.tivoli.unity.splitterannotator.exception.JavaAnnotatorException: CTGLA0931E : Annotator class must implement IJavaAnnotator interface
    at com.ibm.tivoli.unity.splitterannotator.annotator.JavaAnnotatorWrapper.register(JavaAnnotatorWrapper.java:220)
    at com.ibm.tivoli.unity.splitterannotator.annotator.Annotator.registerCollection(Annotator.java:161)
    at com.ibm.tivoli.unity.flowcontroller.UnityFlowController.registerWithAnnotator(UnityFlowController.java:815)
    … 69 more
    02/14/17 00:01:15:431 PST [Default Executor-thread-585] INFO – LogSourcesHandler : ~~~~~~~~~~~~~~~~~~~~~~~~~ TRANSACTION BEGINS ~~~~~~~~~~~~~~~~~~~~~~~~~
    02/14/17 00:01:15:452 PST [Default Executor-thread-585] INFO – LogSourcesHandler : ~~~~~~~~~~~~~~~~~~~~~~~~~ TRANSACTION ENDED ~~~~~~~~~~~~~~~~~~~~~~~~~
    02/14/17 00:01:15:452 PST [Default Executor-thread-585] INFO – DataSourceConfigServlet : As rollback action deleted logsource id:27
    02/14/17 00:01:15:458 PST [Default Executor-thread-585] INFO – DataSourceConfigServlet : As rollback action deleted collectionId id:40
    02/14/17 00:01:15:462 PST [Default Executor-thread-585] INFO – LogSourcesHandler : ~~~~~~~~~~~~~~~~~~~~~~~~~ TRANSACTION ENDED ~~~~~~~~~~~~~~~~~~~~~~~~~
    02/14/17 00:01:16:600 PST [Default Executor-thread-579] INFO – LogSourcesHandler : 11

Join The Discussion

Your email address will not be published. Required fields are marked *