Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content
  • Monitoring BWCE application logs using Hawk Container Edition in K8

    Manoj Chaurasia

    Table of Contents

    TIBCO Hawk® provides the industry's best, most sophisticated tool for monitoring and managing distributed applications and systems throughout the enterprise. With TIBCO Hawk, system administrators can monitor application parameters, behavior, and loading activities for all nodes in a local or wide-area network and take action when pre-defined conditions occur. In many cases, runtime failures or slowdowns can be repaired automatically within seconds of their discovery, reducing unscheduled outages and slowdowns of critical business systems. 

    TIBCO Hawk Container Edition can be used to monitor application logs for a TIBCO BusinessWorks Container Edition application. This article explains detailed steps about how to set this up using Hawk rulebases and alerts.

    TIBCO Hawk Container Edition has DockerHostMA method named ?onContainerLogs? which has a parameter Container Name.

    Note that in K8s, each container in the pod is created with a different Container ID

     e.g. 6971d7a455bb249b06184c216e251be5131a0a50e9f55ca5c55bca2493e58143


    But the Container Name always follows a fixed pattern. E.g.:



    The method onContainerLogs supports specifying the containerName with the pattern and not necessarily the full container name.

    So you can write a RuleBase (e.g. MonitorBWCELogs) to monitor the logs from TIBCO BusinessWorks Container Edition application for any keywords/exceptions and generate alerts as follows:






    If the BWCE pod is deleted and then recreated, then the Rulebase stops working.


    1. Create a Rulebase (e.g. LoadUnloadRB) with a test condition to unload the MonitorBWCELogs Rulebase if the HKBWCE Microagent is removed (i.e. if BWCE pod/ container is deleted).
    2. Create a test condition to load the  MonitorBWCELogs Rulebase if the HKBWCE Microagent is back (i.e. BWCE pod/ container is up and the HKBWCE Microagent connects with the Agent).
    3. Use the Self Microagent -> onMicroagentEvent method in the Rule:

    4. The test condition is if Microagent Name is ...HKBWCEMicroagent AND EventType  = Removed


    5. Then Unload the Rulebase: MonitorBWCELogs


    6. And similarly, if the BWCE microagent is up (when the pod is created/ auto deployed), then load the Rulebase again:




    1. It is important to configure the Hawk Agent with Auto Config Dir option so that the agent stores the Rulebases in it?s Auto Config Dir and loads up from there (RuleBaseEngine ? loadRuleBaseFromFile)

    2. It is recommended to store all RuleBases at RuleBase Repository at the Console side where they could be mapped to persistent volume and persisted.

    7. Verification: Verify that the Alerts are being generated for the RuleBase: MonitorBWCELogs

    8. Now destroy the deployment for BWCE pod:

     $ kubectl delete -f hkbwce.yml


    pod "bwcehawkadapter" deleted

    Verify that the Rulebase LoadUnloadRB is triggered and it unloads the Rulebase: MonitorBWCELogs and also generates an alert for it.

    Unload the Rulebase MonitorBWCELogs:


    9. Generate an alert for it:


    10. Now deploy the BWCE pod again:

     $ kubectl apply -f hkbwce.yml 


    pod/bwcehawkadapter created

    Verify that the Rulebase LoadUnloadRB is triggered and it loads the Rulebase: MonitorBWCELogs and also generates a notification for it.

    Load the Rulebase MonitorBWCELogs:


    11. Generate notification that the rulebase is loaded:


    And it starts generating alerts monitoring the BWCE logs.

    User Feedback

    Recommended Comments

    There are no comments to display.

  • Create New...