Create a time-series definition in MetricBase

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 5분
  • Specify the metric that you want to store, how often to collect it, and how long to store it in MetricBase.

    시작하기 전에

    프로시저

    1. Navigate to MetricBase > Time Series Metrics.
    2. Select New.
    3. On the form, fill in the fields.
      표 1. Time series metric form
      Field Description
      Label Intuitive name for the Metric field name. For example, altitude could be the label for the metric field name, mb-altitude.
      Table name Name of the table to add the metric to in the MetricBase database. For example, in the MetricBase Demo, the mb_drone table stores the drone data. Each column in the table is a different metric, for example, altitude, length, and speed.
      Metric field name Name of the time-series metric that records. For example, mb-altitude. You can think of it as the name of a column in the MetricBase database table.
      Retention policy Sampling frequency and how long MetricBase keeps the values in the database. You cannot customize the value. For a definition of the values, click the magnifying glass and then a policy. The coarser the sampling rate, the less data that stores. Use the coarsest sampling rate that works for your dataset. For example, do not collect data every minute if collecting it once an hour suffices. See MetricBase retention policies for a description of the policies you can select.
      Retention policy aggregator Operator that aggregates the data in a sampling period. For example, last, minimum, maximum, and average.
      Display value aggregator The aggregation method in use when using <table-name>.list where <table-name> is a table in the MetricBase database. This value is unrelated to the retention policy. For a definition of the options, see MetricBase transforms.
      Display value aggregate duration Duration that is used to calculate the aggregation only when using the list view. For example, <table-name>.list where <table-name> is a table in the MetricBase database. This value is unrelated to the retention policy.
      Subject field You can select a unique table column as your subject for the metric. The unique column must be designated on the table before you select it. For example, if your metric tracks temperatures in different houses, you can make the house address column the subject of your metric. The house address column on your table must be unique before you set the subject field.
      주:
      The sys_id column is the default unique column.
      Data Type You can specify the data type of the subject field.
    4. Select Submit.

    결과

    You've created a time-series specification for a metric that you want to track.

    다음에 수행할 작업

    Sample the data according to the time-series specification and send it from an instance to the MetricBase database server.

    Use the REST or JavaScript APIs to send the data to the MetricBase database at the rate that is prescribed by the time-series definition. See Developer resources.

    중요사항:
    Send the data at the rate that the time-series definition prescribes. If you send the data at a different rate or for a different duration, you receive an error. Make sure to aggregate the data according to the time-series metric definition. Also, the MetricBase database only stores values of data type float.