全部产品
Search
文档中心

资源编排:DATASOURCE::ARMS::PrometheusUrl

更新时间:Sep 18, 2024

DATASOURCE::ARMS::PrometheusUrl类型用于获取集群所有地址。包括远程读写地址、Push Gateway地址、Grafana地址。

语法

{
  "Type": "DATASOURCE::ARMS::PrometheusUrl",
  "Properties": {
    "ClusterId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ClusterId

String

集群ID。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

Fn::GetAtt

  • InternetPushGatewayUrl:公网pushgateway地址

  • InternetGrafanaUrl:公网grafana数据源地址

  • ClusterId:集群ID。

  • InternetRemoteWriteUrl:公网远程写地址。

  • Token:返回Token信息。

  • ClusterType:集群类型。

  • RemoteWriteUrl:内网远程写地址

  • GrafanaUrl:内网grafana数据源地址

  • RemoteReadUrl:内网远程读地址

  • PushGatewayUrl:内网pushgateway地址。

  • OpenTelemetryUrl:内部OpenTelemetry地址。

  • InternetOpenTelemetryUrl:公网OpenTelemetry地址。

  • InternetRemoteReadUrl:公网远程读地址

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ClusterId:
    Description:
      en: Cluster ID.
    Required: false
    Type: String
Resources:
  PrometheusUrl:
    Properties:
      ClusterId:
        Ref: ClusterId
    Type: DATASOURCE::ARMS::PrometheusUrl
Outputs:
  ClusterId:
    Description: Cluster ID.
    Value:
      Fn::GetAtt:
      - PrometheusUrl
      - ClusterId
  ClusterType:
    Description: Cluster type.
    Value:
      Fn::GetAtt:
      - PrometheusUrl
      - ClusterType
  GrafanaUrl:
    Description: Internal HTTP API URL (Grafana read URL).
    Value:
      Fn::GetAtt:
      - PrometheusUrl
      - GrafanaUrl
  InternetGrafanaUrl:
    Description: Internet HTTP API URL (Grafana read URL).
    Value:
      Fn::GetAtt:
      - PrometheusUrl
      - InternetGrafanaUrl
  InternetOpenTelemetryUrl:
    Description: Internet OpenTelemetry URL.
    Value:
      Fn::GetAtt:
      - PrometheusUrl
      - InternetOpenTelemetryUrl
  InternetPushGatewayUrl:
    Description: Internet push gateway URL.
    Value:
      Fn::GetAtt:
      - PrometheusUrl
      - InternetPushGatewayUrl
  InternetRemoteReadUrl:
    Description: Internet remote read URL.
    Value:
      Fn::GetAtt:
      - PrometheusUrl
      - InternetRemoteReadUrl
  InternetRemoteWriteUrl:
    Description: Internet remote write URL.
    Value:
      Fn::GetAtt:
      - PrometheusUrl
      - InternetRemoteWriteUrl
  OpenTelemetryUrl:
    Description: Internal OpenTelemetry URL.
    Value:
      Fn::GetAtt:
      - PrometheusUrl
      - OpenTelemetryUrl
  PushGatewayUrl:
    Description: Internal push gateway URL.
    Value:
      Fn::GetAtt:
      - PrometheusUrl
      - PushGatewayUrl
  RemoteReadUrl:
    Description: Internal remote read URL.
    Value:
      Fn::GetAtt:
      - PrometheusUrl
      - RemoteReadUrl
  RemoteWriteUrl:
    Description: Internal remote write URL.
    Value:
      Fn::GetAtt:
      - PrometheusUrl
      - RemoteWriteUrl
  Token:
    Description: The token for Grafana read URL.
    Value:
      Fn::GetAtt:
      - PrometheusUrl
      - Token
                        

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ClusterId": {
      "Type": "String",
      "Description": {
        "en": "Cluster ID."
      },
      "Required": false
    }
  },
  "Resources": {
    "PrometheusUrl": {
      "Type": "DATASOURCE::ARMS::PrometheusUrl",
      "Properties": {
        "ClusterId": {
          "Ref": "ClusterId"
        }
      }
    }
  },
  "Outputs": {
    "InternetPushGatewayUrl": {
      "Description": "Internet push gateway URL.",
      "Value": {
        "Fn::GetAtt": [
          "PrometheusUrl",
          "InternetPushGatewayUrl"
        ]
      }
    },
    "InternetGrafanaUrl": {
      "Description": "Internet HTTP API URL (Grafana read URL).",
      "Value": {
        "Fn::GetAtt": [
          "PrometheusUrl",
          "InternetGrafanaUrl"
        ]
      }
    },
    "ClusterId": {
      "Description": "Cluster ID.",
      "Value": {
        "Fn::GetAtt": [
          "PrometheusUrl",
          "ClusterId"
        ]
      }
    },
    "InternetRemoteWriteUrl": {
      "Description": "Internet remote write URL.",
      "Value": {
        "Fn::GetAtt": [
          "PrometheusUrl",
          "InternetRemoteWriteUrl"
        ]
      }
    },
    "Token": {
      "Description": "The token for Grafana read URL.",
      "Value": {
        "Fn::GetAtt": [
          "PrometheusUrl",
          "Token"
        ]
      }
    },
    "ClusterType": {
      "Description": "Cluster type.",
      "Value": {
        "Fn::GetAtt": [
          "PrometheusUrl",
          "ClusterType"
        ]
      }
    },
    "RemoteWriteUrl": {
      "Description": "Internal remote write URL.",
      "Value": {
        "Fn::GetAtt": [
          "PrometheusUrl",
          "RemoteWriteUrl"
        ]
      }
    },
    "GrafanaUrl": {
      "Description": "Internal HTTP API URL (Grafana read URL).",
      "Value": {
        "Fn::GetAtt": [
          "PrometheusUrl",
          "GrafanaUrl"
        ]
      }
    },
    "RemoteReadUrl": {
      "Description": "Internal remote read URL.",
      "Value": {
        "Fn::GetAtt": [
          "PrometheusUrl",
          "RemoteReadUrl"
        ]
      }
    },
    "PushGatewayUrl": {
      "Description": "Internal push gateway URL.",
      "Value": {
        "Fn::GetAtt": [
          "PrometheusUrl",
          "PushGatewayUrl"
        ]
      }
    },
    "OpenTelemetryUrl": {
      "Description": "Internal OpenTelemetry URL.",
      "Value": {
        "Fn::GetAtt": [
          "PrometheusUrl",
          "OpenTelemetryUrl"
        ]
      }
    },
    "InternetOpenTelemetryUrl": {
      "Description": "Internet OpenTelemetry URL.",
      "Value": {
        "Fn::GetAtt": [
          "PrometheusUrl",
          "InternetOpenTelemetryUrl"
        ]
      }
    },
    "InternetRemoteReadUrl": {
      "Description": "Internet remote read URL.",
      "Value": {
        "Fn::GetAtt": [
          "PrometheusUrl",
          "InternetRemoteReadUrl"
        ]
      }
    }
  }
}