lib/prometheus/api_client/cadvisor.rb in prometheus-api-client-0.3.3 vs lib/prometheus/api_client/cadvisor.rb in prometheus-api-client-0.3.4
- old
+ new
@@ -55,12 +55,12 @@
end
# A client with special labels for container cadvisor metrics
class Container < CadvisorClient
def initialize(options = {})
- container_name = args[:container_name]
- pod_name = args[:pod_name]
- namespace = args[:namespace] || 'default'
+ container_name = options[:container_name]
+ pod_name = options[:pod_name]
+ namespace = options[:namespace] || 'default'
@labels = "job=\"kubernetes-cadvisor\",namespace=\"#{namespace}\"," \
"pod_name=\"#{pod_name}\",container_name=\"#{container_name}\""
super(options)
end