Category Archives: Uncategorized

Splunk-Appender for TIBCO BW6 logback

Splunk appender can be added to BW6 logback.xml by following the steps below.

  1. Add following jars to D:\tibco\bw\6.4\system\shared\com.tibco.tpcl.logback_1.1.0.001

    logback-core-1.1.3.jar

    logback-classic-1.1.3.jar

    slf4j-api-1.7.7.jar

    splunk-library-javalogging-1.7.1.jar

  2. Modify c:\tibco_642\bw\6.4\system\shared\com.tibco.tpcl.logback_1.1.0.001\META-INF\MANIFEST.MF by logback-core-1.1.3.jar,logback-classic-1.1.3.jar,slf4j-api-1.7.7.jar,splunk-library-javalogging-1.7.1.jar to “Bundle-ClassPath”

  • Modify logback.xml under D:\tibco\bw\6.4\config
    • Add appender for splunk, we must change the RemoteHost and Port based on the ENV

    <!– *=============================================================* –>

    <!– * APPENDER: Splunk * –>

    <!– *=============================================================* –>

        <appender name=”Splunk” class=”com.splunk.logging.TcpAppender”>

            <RemoteHost>pc15002</RemoteHost>

            <Port>9997</Port>

            <layout class=”ch.qos.logback.classic.PatternLayout”>

            <pattern>%d{HH:mm:ss.SSS} %-5level [%thread] %logger{36} – %msg%n</pattern>

            </layout>

        </appender>

    • Add appender-ref to logger ESB and root as below

  1. For existing appnodes,
    1. we have to replace the existing logback.xml with modified logback.xml in step above (under D:\tibco\bw\6.4\config)
    2. Delete or rename the config folder of appnode
    3. Restart the appnode

ApplicationInsights-Appender for TIBCO BW6 logback

ApplicationInsights appender can be added to BW6 logback.xml by following the steps below.

  1. Add following jars and dummy ApplicationInsights.xml to D:\tibco\bw\6.4\system\shared\com.tibco.tpcl.logback_1.1.0.001

    applicationinsights-core-2.0.0.jar

    applicationinsights-logging-logback-2.3.1.jar

    applicationinsights-web-1.0.7.jar

    ApplicationInsights.xml content:

     

     

     

  2. Modify c:\tibco_642\bw\6.4\system\shared\com.tibco.tpcl.logback_1.1.0.001\META-INF\MANIFEST.MF by applicationinsights-core-2.0.0.jarapplicationinsights-logging-logback-2.3.1.jar,applicationinsights-web-1.0.7.jar to “Bundle-ClassPath”

  • Modify logback.xml under D:\tibco\bw\6.4\config
    • Add appender for applicationinsights, we must change the instrumentationKey based on the ENV

        your key

    • Add appender-ref to logger ESB and root as below

  1. For existing appnodes,
    1. we have to replace the existing logback.xml with modified logback.xml in step above(under D:\tibco\bw\6.4\config)
    2. Delete or rename the config folder of appnode
    3. Restart the appnode
      ApplicationInsights Appender
      Should we change existing applications? No
      Should we change existing BW installation? Yes
      Should we modify existing logback.xml? Yes
      Do we have parsed output in Azure portal? Yes
      What happens when Azure or network is down? We lose the logs
      Is thread blocked No

 

ANT task to change parameter based on Operating System

It is often required to run the build framework on different servers (in our case Windows and Unix) and we need to assign some parameters based on the OS (in our case “path.separator.value”)
Below are the ANT tasks to find the Operating System of the build server and assign the value to corresponding parameter.
<!– define the operating system specific targets –>
<target name=”doWindows” if=”isWindows”>
<property name =”path.separator.value” value=”;”/>
</target>
<target name=”doUnix” if=”isUnix”>
<property name =”path.separator.value” value=”:”/>
</target>
<!– define our main/default target –>
<target name=”os.test” depends=”doWindows, doUnix”>
<property name =”path.separator” value=”${path.separator.value}”/>
<echo>${path.separator}</echo>
</target>

Good Luck!