services.x-prometheus

services.x-prometheus specification

services.x-prometheus

The services.x-prometheus specification for ComposeX

type

object

properties

  • ContainersInsights

type

object

properties

  • EnableCWAgentDebug

Whether or not enable debug mode for the CloudWatch agent

type

boolean

default

False

  • CollectForAppmesh

Automatically adds envoy EMF Processor

type

boolean

  • CollectForJavaJmx

oneOf

#/definitions/ExporterConfig

Automatically adds JavaJMX/Catalina EMF Processor

type

boolean

  • CollectForNginx

oneOf

type

boolean

#/definitions/ExporterConfig

  • AutoAddNginxPrometheusExporter

If true, ECS Compose-X will automatically add nginx-prometheus-exporter sidecar. Requires CollectForNginx or CollectForNginxPlus to be true

type

boolean

default

False

  • CollectForNginxPlus

type

boolean

  • CustomRules

#/definitions/CustomRulesDef

additionalProperties

False

definitions

  • ExporterConfig

type

object

properties

  • ExporterPort

Prometheus Exporter port

type

number

minimum

0

  • ExporterPath

Override path for metrics collection

type

string

pattern

^/[\x00-\x7F]+$

default

/metrics

  • source_labels

List of docker labels to match tne container to scrape for metrics

type

array

items

type

string

  • label_matcher

Regular expression to of values to match the source_labels against

type

string

additionalProperties

False

  • CustomRulesDef

type

array

items

type

object

properties

  • ExporterPort

#/definitions/ExporterConfig/properties/ExporterPort

  • ExporterPath

#/definitions/ExporterConfig/properties/ExporterPath

  • EmfProcessors

type

array

items

#/definitions/EmfProcessorDef

  • EmfProcessorDef

type

object

properties

  • source_labels

type

array

items

type

string

  • label_matcher

type

string

  • dimensions

type

array

items

type

array

items

type

string

  • metric_selectors

type

array

items

type

string

JSON Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "id": "services.x-prometheus",
  "$id": "services.x-prometheus.spec.json",
  "type": "object",
  "title": "services.x-prometheus specification",
  "description": "The services.x-prometheus specification for ComposeX",
  "additionalProperties": false,
  "properties": {
    "ContainersInsights": {
      "type": "object",
      "properties": {
        "EnableCWAgentDebug": {
          "type": "boolean",
          "description": "Whether or not enable debug mode for the CloudWatch agent",
          "default": false
        },
        "CollectForAppmesh": {
          "type": "boolean",
          "description": "Automatically adds envoy EMF Processor"
        },
        "CollectForJavaJmx": {
          "oneOf": [
            {
              "$ref": "#/definitions/ExporterConfig"
            },
            {
              "type": "boolean",
              "description": "Automatically adds JavaJMX/Catalina EMF Processor"
            }
          ]
        },
        "CollectForNginx": {
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "$ref": "#/definitions/ExporterConfig"
            }
          ]
        },
        "AutoAddNginxPrometheusExporter": {
          "type": "boolean",
          "default": false,
          "description": "If true, ECS Compose-X will automatically add nginx-prometheus-exporter sidecar. Requires CollectForNginx or CollectForNginxPlus to be true"
        },
        "CollectForNginxPlus": {
          "type": "boolean"
        },
        "CustomRules": {
          "$ref": "#/definitions/CustomRulesDef"
        }
      }
    }
  },
  "definitions": {
    "ExporterConfig": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "ExporterPort": {
          "type": "number",
          "minimum": 0,
          "description": "Prometheus Exporter port"
        },
        "ExporterPath": {
          "type": "string",
          "description": "Override path for metrics collection",
          "default": "/metrics",
          "pattern": "^/[\\x00-\\x7F]+$"
        },
        "source_labels": {
          "description": "List of docker labels to match tne container to scrape for metrics",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "label_matcher": {
          "type": "string",
          "description": "Regular expression to of values to match the source_labels against"
        }
      }
    },
    "CustomRulesDef": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "EmfProcessors",
          "ExporterPort"
        ],
        "properties": {
          "ExporterPort": {
            "$ref": "#/definitions/ExporterConfig/properties/ExporterPort"
          },
          "ExporterPath": {
            "$ref": "#/definitions/ExporterConfig/properties/ExporterPath"
          },
          "EmfProcessors": {
            "type": "array",
            "items": {
              "$ref": "#/definitions/EmfProcessorDef"
            }
          }
        }
      }
    },
    "EmfProcessorDef": {
      "type": "object",
      "required": [
        "source_labels",
        "dimensions",
        "metric_selectors",
        "label_matcher"
      ],
      "properties": {
        "source_labels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "label_matcher": {
          "type": "string"
        },
        "dimensions": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "metric_selectors": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}