Update system health REST API scripts

After upgrading to ExtraHop firmware version 7.4, you must update any REST API scripts that access ExtraHop system health metrics. System health metrics include diagnostic information about how an appliance is functioning, such as the number of packets the appliance is capturing or how many triggers are running on it.

View a complete list of affected system health metrics at the end of this procedure..
  1. Open the script in a text editor and locate each section that defines body parameters for POST /metrics operations that select system health metrics.
    Body parameters for system health metrics are specified in javascript objects that look similar to the following code:
    {
      "cycle": "auto",
      "from": 0,
      "metric_category": "net",
      "metric_specs": [
        {
          "name": "rpcap_encap_pkts"
        }
      ],
      "object_ids": [
        0
      ],
      "object_type": "capture",
      "until": 0
    }
  2. Change each metric_category field from net to capture.
    For example, the following code shows the correct change to the metric_category field for the example code above:
    {
      "cycle": "auto",
      "from": 0,
      "metric_category": "capture",
      "metric_specs": [
        {
          "name": "rpcap_encap_pkts"
        }
      ],
      "object_ids": [
        0
      ],
      "object_type": "capture",
      "until": 0
    }
  3. Change each object_type field from capture to system
    For example, the following code shows the correct change to the object_type field for the example code above:
    {
      "cycle": "auto",
      "from": 0,
      "metric_category": "capture",
      "metric_specs": [
        {
          "name": "rpcap_encap_pkts"
        }
      ],
      "object_ids": [
        0
      ],
      "object_type": "system",
      "until": 0
    }
You must update any scripts that reference the following metric names:
  • app_input_cycles_total
  • ether_input_cycles
  • ether_input_cycles_total
  • filtered_bytes
  • filtered_pkts
  • flow_expireq_cycles
  • flow_expireq_cycles_total
  • flows
  • heap_alloc
  • if_drops
  • if_frames
  • l2_dup_bytes
  • l2_dup_pkts
  • l3_dup_bytes
  • l3_dup_pkts
  • l4_dup_bytes
  • l4_dup_pkts
  • one_sec_tick_cycles
  • one_sec_tick_cycles_total
  • pktcap_bytes_written
  • remote_queue_full
  • remote_queue_len
  • rpcapd_ifdrop
  • rpcapd_ifrecv
  • rpcapd_krnldrop
  • rpcapd_snd_tunnel_pkts
  • rpcap_encap_bytes
  • rpcap_encap_pkts
  • rpcap_rcv_tunnel_bytes
  • rpcap_rcv_tunnel_pkts
  • ssl_completion_cycles
  • ssl_completion_cycles_total
  • timestamped
  • total_cycles
  • trigger_cycles
  • trigger_cycles_all
  • trigger_cycles_avail
  • trigger_cycles_detail
  • trigger_cycles_thread_detail
  • trigger_cycles_total_detail
  • trigger_drops
  • trigger_exceptions_detail
  • trigger_executes
  • trigger_executes_detail
  • trigger_heap_alloc
  • trigger_thread_count
Published 2023-05-30