prometheus-api-client 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 417daaa76204d57bd000be9a56ed9ab8f0ef6f7c
|
|
4
|
+
data.tar.gz: 7880f323f43968220a424d50446763858407c7f1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 177277cb8fa60af5cfd695b4e5582ec492b0312b56c56254eba4b0ef9f793042dbc199a3a4f624c430de1b74ba73c00c153dd8f7a1806d92cae1968381d68d4c
|
|
7
|
+
data.tar.gz: 2bf2797121bb33425b2617ce4c93323f79cbfaea9594bc002dde448c955b444d3a6f4131520bc6c5cad5bc50224c7079e0daadc02f624844a20865b683ebea5c
|
|
@@ -12,6 +12,8 @@ module Prometheus
|
|
|
12
12
|
#
|
|
13
13
|
# @param [Hash] options
|
|
14
14
|
# @option options [String] :url Server base URL.
|
|
15
|
+
# @option options [Hash] :credentials Authentication credentials.
|
|
16
|
+
# @option options [Hash] :options Options used to define connection.
|
|
15
17
|
# @option options [Hash] :params URI query unencoded key/value pairs.
|
|
16
18
|
# @option options [Hash] :headers Unencoded HTTP header key/value pairs.
|
|
17
19
|
# @option options [Hash] :request Request options.
|
|
@@ -57,9 +57,9 @@ module Prometheus
|
|
|
57
57
|
# A client with special labels for container cadvisor metrics
|
|
58
58
|
class Container < CadvisorClient
|
|
59
59
|
def initialize(options = {})
|
|
60
|
-
container_name =
|
|
61
|
-
pod_name =
|
|
62
|
-
namespace =
|
|
60
|
+
container_name = options[:container_name]
|
|
61
|
+
pod_name = options[:pod_name]
|
|
62
|
+
namespace = options[:namespace] || 'default'
|
|
63
63
|
|
|
64
64
|
@labels = "job=\"kubernetes-cadvisor\",namespace=\"#{namespace}\"," \
|
|
65
65
|
"pod_name=\"#{pod_name}\",container_name=\"#{container_name}\""
|
|
@@ -25,6 +25,8 @@ module Prometheus
|
|
|
25
25
|
#
|
|
26
26
|
# @param [Hash] options
|
|
27
27
|
# @option options [String] :url server base URL.
|
|
28
|
+
# @option options [Hash] :credentials Authentication credentials.
|
|
29
|
+
# @option options [Hash] :options Options used to define connection.
|
|
28
30
|
# @option options [Hash] :params URI query unencoded key/value pairs.
|
|
29
31
|
# @option options [Hash] :headers Unencoded HTTP header key/value pairs.
|
|
30
32
|
# @option options [Hash] :request Request options.
|