Class: TencentCloud::Tke::V20180525::PrometheusTarget

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

Overview

prometheus一个抓取目标的信息

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url = nil, state = nil, labels = nil, lastscrape = nil, scrapeduration = nil, error = nil) ⇒ PrometheusTarget

Returns a new instance of PrometheusTarget.



16516
16517
16518
16519
16520
16521
16522
16523
# File 'lib/v20180525/models.rb', line 16516

def initialize(url=nil, state=nil, labels=nil, lastscrape=nil, scrapeduration=nil, error=nil)
  @Url = url
  @State = state
  @Labels = labels
  @LastScrape = lastscrape
  @ScrapeDuration = scrapeduration
  @Error = error
end

Instance Attribute Details

#ErrorObject

up = 健康 down = 不健康 unknown = 未知

Parameters:

  • Url:

    抓取目标的URL

  • State:

    target当前状态,当前支持

  • Labels:

    target的元label

  • LastScrape:

    上一次抓取的时间

  • ScrapeDuration:

    上一次抓取的耗时,单位是s

  • Error:

    上一次抓取如果错误,该字段存储错误信息



16514
16515
16516
# File 'lib/v20180525/models.rb', line 16514

def Error
  @Error
end

#LabelsObject

up = 健康 down = 不健康 unknown = 未知

Parameters:

  • Url:

    抓取目标的URL

  • State:

    target当前状态,当前支持

  • Labels:

    target的元label

  • LastScrape:

    上一次抓取的时间

  • ScrapeDuration:

    上一次抓取的耗时,单位是s

  • Error:

    上一次抓取如果错误,该字段存储错误信息



16514
16515
16516
# File 'lib/v20180525/models.rb', line 16514

def Labels
  @Labels
end

#LastScrapeObject

up = 健康 down = 不健康 unknown = 未知

Parameters:

  • Url:

    抓取目标的URL

  • State:

    target当前状态,当前支持

  • Labels:

    target的元label

  • LastScrape:

    上一次抓取的时间

  • ScrapeDuration:

    上一次抓取的耗时,单位是s

  • Error:

    上一次抓取如果错误,该字段存储错误信息



16514
16515
16516
# File 'lib/v20180525/models.rb', line 16514

def LastScrape
  @LastScrape
end

#ScrapeDurationObject

up = 健康 down = 不健康 unknown = 未知

Parameters:

  • Url:

    抓取目标的URL

  • State:

    target当前状态,当前支持

  • Labels:

    target的元label

  • LastScrape:

    上一次抓取的时间

  • ScrapeDuration:

    上一次抓取的耗时,单位是s

  • Error:

    上一次抓取如果错误,该字段存储错误信息



16514
16515
16516
# File 'lib/v20180525/models.rb', line 16514

def ScrapeDuration
  @ScrapeDuration
end

#StateObject

up = 健康 down = 不健康 unknown = 未知

Parameters:

  • Url:

    抓取目标的URL

  • State:

    target当前状态,当前支持

  • Labels:

    target的元label

  • LastScrape:

    上一次抓取的时间

  • ScrapeDuration:

    上一次抓取的耗时,单位是s

  • Error:

    上一次抓取如果错误,该字段存储错误信息



16514
16515
16516
# File 'lib/v20180525/models.rb', line 16514

def State
  @State
end

#UrlObject

up = 健康 down = 不健康 unknown = 未知

Parameters:

  • Url:

    抓取目标的URL

  • State:

    target当前状态,当前支持

  • Labels:

    target的元label

  • LastScrape:

    上一次抓取的时间

  • ScrapeDuration:

    上一次抓取的耗时,单位是s

  • Error:

    上一次抓取如果错误,该字段存储错误信息



16514
16515
16516
# File 'lib/v20180525/models.rb', line 16514

def Url
  @Url
end

Instance Method Details

#deserialize(params) ⇒ Object



16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
# File 'lib/v20180525/models.rb', line 16525

def deserialize(params)
  @Url = params['Url']
  @State = params['State']
  unless params['Labels'].nil?
    @Labels = []
    params['Labels'].each do |i|
      label_tmp = Label.new
      label_tmp.deserialize(i)
      @Labels << label_tmp
    end
  end
  @LastScrape = params['LastScrape']
  @ScrapeDuration = params['ScrapeDuration']
  @Error = params['Error']
end