MIDServerCluster - getClusterAgent()

Gets the cluster agent.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
String The agent name
// Assuming "mid1" and "mid2" are in a cluster
var midgr = new GlideRecord("ecc_agent");
midgr.addQuery("name", "mid1");
midgr.query();
midgr.next();
 
var mscl = new MIDServerCluster(midgr);
gs.print(mscl.getClusterAgent());

Output: mid2