prometheus-config-builder 0.0.15 → 0.0.16

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: 8afb279bd7ee0d2f9e233c0224bef803b9694054
4
- data.tar.gz: 4af2db65c94a80667f8125fd425d5132e627c550
3
+ metadata.gz: 79736d31f0e67d9f52e5984c2f887d38325d1af2
4
+ data.tar.gz: 541b8ee3704b00ff4c6a2a4762ac92002947b2dd
5
5
  SHA512:
6
- metadata.gz: 87e8783a009b784505acaebbacc977b95d70b9785fa603e1d6acb9274743d1a07b1c166ae016863d13094b13e2fbe7f963cb21d8e2debfc3ae237ea53bd595eb
7
- data.tar.gz: c154ff88582bd2270e2f7bb7cbf91fea11c36e5383168580fd87d26d06d9127cfa1445b8889e25f6bf8744724dc735ef8380a069dc45360d20f3cfa8cdafc935
6
+ metadata.gz: 48b24013a8f292a47502785712d1eedba4fbde8dc0b14cf6815a22b9bafea04a31e05237a6495362a3c75b6e46c96368e9c140e90a0ff323ea0e351a63896b2b
7
+ data.tar.gz: 1d89de2b684488ec8aebe7e585998a72f3a6664417f4c0e1d534dd9d1e8c27edc219736f5f570dfacb2e153c1a8b203530e571a341c13dcb669e45fbf1239e11
@@ -52,7 +52,7 @@ if config[:verbose]
52
52
  end
53
53
 
54
54
  abort "You need to set --prometheus-src" if !config[:prometheus_src]
55
- abort "You need to set --dst_dir" if !config[:dst_dir]
55
+ abort "You need to set --dst-dir" if !config[:dst_dir]
56
56
 
57
57
  log = Logger.new(STDOUT)
58
58
  log.level = config[:verbose] ? Logger::DEBUG : Logger::INFO
@@ -104,7 +104,9 @@ loop do
104
104
  # Send a SIGHUP signal to Prometheus so that it knows to reload config files
105
105
  begin
106
106
  if something_changed && config[:pgrep] != nil
107
- pid = `pgrep -f "#{config[:pgrep]}"`.split("\n").first.to_i
107
+ matches = `pgrep -a -f "#{config[:pgrep]}"`.split("\n")
108
+ match = matches.select {|e| !e.include?("prometheus-config-builder")}
109
+ pid = match.first.split(" ").first.to_i
108
110
  if pid
109
111
  log.info("Sending SIGHUP signal to Prometheus at pid #{pid}.")
110
112
  Process.kill "HUP", pid
@@ -217,7 +217,7 @@ module PrometheusConfigBuilder
217
217
  files = []
218
218
  @paths.each do |path|
219
219
  found_files = @discoverer.discover(path)
220
- logger.info("Found #{files.length} files from path #{path}")
220
+ logger.info("Found #{found_files.length} files from path #{path}")
221
221
  files.push(*found_files)
222
222
  end
223
223
 
@@ -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.15'
6
+ s.version = '0.0.16'
7
7
  s.date = Time.now
8
8
 
9
9
  s.summary = %q{Template based config generation}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prometheus-config-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juho Mäkinen juho.makinen@gmail.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-11 00:00:00.000000000 Z
11
+ date: 2019-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  version: '0'
138
138
  requirements: []
139
139
  rubyforge_project:
140
- rubygems_version: 2.5.2
140
+ rubygems_version: 2.5.2.3
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: Template based config generation