Hello, good morning, thank you so much for reading this question. ☺️🙂👍
We are developing a code to get information about our Production's items: services, processes and operations.
We know we can get various configurations of a given item: Category, Port, Enabled...
But we wonder how we could get the date time of the last mesage (most recent) received in an item.
To give a code snippet a small section of the code we have developed (and tested), it looks like:
[...]
For i=1:1:tProduction.Items.Count() {
#dim item as Ens.Config.Item
set item = tProduction.Items.GetAt(i)
set Componente = ##class(EsquemasDatos.Monitorizacion.Componente).%New()
set Componente.Nombre = item.Name
set tipo = item.BusinessType()
set x = 0
if (tipo = "1") {
set Componente.Tipo = "Servicio"
set x = item.GetSetting("Port",.port)
if (x '= 1){
set x = item.GetSetting("IPPort",.port)
}
set Componente.Comentario = item.Comment
if (tipo = "2") {
[...]
}
[...]
}
[...]
We would like to get the date and / or date-time of the most recent message sent to that given item, like the one we see on the Production's menu under "Messages" tab:
.png)
However, how could it be doable?
We have looked for similar documentation, threads / questions, but we are unnable to find useful information.
We have looked for:
https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI...
https://community.intersystems.com/post/custom-monitoring-page-iris-inte...
https://community.intersystems.com/post/sql-calculate-time-last-message
However, we still having the exact same doubt.
Please, could you help us?
Thank you so much! 🙏☺️🙂👍🙏