Showing posts with label TIBCO Hawk. Show all posts
Showing posts with label TIBCO Hawk. Show all posts

Simple Example tibco hawk rule

we can use one rule to stop multiple ADB instances and/or applications.

In 'TestEditor' we can add multiple actions. In 'Action Editor' choose 'Method' for action type and search for adapters' microagent where we can select 'stopApplicationInstance' method.

Here is one simple example.

<?xml version="1.0" encoding="UTF-8" ?>
<ruleBase>
    <version>4.6.0</version>
    <name><![CDATA[stopRule]]></name>
    <schedule></schedule>
    <author>XPMUser on host at 09:56 uto, lip 7, 2011</author>
    <lastModification>XPMUser on host  at 09:57 uto, lip 7, 2011</lastModification>
    <comment><![CDATA[]]></comment>
    <rule>
        <name><![CDATA[Self:getUptime():60]]></name>
       <schedule></schedule>
        <overRuling>0</overRuling>
        <dataSource>
            <microAgentName><![CDATA[COM.TIBCO.hawk.microagent.Self]]></microAgentName>
            <methodName>getUptime</methodName>
            <interval>60000</interval>
        </dataSource>
        <test>
            <name><![CDATA[(Total millisec > 0)]]></name>
            <schedule></schedule>
            <operator class="COM.TIBCO.hawk.config.rbengine.rulebase.operators.GreaterThan" >
                <operator class="COM.TIBCO.hawk.config.rbengine.rulebase.operators.RuleData" >
                   <dataObject class="java.lang.String" ><![CDATA[Total millisec]]></dataObject>
                </operator>
                <dataObject class="java.lang.Long"  value="0" />
            </operator>
            <consequenceAction>
                <name><![CDATA[stopApplicationInstance()]]></name>
                <schedule></schedule>
                <microAgentName>COM.TIBCO.ADAPTER.adr3.SomeAdapter</microAgentName>
                <methodName>stopApplicationInstance</methodName>
                <properties>
                </properties>
                <performOnceOnly/>
                <escalationTime>0</escalationTime>
            </consequenceAction>
            <consequenceAction>
               <name><![CDATA[stopApplicationInstance():1]]></name>
                <schedule></schedule>
                <microAgentName>COM.TIBCO.ADAPTER.adr3.SomeOtherAdapter</microAgentName>
                <methodName>stopApplicationInstance</methodName>
                <properties>
                </properties>
                <performOnceOnly/>
                <escalationTime>0</escalationTime>
            </consequenceAction>
            <trueConditionPolicy>
                <trueCountThreshold>1</trueCountThreshold>
            </trueConditionPolicy>
            <clearOn>
               <clearOnFirstFalse/>
            </clearOn>
        </test>
    </rule>
</ruleBase>





What are the monitoring best practices ?

Using TIBCO Hawk, we can have these practices to achieve an efficient and effective way of monitoring the system and  applications.

Process existence

Create a rulebase based on the process existence. This is to check or test whether there are not enough or too many process instances that are running or you can use this rulebase to automatically restart a failed process.

Monitors the process resource utilization

Creating a rulebase that monitors the process resource utilization. This is to make sure that the use of the resources such as the memory and the CPU don’t get too big overtime, which might affect the system’s performance.

LogFile or Event Log Monitoring

Create a rulebase for your LogFile or Event Log Monitoring. Through this, you can make or define another rule based on the entries of those activities logged on which you’ll be able to perform necessary actions.

Checking for the existence of an Application Microagent also needs to be monitored. This is useful in a situation where you want to detect if the application that you are monitoring is not responding or not communicating with the agents.






Creating a TIBCO Hawk Domain

Creating a TIBCO Hawk Domain -

Create a TIBCO Hawk domain if you wish to isolate groups of TIBCO Hawk agents into independent monitoring sets.

Remember that each TIBCO Hawk agent can belong to only one TIBCO Hawk domain and cannot communicate with the TIBCO Hawk Display program on other domains.

The default is to monitor an entire network as one group. To use the default, omit the hawk_domain option.

Testing a Domain -

To test the domain option, temporarily set the TIBCO Hawk domain on a single system to a name such as test, then start (or restart ) the TIBCO Hawk Display.

If you entered a unique domain name, you only one discovered host should appear in the TIBCO Hawk Display main window.

This shows that only the local agent and the local TIBCO Hawk Display are using the test domain.

If the domain is as desired, you can now install it on the network systems where you want to assign specific computers to that domain.

All systems assigned to that TIBCO Hawk domain appear on the Display as part of that domain.

When finished with testing, change back to the default domain and restart the TIBCO Hawk Display to verify that it was correctly restored.



  © Blogger templates The Professional Template by Ourblogtemplates.com 2008

Back to TOP