Hi,
object queries are for a bit different purpose. They are for selecting objects. Script in query is executed for each node and should return true or false. You can include additional fields into resulting table, but number of columns will be static.
One possible solution for your task is to create script table DCI on one of the nodes (could be NetXMS server itself) that will collect data from other nodes and populate the table. Then you can put content of that table on dashboard. You can choose "do not store" option for that table DCI to avoid keeping unnecessary information in database. Script for such DCI could be following:
Best regards,
Victor
object queries are for a bit different purpose. They are for selecting objects. Script in query is executed for each node and should return true or false. You can include additional fields into resulting table, but number of columns will be static.
One possible solution for your task is to create script table DCI on one of the nodes (could be NetXMS server itself) that will collect data from other nodes and populate the table. Then you can put content of that table on dashboard. You can choose "do not store" option for that table DCI to avoid keeping unnecessary information in database. Script for such DCI could be following:
Code Select
result = new Table();
result->addColumn("sysName", DCI::STRING, "System Name", true);
result->addColumn("description", DCI::STRING, "Description", true);
result->addColumn("value", DCI::FLOAT, "Value");
for (node : GetAllNodes())
{
for(dci : FindAllDCIs(node, null, "*latency*"))
{
value = GetDCIValue(node, dci->id);
if (value != null)
{
row = result->addRow();
result->set(row, 0, node->snmpSysName);
result->set(row, 1, dci->description);
result->set(row, 2, value);
}
}
}
return result;
Best regards,
Victor