Configure a metric aggregation job

  • Release version: Australia
  • Updated July 10, 2026
  • 2 minutes to read
  • Configure a scheduled job to aggregate raw metrics into a calculated metric on a parent or anchor configuration item (CI). Aggregated metrics let you view performance data at a higher level of the network.

    Before you begin

    A pull connector must be configured and collecting metrics for the source resources to aggregate.

    Role required: tsom_assurance_admin

    About this task

    Each scheduled job handles one aggregation. The job script defines the source data, aggregation method, and result destination.

    Procedure

    1. Navigate to All > System Definition > Scheduled Jobs.
    2. Select New.
    3. Select Automatically run a script of your choosing.
    4. In the Name field, enter a meaningful name for the aggregation.
    5. Set the run schedule for the job.
      For example, to run the aggregation periodically, set Run to Periodically, set the repeat interval, and set the start date and time.
    6. In the Script field, enter the script that runs the aggregation.

      The script calls the metric aggregation scripted extension point and passes a configuration object that defines the aggregation. The following example aggregates a per-cell metric into an average value on each Baseband Unit.

      var impls = new GlideScriptedExtensionPoint()
          .getExtensions('sn_tsom_em_conns.TSOMMetricAggregatorSEP');
      
      if (!impls || !impls.length) {
          gs.warn('TSOMMetricAggregator: No implementations registered for TSOMMetricAggregatorSEP');
      } else {
          impls[0].aggregate({
              mode: 'hierarchy',
              targetCIClass: 'cmdb_ci_baseband_unit',
              sourceCIClass: 'cmdb_ci_mobile_cell',
              sourceMetric: 'NR_5076b',
              aggregate: 'avg',
              calculatedMetricName: 'NR_5076b_avg_bbu',
              unit: 'Mbps',
              level: 4
          });
      }

      For a flat, range-based aggregation, set the mode to flat, identify the source resources by range, optionally apply field filters, and provide the anchor CI that holds the result, as shown in the following example.

      var impls = new GlideScriptedExtensionPoint()
          .getExtensions('TSOMMetricAggregatorSEP');
      
      if (!impls || !impls.length) {
          gs.warn('TSOMMetricAggregator: No implementations registered for TSOMMetricAggregatorSEP');
      } else {
          impls[0].aggregate({
              mode: 'flat',
              sourceCIClass: 'cmdb_ci_sim',
              rangeStart: 'SIM010',
              rangeEnd: 'SIM050',
              filters: [
                  { field: 'operational_status', operator: '=', value: '1' }
              ],
              sourceMetric: 'sim_throughput',
              aggregate: 'avg',
              calculatedMetricName: 'sim_throughput_avg_global',
              anchorCiSysId: '<sys_id>',
              unit: 'Mbps'
          });
      }

      To roll up only a subset of source CIs into a parent CI, use hierarchy mode and narrow the source resources by range and field filters, as shown in the following example. This example averages a metric across a range of SIM cards with an active operational status and publishes the result to the parent mobile private network (MPN) service.

      var impls = new GlideScriptedExtensionPoint()
          .getExtensions('TSOMMetricAggregatorSEP');
      
      if (impls && impls.length) {
          impls[0].aggregate({
              mode: 'hierarchy',
              targetCIClass: 'cmdb_ci_network_service_instance',
              sourceCIClass: 'cmdb_ci_sim_card',
              rangeStart: 'PLMN-PLMN/SST-1/SD-000011',
              rangeEnd: 'PLMN-PLMN/SST-1/SD-000015',
              filters: [
                  { field: 'operational_status', operator: '=', value: '1' }
              ],
              sourceMetric: 'NR_5076b',
              aggregate: 'avg',
              calculatedMetricName: 'NR_5076b_avg_11_to_15_per_MPN_Service',
              unit: 'Mbps',
              level: 4
          });
      }

      To reference the scripted extension point by its fully qualified scoped name and log a warning when no implementation is registered, use the following pattern.

      var impls = new GlideScriptedExtensionPoint()
          .getExtensions('sn_tsom_em_conns.TSOMMetricAggregatorSEP');
      
      if (!impls || !impls.length) {
          gs.warn('TSOMMetricAggregator: No implementations registered for TSOMMetricAggregatorSEP');
      } else {
          impls[0].aggregate({
              mode: 'hierarchy',
              targetCIClass: 'cmdb_ci_network_service_instance',
              sourceCIClass: 'cmdb_ci_sim_card',
              rangeStart: 'PLMN-PLMN/SST-1/SD-000011',
              rangeEnd: 'PLMN-PLMN/SST-1/SD-000015',
              filters: [
                  { field: 'operational_status', operator: '=', value: '1' }
              ],
              sourceMetric: 'NR_5076b',
              aggregate: 'avg',
              calculatedMetricName: 'NR_5076b_avg_11_to_15_per_MPN_Service',
              unit: 'Mbps',
              level: 4
          });
      }
    7. Select Submit.
      Note:
      For a description of each configuration value, see Metric aggregation configuration reference.

    Result

    The scheduled job runs on the defined schedule. Each run produces the calculated metric and raises an event to bind the metric to a CI. After the metric-to-CI binding completes, the calculated metric is stored in the metric base and is available to view in the Insight Explorer.