Article
· Aug 26, 2016 8m read

Enterprise Monitor and HealthShare

Enterprise Monitor is a component of Ensemble and can help organizations monitor multiple productions running on different namespaces within the same instance or namespaces running on multiple instances.

Documentation can be found at:

http://docs.intersystems.com/ens20161/csp/docbook/DocBook.UI.Page.cls?KEY=EMONITOR_all#EMONITOR_enterprise

In Ensemble 2016.1 there were changes made to make this utility work with HealthShare environments.

This article will:

  • Show how to set up Enterprise Monitor for HealthShare sites
  • Show some features of Enterprise Monitor
  • Show some features of Enterprise Message Viewer

For this article, I used the following version of HealthShare:

Cache for Windows (x86-64) 2016.1 (Build 656U) Fri Mar 11 2016 17:42:42 EST [HealthShare Modules:Core:14.02.2415 + Linkage Engine:14.02.2415 + Patient Index:14.02.2415 + Clinical Viewer:14.02.2415 + Active Analytics:14.02.2415]

Set Up Enterprise Monitor

Create a new Namespace

Enterprise Monitor runs in its own namespace and can be located on an existing instance or on a separate instance.  In this article, I am running it on the same instance.

To Create a Namespace:

  • Go to System Management Portal -> System Administration -> Configuration -> System Configuration-> Namespaces
  • Click the “Create New Namespace” button

In this example, I created a HSMONITOR namespace.  I also created a new database, also called HSMONITOR

Screen Shot of Create a Namespace:

Edit the Web Application

For HealthShare instances, the web application defaults the “Session Cookie Path” to “/csp/healthshare/”.   If the Enterprise Monitor namespace is on an instance with other HealthShare namespaces, you should change the “Session Cookie Path” for the Enterprise Monitor namespace to “/csp/healthshare/[namespace]/”.

To change the web application:

  • Go to System Management Portal -> System Administration -> Security -> Applications -> Web Applications
  • Select the web application that was created for your Enterprise Monitor namespace, in my case it is “/csp/healthshare/hsmonitor”.
  • Select the drop down for “Session Cookie Path” and change it to “/csp/healthshare/[namespace]/”.  In my case, I selected “/csp/healthshare/hsmonitor/”.

Screen shot of changing the web application:

Add a Credential

The Enterprise Monitor uses web services to communicate with the various systems, so it needs a username/password to validate the communication.  Ensemble can do this using Credentials.  Every HealthShare namespace uses credentials with the username “HS_Services”

We will add “HS_Services” to the credentials of the Ensemble namespace we created to do our Enterprise Monitor.

Steps to create a credential:

  • Go to System Management Portal ->  Ensemble
  • Select the Enterprise Monitor namespace if asked, or change the namespace using the “switch” link at the top of the System Management Potal.
  • Go to Configure -> Credentials
  • Click the “New” button
  • Set ID to “HS_Services”
  • Set UserName to “HS_Services”
  • Set Password to the password HS_Services uses for the other HealthShare namespaces.

Screen shot of Adding Credentials:

Create a Production

Next we create a production that uses the Business Service “Ens.Enterprise.MonitorService”.  This is the production that will run in the Enterprise Monitor namespace that we set up.

Following is the production I created.  Notice that it extends “Ens.Enterprise.Production” and has one business service item included, that was added (Ens.Enterprise.MonitorService).

Class HSMONITOR.MonitorProduction Extends Ens.Enterprise.Production
{
XData ProductionDefinition
{
<Production Name="HSMONITOR.MonitorProduction">
    <ActorPoolSize>2</ActorPoolSize>
    <Item Name="Ens.Enterprise.MonitorService" ClassName="Ens.Enterprise.MonitorService" PoolSize="1" />
</Production>
}

}

Once you have created a production, you can start the production in the Enterprise Monitor namespace you created.  In this example, I started my HSMONITOR.MonitorProduction in my HSMONITOR namespace.

Add an Enterprise System

Now that we have a production up and running, we can add the Enterprise Systems that we want to monitor.

To create a new Enterprise System:

  • Go to System Management Portal -> Ensemble
  • Make sure you are in the Enterprise Monitor namespace
  • Go to Configure -> Enterprise Systems
  • Click the “New Connection” button

Screenshot of Enterprise Systems:

To add a new connection:

  • Enter the Name
  • Enter the Web IP Address
  • Enter the Namespace
  • Enter the Service Web Application Path
  • Enter the Soap Credentials
  • Click the “Save” button.

Screen shot of adding a connection to HSREGISTRY:

You can add several Enterprise Systems to reflect your HealthShare environments.  You can add Edge gateways, Access gateways, other HealthShare components, like Personal Community, Patient Index, Health Insight, etc.

HealthShare has most of this information located in the Service Registry.

I put my Enterprise Monitor namespace on the same instance as my HSREGISTRY.

I created and ran the following code in the HSMONITOR namespace to automatically create the Enterprise Systems based on the information located in the Service Registry.

Code Sample:

ClassMethod BuildEM()
{
                set tSaveNamespace = $namespace
                zn "HSREGISTRY"             
               
                set sql="select EndPoint,Name,Info from HS_Registry_Service.SOAP"
                set statement = ##class(%SQL.Statement).%New()
                set tSC = statement.%Prepare(sql)
                quit:$$$ISERR(tSC)
                set result = statement.%Execute()
                while result.%Next() {
                                set tEndPoint = result.EndPoint
                                set tName = result.Name
                                set tInfo = result.Info
                                If tName = "HSREGISTRY" set tName = ":"_tName
                                If tName = "HSPI" set tName = ":"_tName
                                If $p(tName,":",2) = "WebServices" set tName = ":"_tName
                                If tName = "HSCommunity.PIXv3.Consumer" set tName = ":HSCOMMUNITY"
                                Continue:$p(tName,":",2)=""
                                set tMCName = $p(tName,":",2)
                                set tMCNamespace = $p(tEndPoint,"/",6)
                                set tMCWebIP = tInfo
                                set tMCHomePath = "/"_$p(tEndPoint,"/",4,6)_"/"
                                set tMCServicePath = "/"_$p(tEndPoint,"/",4,7)_"/"
                                set aMC(tMCName)=$lb(tMCNamespace,tMCWebIP,tMCHomePath,tMCServicePath)
                }
                zn tSaveNamespace
                ///Now we have an array of namespaces, create Monitor entries
                set tName = ""
                do {
                  set tName=$O(aMC(tName))
                  if tName '="" {
                                set tMonitorClient = ##class(Ens.Enterprise.MonitorClient).%New()
                                set tMonitorClient.Name=tName 
                                set tMonitorClient.WebIPAddress=$list(aMC(tName),2) ;IP/Port
                                set tMonitorClient.Namespace=$list(aMC(tName),1) ;NameSpace
                                set tMonitorClient.HomePage="%25CSP.Portal.Home.zen"
                                set tMonitorClient.HomePath=$list(aMC(tName),3) ;"/csp/healthshare/[namespace]/"
                                set tMonitorClient.QueueThreshold=""
                                set tMonitorClient.ServicePath=$list(aMC(tName),4) ;"/csp/healthshare/[namespace]/services/"
                                set tMonitorClient.SOAPCredentials="HS_Services"
                                set tMonitorClient.SSLCheckServerIdentity="1"
                                set tMonitorClient.SSLConfig=""
                                set tMonitorClient.Version="2016.1.1.108.1."
                                set tSC=tMonitorClient.%Save()
                                w !,tName,": ",$system.Status.DisplayError(tSC)
                  }
                } while tName '= ""
                quit
}

Enterprise Monitor

Now that we have entries in the Enterprise System, you will notice that there is a new menu option when you are in the Ensemble Enterprise Monitor namespace.  The new menu option is “Enterprise Monitor”.

Screen shot of new menu option:

If we select “Enterprise Monitor” we see:

We now have a single place where we can see which HealthShare productions are “Running” and which productions are “Stopped”.  We also have links to the production configurations of the productions that are running.

When each row is selected, you can see the details for each environment.  Here is an example:

This display shows details on:

  • Incoming Connections
  • Outgoing Connections
  • Queues
  • Event Log
  • Activity Graph
  • List of Ensemble messages

You also have the ability to add Custom Metrics.

More information on the production monitor can be found:

http://docs.intersystems.com/ens20161/csp/docbook/DocBook.UI.Page.cls?KEY=EMONITOR_production

Enterprise Message Viewer

When you have Enterprise Monitor set up, you also have the ability to look at the Enterprise Message Viewer.

In this example, go to Patient Search in HSACCESS, do a patient lookup, select a patient, and look at the information displayed in the Clinical Viewer.

By going into the Enterprise Message Viewer, you can see all the systems that were called and the information that was used to make this Clinical Viewer action happen.

Now there is a single place to see how the messages are flowing across all systems/namespaces in the HealthShare environment.

NOTE:  This Enterprise Message Viewer utility only contains basic info from the Header of the Ensemble messages.  It does provide links to the specific details of the session and will bring you to the details and traces of the Ensemble message.

Conclusion

The Enterprise Monitor and the Enterprise Message Viewer are new tools in Ensemble that will help HealhShare customers manage their environments and view workflows across HealthShare.

Enterprise Monitor:

  • Single location to see which environments are running and which are stopped.
  • Links to all production configurations of HealthShare environment
  • View of each production’s details which include
    • Incoming connections
    • Outgoing connections
    • Queues
    • Event log
    • Activity Graph
    • Messages

Enterprise Message Viewer:

  • Single view of all messages across the HealthShare environment
Discussion (2)1
Log in or sign up to continue