The TIBCO Platform is a real-time, composable data platform that will bring together an evolving set of your TIBCO solutions - and it's available now!
A chart showing the TIBCO Platform vision
Jump to content
Forums
Ask questions and gain insight from discussions

Hawk Rulebase template variables not working for Agent-specific


Bruce Yip

Recommended Posts

Hi,

I want to implement a rulebase to monitor the Hawk.log of every machine deployed to Domain. So I wrote a rulebase template with the following setting

%%TIBCO_DOMAIN_HOME%%/%%TIBCO_DOMAIN%%/logs/hawk.log)]]>

 

0

 

 

onNewLine

 

%%TIBCO_DOMAIN_HOME%%/%%TIBCO_DOMAIN%%/logs/hawk.log]]>

 

0

 

Then I make a mar file as followng command and then deployed the mar file by mar cvf Generic_MachineMonitorhawkLog.hrb.

However, no value substitute into theTIBCO_DOMAIN_HOME and TIBCO_DOMAIN variables. The following is the deployed rulebase definition from Monitor Console.

====================

Rulebase: HawkLog

Author: Administrator on host ESB-1(169.254.244.15) at 17:32 Fri, Dec 27, 2019

Last Modification: Administrator on host ESB-1(169.254.244.15) at 17:35 Fri, Dec 27, 2019

Schedule:

Rule: COM.TIBCO.hawk.microagent.Logfile:onNewLine(logfile=%%TIBCO_DOMAIN_HOME%%/%%TIBCO_DOMAIN%%/logs/hawk.log)

Data Source: COM.TIBCO.hawk.microagent.Logfile:onNewLine[0]

Microagent: COM.TIBCO.hawk.microagent.Logfile

Method: onNewLine

Interval: 0ms

Test: (nextLine Contains testing)

Operator: Contains

java.lang.String: nextLine

java.lang.String: testing

Action: sendAlertHigh(alertMsg=Go %%TIBCO_DOMAIN%%)

Microagent: COM.TIBCO.hawk.microagent.RuleBaseEngine

Method: sendAlertMessage

Data Element(s):

message: Go %%TIBCO_DOMAIN%%

Perform Policy: performOnceOnly

True Condition Policy: Threshold(1)

Clear Condition: Timer(900seconds)

===============================

I want to ask whether rulebase template variables can applicable to Agent-specific rulebase

Thanks & Regards,

Bruce

Link to comment
Share on other sites

Hi Bruce,

You may consider to use external variable for doing this.

External variable could be defined on each machine separately in external file, hawkagent could replace these variables used in rulebase after hawkagent loads the rulebase files.

Let me know if any questions.

Thanks,

Tristan Chou

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...