Bruce Yip Posted December 29, 2019 Share Posted December 29, 2019 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 More sharing options...
Tristan Chou 2 Posted December 30, 2019 Share Posted December 30, 2019 Please try%%TIBCO_DOMAIN%% and%%TIBCO_DOMAIN_HOME%% to see how it goes. -Tristan Link to comment Share on other sites More sharing options...
Bruce Yip Posted December 31, 2019 Author Share Posted December 31, 2019 I am using %%TIBCO_DOMAIN%% and %%TIBCO_DOMAIN_HOME%% but still no value substitue into them when deployed. Only can get the value substituted if generate the mar file using -Xtype bwengine. Link to comment Share on other sites More sharing options...
Tristan Chou 2 Posted December 31, 2019 Share Posted December 31, 2019 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 More sharing options...
Bruce Yip Posted January 2, 2020 Author Share Posted January 2, 2020 Thanks Tristan. I think this is the solution. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now