All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ARMS::ManagedPrometheus

Last Updated:Jul 29, 2024

ALIYUN::ARMS::ManagedPrometheus is used to install a Prometheus instance to monitor a serverless Kubernetes (ASK) cluster or an Elastic Compute Service (ECS) instance.

Syntax

{
  "Type": "ALIYUN::ARMS::ManagedPrometheus",
  "Properties": {
    "VpcId": String,
    "SecurityGroupId": String,
    "VSwitchId": String,
    "ClusterName": String,
    "ClusterType": String,
    "GrafanaInstanceId": String,
    "ClusterId": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

ClusterType

String

Yes

No

The type of the monitoring object.

Valid values:

  • ecs: ECS instance

  • ask: Container Service for Kubernetes (ACK) cluster

SecurityGroupId

String

Yes

No

The ID of the security group to which the ASK cluster or ECS instance belongs.

None.

VpcId

String

Yes

No

The ID of the virtual private cloud (VPC) to which the ASK cluster or ECS instance belongs.

None.

VSwitchId

String

Yes

No

The ID of the vSwitch to which the ASK cluster or ECS instance is connected.

None.

ClusterId

String

No

No

The ID of the ACK cluster.

Example:

cc7a37ee31aea4ed1a059eff8034b****.

ClusterName

String

No

No

The name of the ECS instance.

You must specify this property when ClusterType is set to ecs.

GrafanaInstanceId

String

No

No

The ID of the Grafana workspace with which you want to associate the ASK cluster or ECS instance.

If you leave this property empty or set this property to free, the ASK cluster or ECS instance is associated with the shared version of Grafana.

Return values

Fn::GetAtt

  • VpcId: the ID of the VPC to which the ASK cluster or ECS instance belongs.

  • ClusterType: the type of the monitoring object.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  VpcId:
    Type: String
    Description: The vpc ID of the cluster.
  SecurityGroupId:
    Type: String
    Description: The security group ID of the cluster.
  VSwitchId:
    Type: String
    Description: The vswith ID of the cluster.
  ClusterType:
    Type: String
    Description: The type of the cluster.
    AllowedValues:
      - ecs
    Default: ecs
Resources:
  ManagedPrometheus:
    Type: ALIYUN::ARMS::ManagedPrometheus
    Properties:
      VpcId:
        Ref: VpcId
      SecurityGroupId:
        Ref: SecurityGroupId
      VSwitchId:
        Ref: VSwitchId
      ClusterType:
        Ref: ClusterType
Outputs:
  VpcId:
    Description: The vpc ID of the cluster.
    Value:
      Fn::GetAtt:
        - ManagedPrometheus
        - VpcId
  ClusterType:
    Description: The type of the cluster.
    Value:
      Fn::GetAtt:
        - ManagedPrometheus
        - ClusterType

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "VpcId": {
      "Type": "String",
      "Description": "The vpc ID of the cluster."
    },
    "SecurityGroupId": {
      "Type": "String",
      "Description": "The security group ID of the cluster."
    },
    "VSwitchId": {
      "Type": "String",
      "Description": "The vswith ID of the cluster."
    },
    "ClusterType": {
      "Type": "String",
      "Description": "The type of the cluster.",
      "AllowedValues": [
        "ecs"
      ],
      "Default": "ecs"
    }
  },
  "Resources": {
    "ManagedPrometheus": {
      "Type": "ALIYUN::ARMS::ManagedPrometheus",
      "Properties": {
        "VpcId": {
          "Ref": "VpcId"
        },
        "SecurityGroupId": {
          "Ref": "SecurityGroupId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "ClusterType": {
          "Ref": "ClusterType"
        }
      }
    }
  },
  "Outputs": {
    "VpcId": {
      "Description": "The vpc ID of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "ManagedPrometheus",
          "VpcId"
        ]
      }
    },
    "ClusterType": {
      "Description": "The type of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "ManagedPrometheus",
          "ClusterType"
        ]
      }
    }
  }
}