Class: TencentCloud::Monitor::V20180724::PrometheusAlertCustomReceiver

Inherits:
Common::AbstractModel
  • Object
show all
Defined in:
lib/v20180724/models.rb

Overview

Prometheus告警自定义通知模板

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type = nil, url = nil, allowedtimeranges = nil, clusterid = nil, clustertype = nil) ⇒ PrometheusAlertCustomReceiver

Returns a new instance of PrometheusAlertCustomReceiver.



12907
12908
12909
12910
12911
12912
12913
# File 'lib/v20180724/models.rb', line 12907

def initialize(type=nil, url=nil, allowedtimeranges=nil, clusterid=nil, clustertype=nil)
  @Type = type
  @Url = url
  @AllowedTimeRanges = allowedtimeranges
  @ClusterId = clusterid
  @ClusterType = clustertype
end

Instance Attribute Details

#AllowedTimeRangesObject

alertmanager -- vpc内自建alertmanager webhook -- vpc内webhook地址 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Type:

    自定义通知类型

  • Url:

    alertmanager/webhook地址。(prometheus实例同vpc内ip)

  • AllowedTimeRanges:

    允许发送告警的时间范围

  • ClusterId:

    alertmanager所在的内网集群ID

  • ClusterType:

    alertmanager所在的内网集群类型(tke/eks/tdcc)



12905
12906
12907
# File 'lib/v20180724/models.rb', line 12905

def AllowedTimeRanges
  @AllowedTimeRanges
end

#ClusterIdObject

alertmanager -- vpc内自建alertmanager webhook -- vpc内webhook地址 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Type:

    自定义通知类型

  • Url:

    alertmanager/webhook地址。(prometheus实例同vpc内ip)

  • AllowedTimeRanges:

    允许发送告警的时间范围

  • ClusterId:

    alertmanager所在的内网集群ID

  • ClusterType:

    alertmanager所在的内网集群类型(tke/eks/tdcc)



12905
12906
12907
# File 'lib/v20180724/models.rb', line 12905

def ClusterId
  @ClusterId
end

#ClusterTypeObject

alertmanager -- vpc内自建alertmanager webhook -- vpc内webhook地址 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Type:

    自定义通知类型

  • Url:

    alertmanager/webhook地址。(prometheus实例同vpc内ip)

  • AllowedTimeRanges:

    允许发送告警的时间范围

  • ClusterId:

    alertmanager所在的内网集群ID

  • ClusterType:

    alertmanager所在的内网集群类型(tke/eks/tdcc)



12905
12906
12907
# File 'lib/v20180724/models.rb', line 12905

def ClusterType
  @ClusterType
end

#TypeObject

alertmanager -- vpc内自建alertmanager webhook -- vpc内webhook地址 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Type:

    自定义通知类型

  • Url:

    alertmanager/webhook地址。(prometheus实例同vpc内ip)

  • AllowedTimeRanges:

    允许发送告警的时间范围

  • ClusterId:

    alertmanager所在的内网集群ID

  • ClusterType:

    alertmanager所在的内网集群类型(tke/eks/tdcc)



12905
12906
12907
# File 'lib/v20180724/models.rb', line 12905

def Type
  @Type
end

#UrlObject

alertmanager -- vpc内自建alertmanager webhook -- vpc内webhook地址 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Type:

    自定义通知类型

  • Url:

    alertmanager/webhook地址。(prometheus实例同vpc内ip)

  • AllowedTimeRanges:

    允许发送告警的时间范围

  • ClusterId:

    alertmanager所在的内网集群ID

  • ClusterType:

    alertmanager所在的内网集群类型(tke/eks/tdcc)



12905
12906
12907
# File 'lib/v20180724/models.rb', line 12905

def Url
  @Url
end

Instance Method Details

#deserialize(params) ⇒ Object



12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
# File 'lib/v20180724/models.rb', line 12915

def deserialize(params)
  @Type = params['Type']
  @Url = params['Url']
  unless params['AllowedTimeRanges'].nil?
    @AllowedTimeRanges = []
    params['AllowedTimeRanges'].each do |i|
      prometheusalertallowtimerange_tmp = PrometheusAlertAllowTimeRange.new
      prometheusalertallowtimerange_tmp.deserialize(i)
      @AllowedTimeRanges << prometheusalertallowtimerange_tmp
    end
  end
  @ClusterId = params['ClusterId']
  @ClusterType = params['ClusterType']
end