x-dashboards

services:
  service-01: {}
  service-02: {}

x-dashboards:
  all-services:
    Type: cloudwatch
    Services:
      service-01:
        UsePredefinedMetrics: true
      service-02:
        UsePredefinedMetrics: true

Define and create CloudWatch dashboards with predefined template for your services. Future release will allow to create custom dashboards from your own input template.

Examples

Simple dashboard with 2 services metrics
---
# Simple dashboards definition

x-dashboards:
  all-services:
    Type: cloudwatch
    Services:
      app03:
        UsePredefinedMetrics: true
      bignicefamily:
        UsePredefinedMetrics: true

JSON Schema

Model

x-dashboards specification

x-dashboards

x-dashboards specification for ComposeX

type

object

properties

  • Type

type

string

enum

cloudwatch

  • Settings

type

object

properties

  • start

type

string

default

-PT12H

  • Services

type

object

patternProperties

  • ^([a-zA-Z0-9._-]+.)$

type

object

#/definitions/MetricsDef

  • Resources

type

object

patternProperties

  • ^(x-[a-z0-9-_]+)::([a-zA-Z0-9._-]+.)$

type

object

#/definitions/MetricsDef

additionalProperties

False

definitions

  • MetricsDef

Definition

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "id": "x-dashboards",
  "$id": "x-dashboards.spec.json",
  "type": "object",
  "title": "x-dashboards specification",
  "description": "x-dashboards specification for ComposeX",
  "additionalProperties": false,
  "properties": {
    "Type": {
      "type": "string",
      "enum": [
        "cloudwatch"
      ]
    },
    "Settings": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "default": "-PT12H"
        }
      }
    },
    "Services": {
      "type": "object",
      "patternProperties": {
        "^([a-zA-Z0-9._-]+.)$": {
          "type": "object",
          "$ref": "#/definitions/MetricsDef"
        }
      }
    },
    "Resources": {
      "type": "object",
      "patternProperties": {
        "^(x-[a-z0-9-_]+)::([a-zA-Z0-9._-]+.)$": {
          "type": "object",
          "$ref": "#/definitions/MetricsDef"
        }
      }
    }
  },
  "definitions": {
    "MetricsDef": {
      "Metrics": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "UsePredefinedMetrics": {
        "type": "boolean",
        "default": true
      }
    }
  }
}

Test files

You can find the test files here to use as reference for your use-case.