openapi: 3.0.4 info: title: Calyptia Cloud agent metric API version: '1.0' description: HTTP API service of Calyptia Cloud contact: name: Calyptia email: hello@calyptia.com url: https://cloud.calyptia.com termsOfService: https://calyptia.com/terms/ servers: - url: https://cloud-api.calyptia.com description: prod - url: https://cloud-api-dev.calyptia.com description: dev - url: https://cloud-api-staging.calyptia.com description: staging - url: http://localhost:{port} description: local variables: port: default: '5000' tags: - name: metric paths: /v1/projects/{projectID}/metrics: parameters: - schema: type: string format: uuid name: projectID in: path required: true get: tags: - metric summary: Project metrics deprecated: true operationId: projectMetrics description: 'Contains an overview of the aggregated metrics for a project. It includes metrics link the amount of records, bytes, and errors per plugin.' security: - user: [] - project: [] parameters: - schema: type: string format: duration default: -24h name: start in: query - schema: type: string format: duration default: 1h name: interval in: query responses: '200': description: OK headers: Sunset: schema: type: string example: Tue, 01 Nov 2022 00:00:00 GMT description: RFC1123 date when the endpoint will be removed. content: application/json: schema: $ref: '#/components/schemas/ProjectMetrics' /v1/agents/{agentID}/metrics: parameters: - schema: type: string format: uuid name: agentID in: path required: true get: tags: - metric summary: Agent metrics deprecated: true operationId: agentMetricsV1 description: 'Contains an overview of the aggregated metrics for an agent. It includes metrics link the amount of records, bytes, and errors per plugin.' security: - user: [] - project: [] parameters: - schema: type: string format: duration default: -24h name: start in: query - schema: type: string format: duration default: 1h name: interval in: query responses: '200': description: OK headers: Sunset: schema: type: string example: Tue, 01 Nov 2022 00:00:00 GMT description: RFC1123 date when the endpoint will be removed. content: application/json: schema: $ref: '#/components/schemas/AgentMetrics' /v1/pipeline_metrics/{pipelineID}: parameters: - schema: type: string format: uuid name: pipelineID in: path required: true get: tags: - metric summary: Pipeline metrics deprecated: true operationId: pipelineMetricsV1 description: 'Contains an overview of the aggregated metrics for a pipeline. It includes metrics link the amount of records, bytes, and errors per plugin.' security: - user: [] - project: [] parameters: - schema: type: string format: duration default: -24h name: start in: query - schema: type: string format: duration default: 1h name: interval in: query responses: '200': description: OK headers: Sunset: schema: type: string example: Tue, 01 Nov 2022 00:00:00 GMT description: RFC1123 date when the endpoint will be removed. content: application/json: schema: $ref: '#/components/schemas/AgentMetrics' /v1/aggregator_metrics/{aggregatorID}: parameters: - name: aggregatorID in: path required: true schema: type: string format: uuid get: parameters: - name: start required: false in: query description: 'Option to filter metrics since the given time ago ' schema: type: string format: duration default: -24h - name: interval required: false in: query description: 'Option to set the time window to group metrics ' schema: type: string format: duration default: 1h security: - user: [] - project: [] summary: Core instance metrics deprecated: true operationId: aggregatorMetrics tags: - metric responses: '200': description: OK headers: Sunset: schema: type: string example: Tue, 01 Nov 2022 00:00:00 GMT description: RFC1123 date when the endpoint will be removed. content: application/json: schema: $ref: '#/components/schemas/AggregatorMetrics' /v1/aggregators/{aggregatorID}/pipelines_metrics: parameters: - name: aggregatorID in: path required: true schema: type: string format: uuid get: parameters: - name: start required: false in: query description: 'Option to filter metrics since the given time ago ' schema: type: string format: duration default: -24h - name: interval required: false in: query description: 'Option to set the time window to group metrics ' schema: type: string format: duration default: 1h - name: pipeline_id required: true in: query description: List of pipeline IDs. schema: type: array items: type: string format: uuid security: - user: [] - project: [] summary: Core instance pipelines metrics (bulk) deprecated: true operationId: aggregatorPipelinesMetrics tags: - metric responses: '200': description: OK headers: Sunset: schema: type: string example: Tue, 01 Nov 2022 00:00:00 GMT description: RFC1123 date when the endpoint will be removed. content: application/json: schema: $ref: '#/components/schemas/AggregatorPipelinesMetrics' /v2/core_instances/{coreInstanceID}/metrics: description: 'Metrics for a core instance. ' parameters: - name: coreInstanceID in: path required: true schema: type: string format: uuid get: parameters: - name: start required: false in: query description: 'Option to filter metrics since the given time ago ' schema: type: string format: duration default: -24h security: - user: [] - project: [] summary: Core instance metrics operationId: coreInstanceMetrics tags: - metric responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MetricsSummary' /v2/core_instances/{coreInstanceID}/metrics_by_plugin: description: 'Metrics for a core instance organized by plugin. ' parameters: - name: coreInstanceID in: path required: true schema: type: string format: uuid get: parameters: - name: start required: false in: query description: 'Option to filter metrics since the given time ago ' schema: type: string format: duration default: -24h security: - user: [] - project: [] summary: Core instance metrics by plugin. operationId: coreInstanceMetricsByPlugin tags: - metric responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MetricsByPlugin' /v2/core_instances/{coreInstanceID}/metrics_over_time: description: 'Metrics over time for a core instance. ' parameters: - name: coreInstanceID in: path required: true schema: type: string format: uuid get: parameters: - name: start required: false in: query description: 'Option to filter metrics since the given time ago ' schema: type: string format: duration default: -24h - name: interval required: false in: query description: 'Option to set the time window to group metrics ' schema: type: string format: duration default: 1h security: - user: [] - project: [] summary: Core instance metrics over time operationId: coreInstanceMetricsOverTime tags: - metric responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MetricsOvertime' /v2/core_instances/{coreInstanceID}/metrics_over_time_by_plugin: description: 'Metrics over time for a core instance. ' parameters: - name: coreInstanceID in: path required: true schema: type: string format: uuid get: parameters: - name: start required: false in: query description: 'Option to filter metrics since the given time ago ' schema: type: string format: duration default: -24h - name: interval required: false in: query description: 'Option to set the time window to group metrics ' schema: type: string format: duration default: 1h security: - user: [] - project: [] summary: Core instance metrics over time organized by plugin operationId: coreInstanceMetricsOverTimeByPlugin tags: - metric responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MetricsOverTimeByPlugin' /v2/pipelines/{pipelineID}/metrics: description: 'Metrics for a pipeline. ' parameters: - name: pipelineID in: path required: true schema: type: string format: uuid get: parameters: - name: start required: false in: query description: 'Option to filter metrics since the given time ago ' schema: type: string format: duration default: -24h security: - user: [] - project: [] summary: Pipeline metrics operationId: pipelineMetrics tags: - metric responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MetricsSummary' /v2/pipelines/{pipelineID}/metrics_by_plugin: description: 'Metrics for a pipeline organized by plugin. ' parameters: - name: pipelineID in: path required: true schema: type: string format: uuid get: parameters: - name: start required: false in: query description: 'Option to filter metrics since the given time ago ' schema: type: string format: duration default: -24h security: - user: [] - project: [] summary: Pipeline metrics by plugin. operationId: pipelineMetricsByPlugin tags: - metric responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MetricsByPlugin' /v2/pipelines/{pipelineID}/metrics_over_time: description: 'Metrics over time for a pipeline. ' parameters: - name: pipelineID in: path required: true schema: type: string format: uuid get: parameters: - name: start required: false in: query description: 'Option to filter metrics since the given time ago ' schema: type: string format: duration default: -24h - name: interval required: false in: query description: 'Option to set the time window to group metrics ' schema: type: string format: duration default: 1h security: - user: [] - project: [] summary: Pipeline metrics over time operationId: pipelineMetricsOverTime tags: - metric responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MetricsOvertime' /v2/pipelines/{pipelineID}/metrics_over_time_by_plugin: description: 'Metrics over time for a pipeline. ' parameters: - name: pipelineID in: path required: true schema: type: string format: uuid get: parameters: - name: start required: false in: query description: 'Option to filter metrics since the given time ago ' schema: type: string format: duration default: -24h - name: interval required: false in: query description: 'Option to set the time window to group metrics ' schema: type: string format: duration default: 1h security: - user: [] - project: [] summary: Pipeline metrics over time organized by plugin operationId: pipelineMetricsOverTimeByPlugin tags: - metric responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MetricsOverTimeByPlugin' /v2/agents/{agentID}/metrics: description: 'Metrics for a agent. ' parameters: - name: agentID in: path required: true schema: type: string format: uuid get: parameters: - name: start required: false in: query description: 'Option to filter metrics since the given time ago ' schema: type: string format: duration default: -24h security: - user: [] - project: [] summary: Agent metrics operationId: agentMetrics tags: - metric responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MetricsSummary' /v2/agents/{agentID}/metrics_by_plugin: description: 'Metrics for a agent organized by plugin. ' parameters: - name: agentID in: path required: true schema: type: string format: uuid get: parameters: - name: start required: false in: query description: 'Option to filter metrics since the given time ago ' schema: type: string format: duration default: -24h security: - user: [] - project: [] summary: Agent metrics by plugin. operationId: agentMetricsByPlugin tags: - metric responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MetricsByPlugin' /v2/agents/{agentID}/metrics_over_time: description: 'Metrics over time for a agent. ' parameters: - name: agentID in: path required: true schema: type: string format: uuid get: parameters: - name: start required: false in: query description: 'Option to filter metrics since the given time ago ' schema: type: string format: duration default: -24h - name: interval required: false in: query description: 'Option to set the time window to group metrics ' schema: type: string format: duration default: 1h security: - user: [] - project: [] summary: Agent metrics over time operationId: agentMetricsOverTime tags: - metric responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MetricsOvertime' /v2/agents/{agentID}/metrics_over_time_by_plugin: description: 'Metrics over time for a agent. ' parameters: - name: agentID in: path required: true schema: type: string format: uuid get: parameters: - name: start required: false in: query description: 'Option to filter metrics since the given time ago ' schema: type: string format: duration default: -24h - name: interval required: false in: query description: 'Option to set the time window to group metrics ' schema: type: string format: duration default: 1h security: - user: [] - project: [] summary: Agent metrics over time organized by plugin operationId: agentMetricsOverTimeByPlugin tags: - metric responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MetricsOverTimeByPlugin' components: schemas: FilterMetrics: type: object properties: records: type: number format: float nullable: true default: null bytes: type: number format: float nullable: true default: null addRecords: type: number format: float nullable: true default: null dropRecords: type: number format: float nullable: true default: null emitRecords: type: number format: float nullable: true default: null Metrics: type: object description: Metrics model. properties: metrics: type: object additionalProperties: type: array items: $ref: '#/components/schemas/MetricFields' required: - metrics AggregatorMetrics: type: object description: Agent metrics model. properties: measurements: type: object additionalProperties: type: object properties: metrics: type: object additionalProperties: type: array items: $ref: '#/components/schemas/MetricFields' totals: type: object additionalProperties: type: array items: $ref: '#/components/schemas/MetricFields' required: - metrics - totals required: - measurements example: "{\n \"measurements\": {\n \"fluentbit_filter\": {\n \"metrics\": {\n \"drop_records\": [\n {\n \"time\": \"2022-02-07T11:00:00Z\",\n \"value\": 0\n },\n {\n \"time\": \"2022-02-07T12:00:00Z\",\n \"value\": 0\n },\n {\n \"time\": \"2022-02-07T12:55:20.003028413Z\",\n \"value\": 119\n }\n ],\n \"emit_records\": [\n {\n \"time\": \"2022-02-07T11:00:00Z\",\n \"value\": 0\n },\n {\n \"time\": \"2022-02-07T12:00:00Z\",\n \"value\": 0\n },\n {\n \"time\": \"2022-02-07T12:55:20.003028413Z\",\n \"value\": 119\n }\n ]\n },\n \"totals\": {\n \"drop_records\": [\n {\n \"time\": \"2022-02-07T12:55:04.78743322Z\",\n \"value\": 119\n }\n ],\n \"emit_records\": [\n {\n \"time\": \"2022-02-07T12:55:04.787434277Z\",\n \"value\": 119\n }\n ]\n }\n },\n \"fluentbit_input\": {\n \"metrics\": {\n \"bytes\": [\n {\n \"time\": \"2022-02-07T11:00:00Z\",\n \"value\": 0\n },\n {\n \"time\": \"2022-02-07T12:00:00Z\",\n \"value\": 0\n },\n {\n \"time\": \"2022-02-07T12:55:20.029124832Z\",\n \"value\": 4760\n }\n ],\n \"records\": [\n {\n \"time\": \"2022-02-07T11:00:00Z\",\n \"value\": 0\n },\n {\n \"time\": \"2022-02-07T12:00:00Z\",\n \"value\": 0\n },\n {\n \"time\": \"2022-02-07T12:55:20.029124832Z\",\n \"value\": 119\n }\n ]\n },\n \"totals\": {\n \"bytes\": [\n {\n \"time\": \"2022-02-07T12:55:04.787450155Z\",\n \"value\": 4760\n }\n ],\n \"records\": [\n {\n \"time\": \"2022-02-07T12:55:04.787450155Z\",\n \"value\": 119\n }\n ]\n }\n },\n \"fluentbit_output\": {\n \"metrics\": {\n \"bytes\": [\n {\n \"time\": \"2022-02-07T11:00:00Z\",\n \"value\": 0\n },\n {\n \"time\": \"2022-02-07T12:00:00Z\",\n \"value\": 0\n },\n {\n \"time\": \"2022-02-07T12:55:20.059227599Z\",\n \"value\": 4560\n }\n ],\n \"records\": [\n {\n \"time\": \"2022-02-07T11:00:00Z\",\n \"value\": 0\n },\n {\n \"time\": \"2022-02-07T12:00:00Z\",\n \"value\": 0\n },\n {\n \"time\": \"2022-02-07T12:55:20.059227599Z\",\n \"value\": 114\n }\n ]\n },\n \"totals\": {\n \"bytes\": [\n {\n \"time\": \"2022-02-07T12:55:00.785234434Z\",\n \"value\": 4560\n }\n ],\n \"records\": [\n {\n \"time\": \"2022-02-07T12:55:00.785234434Z\",\n \"value\": 114\n }\n ]\n }\n }\n }\n}\n" MetricsOverTimeByPluginOutput: type: object properties: instance: type: string example: storage_backlog.3 description: plugin alias metrics: $ref: '#/components/schemas/MetricsOverTimeInput' required: - instance - metrics MetricsSummary: type: object properties: input: $ref: '#/components/schemas/InputMetrics' output: $ref: '#/components/schemas/OutputMetrics' filter: $ref: '#/components/schemas/FilterMetrics' example: "{\n \"input\": {\n \"bytes\": 0,\n \"records\": 0\n }\n },\n \"outputs\": {\n \"bytes\": 0,\n \"records\": 0,\n \"errors\": 0,\n \"retries\": 0,\n \"retriedRecords\": 0,\n \"retriesFailed\": 0,\n \"droppedRecords\": 0,\n \"loads\": 0\n }\n },\n \"filters\": {\n \"dropRecords\": 0,\n \"emitRecords\": 0\n }\n }\n}\n" MetricsOverTimeByPluginInput: type: object properties: instance: type: string example: storage_backlog.3 description: plugin alias metrics: $ref: '#/components/schemas/MetricsOverTimeInput' required: - instance - metrics ProjectMetrics: type: object description: Project metrics model. properties: measurements: type: object additionalProperties: type: object properties: totals: type: object additionalProperties: type: number format: float nullable: true default: null plugins: type: object additionalProperties: $ref: '#/components/schemas/Metrics' required: - totals - plugins topPlugins: type: object additionalProperties: type: object additionalProperties: type: number format: float nullable: true default: null required: - measurements - topPlugins MetricsOverTimeByPlugin: type: object properties: inputs: type: array items: $ref: '#/components/schemas/MetricsOverTimeByPluginInput' filters: type: array items: $ref: '#/components/schemas/MetricsOverTimeByPluginFilter' outputs: type: array items: $ref: '#/components/schemas/MetricsOverTimeByPluginOutput' required: - inputs - filters - outputs InputMetrics: type: object properties: bytes: type: number format: float nullable: true default: null records: type: number format: float nullable: true default: null AgentMetrics: type: object description: Agent metrics model. properties: measurements: type: object additionalProperties: type: object properties: plugins: type: object additionalProperties: $ref: '#/components/schemas/Metrics' totals: type: object additionalProperties: type: array items: $ref: '#/components/schemas/MetricFields' required: - plugins - totals required: - measurements AggregatorPipelinesMetrics: type: object description: Map of metrics/error for each pipeline ID. additionalProperties: type: object properties: data: $ref: '#/components/schemas/AgentMetrics' error: type: string nullable: true default: null required: - data - error MetricsByPlugin: type: object properties: inputs: type: array items: type: object properties: instance: type: string example: storage_backlog.3 description: plugin alias metrics: $ref: '#/components/schemas/InputMetrics' outputs: type: array items: type: object properties: instance: type: string example: storage_backlog.3 description: plugin alias metrics: $ref: '#/components/schemas/OutputMetrics' filters: type: array items: type: object properties: instance: type: string example: filter.3 description: plugin alias metrics: $ref: '#/components/schemas/FilterMetrics' example: "{\n \"inputs\": [\n {\n \"instance\": \"storage_backlog.3\",\n \"metrics\": {\n \"bytes\": 0,\n \"records\": 0\n }\n }\n ],\n \"outputs\": [\n {\n \"instance\": \"stdout.0\",\n \"metrics\": {\n \"bytes\": 5811996,\n \"records\": 25697,\n \"errors\": 0,\n \"retries\": 0,\n \"retriedRecords\": 0,\n \"retriesFailed\": 0,\n \"droppedRecords\": 0,\n \"loads\": 0\n }\n }\n ],\n \"filters\": [\n {\n \"instance\": \"filter.3\",\n \"metrics\": {\n \"dropRecords\": 0,\n \"emitRecords\": 0\n }\n }\n ]\n}\n" MetricFields: type: object description: Metric fields model. properties: time: type: string format: date-time value: type: number format: float nullable: true default: null required: - time - value MetricsOverTimeOutput: type: object properties: bytes: type: array items: $ref: '#/components/schemas/MetricOverTime' records: type: array items: $ref: '#/components/schemas/MetricOverTime' errors: type: array items: $ref: '#/components/schemas/MetricOverTime' retries: type: array items: $ref: '#/components/schemas/MetricOverTime' retriedRecords: type: array items: $ref: '#/components/schemas/MetricOverTime' retriesFailed: type: array items: $ref: '#/components/schemas/MetricOverTime' droppedRecords: type: array items: $ref: '#/components/schemas/MetricOverTime' loads: deprecated: true type: array items: $ref: '#/components/schemas/MetricOverTime' required: - bytes - records - errors - retries - retriedRecords - retriesFailed - droppedRecords - loads OutputMetrics: type: object properties: bytes: type: number format: float nullable: true default: null records: type: number format: float nullable: true default: null errors: type: number format: float nullable: true default: null retries: type: number format: float nullable: true default: null retriedRecords: type: number format: float nullable: true default: null retriesFailed: type: number format: float nullable: true default: null droppedRecords: type: number format: float nullable: true default: null loads: type: number format: float nullable: true default: null deprecated: true MetricsOvertime: type: object properties: input: $ref: '#/components/schemas/MetricsOverTimeInput' filter: $ref: '#/components/schemas/MetricsOverTimeFilter' output: $ref: '#/components/schemas/MetricsOverTimeOutput' required: - input - filter - output MetricsOverTimeInput: type: object properties: bytes: type: array items: $ref: '#/components/schemas/MetricOverTime' records: type: array items: $ref: '#/components/schemas/MetricOverTime' required: - bytes - records MetricOverTime: type: object properties: time: type: string format: date-time value: type: number format: float nullable: true default: null required: - time - value MetricsOverTimeByPluginFilter: type: object properties: instance: type: string example: storage_backlog.3 description: plugin alias metrics: $ref: '#/components/schemas/MetricsOverTimeInput' required: - instance - metrics MetricsOverTimeFilter: type: object properties: bytes: type: array items: $ref: '#/components/schemas/MetricOverTime' records: type: array items: $ref: '#/components/schemas/MetricOverTime' addRecords: type: array items: $ref: '#/components/schemas/MetricOverTime' dropRecords: type: array items: $ref: '#/components/schemas/MetricOverTime' emitRecords: type: array items: $ref: '#/components/schemas/MetricOverTime' required: - bytes - records - addRecords - dropRecords - emitRecords securitySchemes: user: type: http scheme: bearer project: name: X-Project-Token type: apiKey in: header auth0: type: oauth2 flows: clientCredentials: tokenUrl: https://sso.calyptia.com/oauth/token scopes: {} authorizationCode: authorizationUrl: https://sso.calyptia.com/authorize tokenUrl: https://sso.calyptia.com/oauth/token scopes: {}