Scenario A: When the ActiveMatrix Service Grid Host is Abnormally Shut down

Detect when connected ActiveMatrix Service Grid Host is abnormally shut down, and restart only if the EMS server is running:

Rulebase Name:

SystemNodeRB-${tibcohost.instance.name}

Microagents Used:

  • com.tibco.hawk.amx.AMXHost
  • com.tibco.hawk.tibjms.HawkListener
  • COM.TIBCO.hawk.hma.Process
    Procedure
  1. Use AMXHost.isHostRunning() to determine if the ActiveMatrix Service Grid host is running

    if Running is False

    then post the 'th_not_running' condition and send the medium level alert: "TibcoHost is not running".

  2. Use AMXHost.getHostInfo to determine the runtime state of the ActiveMatrix Service Grid host.

    if Runtime State = 'LOST_CONTACT' or Runtime State='NOT_RUNNING'

    then post 'th_lost_contact' condition and send the medium alert: "Lost Contact with Tibco Host, Host is in a NOT_RUNNING state".

  3. Use HawkListener<tibcohost.ems.url>.isRunning() to determine the state of the EMS server connected to the ActiveMatrix Service Grid host.

    if running is True

    then post ems.server.<tibcohost.ems.url>.isrunning condition

    if running is False

    then send the high alert: "Tibcohost Qin EMS Server is down: Rules will NOT restart TH".

  4. Use Process.getInstanceCount(ProcessName='tibcohost') to determine

    whether there is a running OS process for the ActiveMatrix Service Grid host.

    if Process Count < 1 AND the following posted conditions exist:

    ems.server.<tibcohost.ems.url>.isrunning AND th_not_running then run start_tibcohost script, and send high alert: "ActiveMatrix Host is not running, going to restart it."