Scenario A: When Tibco Host is Abnormally Shutdown

Detect when connected TIBCO Host is abnormally shutdown, and restart only if 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 tibcohost is running

    if Running is False

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

  2. Use AMXHost.getHostInfo to determine runtime state of the tibcohost.

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

    then post 'th_lost_contact' condition and send 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 tibcohost.

    if running is True

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

    if running is False

    then send 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 tibcohost.

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

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