PST Metrics Script

This script sets up PST QA Metrics configuration for the SDP QA Display.

The script creates the configuration for the PST processing via the ReceiveAddress attribute on the Subarray, and creates the Flow entries that the SDP QA Display will consume to create the graphs on the display.

This script sets the data retention in Kafka to be 1 hour. After 1 hour the SDP QA Display will no longer show the older data.

For a detailed description of the metrics view this page in confluence.

Processing block parameters

class PstMetrics(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

List of metrics that can be requested.

Note: underscores are removed for topic names

ALL = 'all'

Request all proceeding metrics

pydantic settings PstMetricsParams

pst-metrics script parameters

Show JSON schema
{
   "title": "pst-metrics",
   "description": "pst-metrics script parameters",
   "type": "object",
   "properties": {
      "metrics": {
         "default": [
            "all"
         ],
         "description": "List of metrics to generate, or 'all'",
         "items": {
            "$ref": "#/$defs/PstMetrics"
         },
         "title": "Metrics",
         "type": "array"
      },
      "max_message_size_bytes": {
         "default": 10000000,
         "description": "The number of bytes the maximum message can be",
         "minimum": 1000000,
         "title": "Max Message Size Bytes",
         "type": "integer"
      }
   },
   "$defs": {
      "PstMetrics": {
         "description": "List of metrics that can be requested.\n\nNote: underscores are removed for topic names",
         "enum": [
            "all",
            "bandpass",
            "timeseries",
            "histogram",
            "flow_through_histogram",
            "flow_through_bandpass",
            "flow_through_timeseries",
            "input_weights"
         ],
         "title": "PstMetrics",
         "type": "string"
      }
   },
   "additionalProperties": false
}

Config:
  • strict: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = False

  • validate_assignment: bool = True

  • title: str = pst-metrics

Fields:
field max_message_size_bytes: int = 10000000

The number of bytes the maximum message can be

Constraints:
  • ge = 1000000

field metrics: list[PstMetrics] = [PstMetrics.ALL]

List of metrics to generate, or ‘all’

Changelog

0.2.0

  • Update set of created metrics, and use new Display flows (MR436).

0.1.1

  • Update ska-sdp-scripting to 3.0.1 (MR428).

0.1.0

  • Initial version that updates the receive addresses and creates the flow entries for the SDP QA Display. (MR374).