Yes, could be, however personally I don't like business metrics too much for this type of things. Because you are making the query every "N" seconds. If you want to show the SQL result in a DS dashboard, from my POV is more useful to make a simple KPI executing the SQL:

https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=D2MODADV_ch_kpi

In this case the query is made only when the DS is show.

Well, there are only 2 tables related with that queries:

Ens.MessageHeader(https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=EMONITOR_concepts#EMONITOR_concepts_msgs)

EnsLib.HL7.Messages (https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=EHL72_tools#EHL72_tools_classes)

Any Ensemble Message has a header object or record (Ens.MessageHeader) the Message Body related with this Header can be any persistent object. Then you have to check MessageBodyClassName property to check if the body is a EnsLib.HL7.Message, then you can link the Header and Body using MessageBodyId property.

I hope this helps.

Ens.MessageHeader

Good, but if you create a new Database the problem still being the same. The only easy thing you can do is to enable interoperability for the namespace USER:

To create another database and enabling interoperability throws the same problem (exceeds databases license limit).

So, because IRIS CE is mainly thought for development and not for production I think a best practice is to enable interoperability USER by default.

Thanks

In any case from my point of view this number or user databases limit for CE Edition is not well explained (specially to new people):

This the list of "user" databases (or not system databases) in the list of databases:

Into the red circle are 5 user databases. So in this case you can't create any more databases with IRIS CE license.

But the license counts ENSLIB as "user database" and is not true. This Database is needed to enable interoperability to any database. According to IRIS documentation:

ENSLIB — This is a read-only database contains additional code needed for InterSystems IRIS Interoperability features, specifically the ability to create productions, which integrate separate software systems. If you create a namespace that is interoperability-enabled, that namespace has access to the code in this database.

So keep in mind that the practical number of user databases for CE is 4.

Ummmh... not sure about this.

Specially in the case of Java Business Host Services and Operations because the JVM must run inside the IRIS instance memory (AFAIK), in this case there is no way of interaction between two different Containers or... there is a way? when I use two or more containers the interaction always was done using TCP/IP (Understand container communication).

This is a good question to clarify.

Thanks