Hi,
when using agent table for instance discovery instance names are taken from instance column in the table, in case of System.Services it will be service name. So $1 in filter script is always instance, you have no access to actual table row. I suggest to use script as instance discovery method instead of agent table, and process table i that script instead. It could looks like following:
Best regards,
Victor
when using agent table for instance discovery instance names are taken from instance column in the table, in case of System.Services it will be service name. So $1 in filter script is always instance, you have no access to actual table row. I suggest to use script as instance discovery method instead of agent table, and process table i that script instead. It could looks like following:
Code Select
services = $node->readAgentTable("System.Services");
if (services == null)
return null;
instances = %();
for(r : services->rows)
{
name = r->get(0);
startup = r->get(4);
if (name like "3CX*" and startup == "Auto")
instances->append(name);
}
return instances;
Best regards,
Victor