checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
---
2
2
SHA1:
3
- metadata.gz: 885a306c8bf9512200d821f865bdd4a31c2b7b50
4
- data.tar.gz: 02f78df9046ba0bd7383425c827cab3a21cf975b
3
+ metadata.gz: 3100ffcfdb9f2ff406342809d5a836b8440c0b7c
4
+ data.tar.gz: 8290a3c9fe7dd20d1f5780617965c04931a624cc
5
5
SHA512:
6
- metadata.gz: 549c90315740515c94b5246aa6d2e8bb72ba1d3ecf30129e6107d9747552db98ed301e5d262f63c3ce07eff191148b5802f94d1d54c6c12c91123919808990b9
7
- data.tar.gz: c73c809f48562396ffa59a42670738a9e82b6a36f7a0e0949518266525c4ee75d3c8e84d2d5b82147cb1420e351f57c012967db5f93a37c886970cee40503295
6
+ metadata.gz: 38e24852f811bb6d7688bf7b8aff118bcd944f7af15be5391232ec91955e8203d13f168fd074944210e51b69400f82b36838e450470f9f309ad917905e3c5145
7
+ data.tar.gz: 80f648e26368dfa50a712e98a8307764f665afa59640e63643512cae372f812e2e5029bc805afcb0d6ea25e31172bbb66d87d0979e6494c9a5b0100564051f29
data/lib/prometheus-config-builder/scrape_ecs.rb CHANGED
@@ -12,7 +12,13 @@ module PrometheusConfigBuilder
12
12
$VERBOSE = nil
13
13
require 'aws-sdk'
14
14
15
- @@ecs = Aws::ECS::Client.new
15
+ if !config["region"]
16
+ logger.warn("File #{basename}: the scrape_configs of type:ecs-tasks doesn't have \"region\" field set. Ignoring!")
17
+ return nil
18
+
19
+ end
20
+
21
+ @@ecs = Aws::ECS::Client.new(region=config["region"])
16
22
$VERBOSE = x
17
23
tasks = get_tasks(config["cluster"], config["service"])
18
24
ips = get_task_ips(config["cluster"], tasks)
@@ -25,7 +31,7 @@ module PrometheusConfigBuilder
25
31
]
26
32
27
33
if !config["name"]
28
- logger.warn("File #{basename}: the scrape_configs of type:ecs-tasks doesn't have name field set. Ignoring!")
34
+ logger.warn("File #{basename}: the scrape_configs of type:ecs-tasks doesn't have \"name\" field set. Ignoring!")
29
35
return nil
30
36
end
31
37
data/prometheus-config-builder.gemspec CHANGED
@@ -3,7 +3,7 @@
3
3
4
4
Gem::Specification.new do |s|
5
5
s.name = 'prometheus-config-builder'
6
- s.version = '0.0.3'
6
+ s.version = '0.0.4'
7
7
s.date = Time.now
8
8
9
9
s.summary = %q{Template based config generation}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
--- !ruby/object:Gem::Specification
2
2
name: prometheus-config-builder
3
3
version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
platform: ruby
6
6
authors:
7
7
- Juho Mäkinen juho.makinen@gmail.com