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.



17855
17856
17857
17858
17859
17860
17861
17862
# File 'lib/v20180525/models.rb', line 17855

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:

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



17853
17854
17855
# File 'lib/v20180525/models.rb', line 17853

def Error
  @Error
end

#LabelsObject

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

Parameters:

  • Url:

    抓取目标的URL

  • State:

    target当前状态,当前支持

  • Labels:

    target的元label

  • LastScrape:

    上一次抓取的时间

  • ScrapeDuration:

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

  • Error:

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



17853
17854
17855
# File 'lib/v20180525/models.rb', line 17853

def Labels
  @Labels
end

#LastScrapeObject

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

Parameters:

  • Url:

    抓取目标的URL

  • State:

    target当前状态,当前支持

  • Labels:

    target的元label

  • LastScrape:

    上一次抓取的时间

  • ScrapeDuration:

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

  • Error:

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



17853
17854
17855
# File 'lib/v20180525/models.rb', line 17853

def LastScrape
  @LastScrape
end

#ScrapeDurationObject

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

Parameters:

  • Url:

    抓取目标的URL

  • State:

    target当前状态,当前支持

  • Labels:

    target的元label

  • LastScrape:

    上一次抓取的时间

  • ScrapeDuration:

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

  • Error:

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



17853
17854
17855
# File 'lib/v20180525/models.rb', line 17853

def ScrapeDuration
  @ScrapeDuration
end

#StateObject

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

Parameters:

  • Url:

    抓取目标的URL

  • State:

    target当前状态,当前支持

  • Labels:

    target的元label

  • LastScrape:

    上一次抓取的时间

  • ScrapeDuration:

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

  • Error:

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



17853
17854
17855
# File 'lib/v20180525/models.rb', line 17853

def State
  @State
end

#UrlObject

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

Parameters:

  • Url:

    抓取目标的URL

  • State:

    target当前状态,当前支持

  • Labels:

    target的元label

  • LastScrape:

    上一次抓取的时间

  • ScrapeDuration:

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

  • Error:

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



17853
17854
17855
# File 'lib/v20180525/models.rb', line 17853

def Url
  @Url
end

Instance Method Details

#deserialize(params) ⇒ Object



17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
# File 'lib/v20180525/models.rb', line 17864

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