Platform Metrics

EN | ES


Introduction

The platform manages metrics, which allow you to know how it has been used in each time interval. For this, the measured usage statistics are stored in different ontologies of TimeSeries type, grouping these metrics in 3 time windows:

  • Timetable with minute grouping: A record is generated for every hour with the metrics broken down into minutes. It is the right window to see the evolution by minute.
  • Daily with hourly grouping: A record is generated for every day with the metrics broken down into hours. It is the right window to see the evolution by hour.
  • Monthly with daily grouping: A record is generated for every month with the metrics broken down into days. It is the right window to see the evolution by day.

Metrics Catalog

The metrics integrated in Platform are:

  • Ontology utilization metrics: Each operation on an ontology is audited so that it is recorded:
    • Name of ontology.
    • User.
    • Type of operation (JOIN, LEAVE, INSERT, UPDATE, QUERY, DELETE).
    • Result (OK, KO).
    • Origin (IoT Broker, Api Manager, Control Panel).

 

  • Operational metrics of Digital Broker and Api Manager: Each operation on an ontology is audited so that it is recorded:
    • User.
    • Type of operation (JOIN, LEAVE, INSERT, UPDATE, QUERY, DELETE).
    • Result (OK, KO).
    • Origin (IoT Broker, Api Manager, Control Panel).

 

  • APIs utilization metrics: Each operation on an API is audited so that it is recorded:
    • API Name.
    • Result's HTTP code.
    • Summoning User.
    • Operation type.
  • Metrics of elements created on the platform:
    • Authentication and authentication attempts on the control panel
    • High elements:
      • Ontologies.
      • Users.
      • APIs.
      • Dashboards.
      • Digital Clients.
      • Notebooks.
      • Dataflows.
      • Projects.
      • Flows.
      • GIS Viewers.
    • Queries in the Query Too.

Metrics Storage

The TimeSeries ontologies that store the metrics are:

  • MetricsOntology: Metrics for the use of ontologies, with the following structure:

  • MetricsOperation: Digital Broker and API Manager operation metrics:

  • MetricsApi: Operating metrics on the API Manager APIs:

  • MetricsControlPanel: Metrics of elements created on the platform:
  • MetricsQueriesControlPanel: Query metrics made from the QueryTool tool:

Query metrics

To facilitate the query of metrics, the SQL language has been adapted for the previous ontologies:

  • Sentence projection: Accepts two possible values:
    • Select * Returns the values ​​as a time series.
    • Select count(*) Returns the number of occurrences in the selected interval.


  • Sentence selection:
    • You need to always specify a temporary window on which the query is made, on this attribute: TimeSerie.windowType:
      • TimeSerie.windowType = ‘HOURS’ | ‘DAYS’ | ‘MONTHS’
    • You need to specify a time interval with a clause on TimeSerie.timestamp in yyyy-MM-dd'T'HH: mm: ss.000'Z' format. Depending on the window, the TimeSerie.timestamp query clause will take the following format:
      • HOURS: 'yyyy-MM-ddTHH:00:00.000Z’. Specific time (hour) without precision of minutes.
      • DAYS: 'yyyy-MM-ddT00:00:00.000Z’. Specific day without precision of hours.
      • MONTH: 'yyyy-MM-01T00:00:00.000Z’. First day of the month without precision of hours.
    • Optionally, the attributes on which the query is made.


Besides, a processed response is provided to facilitate its interpretation, such as an array of objects, value-timestamp:


Query examples

  • All invocations to APIs in a time interval:
SELECT * FROM MetricsApi  where TimeSerie.windowType='HOURS' and TimeSerie.timestamp >= '2019-08-16T10:00:00.000Z' and TimeSerie.timestamp < '2019-08-16T12:00:00.000Z'


  • Filtering by user
SELECT * FROM MetricsApi  where TimeSerie.windowType='HOURS' and TimeSerie.timestamp >= '2019-08-16T10:00:00.000Z' and TimeSerie.timestamp < '2019-08-16T12:00:00.000Z' and TimeSerie.user = ‘administrator’ 


  • Filtering by user and API:
SELECT * FROM MetricsApi  where TimeSerie.windowType='HOURS' and TimeSerie.timestamp >= '2019-08-16T10:00:00.000Z' and TimeSerie.timestamp < '2019-08-16T12:00:00.000Z' and TimeSerie.user='administrator' and TimeSerie.api='TickeApi'