The AgentMetrics script include provides methods to process inbound MID Server metrics.

This script include updates the following tables:
  • ECC Agent Counter Metric [ecc_agent_counter_metric]
  • ECC Agent Memory Metric [ecc_agent_memory_metric]
  • ECC Agent RGR Metric [ecc_agent_rgr_metric]
  • ECC Agent Scalar Metric [ecc_agent_scalar_metric]

Use these methods in server scripts.

AgentMetrics - AgentMetrics()

Creates an instance of AgentMetrics.

Table 1. Parameters
Name Type Description
None

Example

This example shows how to use AgentMetrics() to instantiate an AgentMetrics object.

var amtc = new AgentMetrics();
amtc.handleMemory('memory', 'server_name', '1098888bbb9483abcd89981ffaeff');
amtc.updateMetric('ecc_agent_memory_metric', 'm_values', 'memory', '1098888bbb9483abcd89981ffaeff');

AgentMetrics - handleCounter(String metric, String name, String midId)

Handles counter metrics from the agent by putting them into an array that can be used to update the ECC Agent Counter Metric table (ecc_agent_counter_metric).

Table 2. Parameters
Name Type Description
metric String The counter object from the agent
name String The device name
midId String The MID server sys_id
Table 3. Returns
Type Description
void

Example

var amtc = new AgentMetrics();
amtc.handleCounter('count', 'server_name', '1098888bbb9483abcd89981ffaeff');

AgentMetrics - handleMemory(String metric, String name, String midId)

Updates the memory metrics for the given agent.

Table 4. Parameters
Name Type Description
metric String The memory object from the agent
name String The device name
midId String The MID server sys_id
Table 5. Returns
Type Description
void

Example

var amtc = new AgentMetrics();
amtc.handleMemory('mem_obj', 'server_name', '1098888bbb9483abcd89981ffaeff');

AgentMetrics - handleRGR(String metric, String name, String midId)

Handles metric information from a remote glide record by putting it into an array.

Table 6. Parameters
Name Type Description
metric String The remote object from the agent
name String The device name
midId String The MID server sys_id
Table 7. Returns
Type Description
void

Example

var amtc = new AgentMetrics();
amtc.handleRGR('remote_obj', 'server_name', '1098888bbb9483abcd89981ffaeff');

AgentMetrics - handleScalar(String metric, String name, String midId)

Handles scalar values from the agent by putting them into an array.

Table 8. Parameters
Name Type Description
metric String The counter object from the agent
name String The device name
midId String The MID server sys_id
Table 9. Returns
Type Description
void

Example

var amtc = new AgentMetrics();
amtc.handleScalar('scalar', 'server_name', '1098888bbb9483abcd89981ffaeff');

AgentMetrics - updateMetric(String tableName, String values, String metric, String midID)

Updates the specified metrics table with the new metric information.

Table 11. Returns
Type Description
void

Example

var amtc = new AgentMetrics();
amtc.handleMemory('memory', 'server_name', '1098888bbb9483abcd89981ffaeff');
amtc.updateMetric('ecc_agent_memory_metric', 'm_values', 'memory', '1098888bbb9483abcd89981ffaeff');