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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79736d31f0e67d9f52e5984c2f887d38325d1af2
|
4
|
+
data.tar.gz: 541b8ee3704b00ff4c6a2a4762ac92002947b2dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 --
|
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
|
-
|
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 #{
|
220
|
+
logger.info("Found #{found_files.length} files from path #{path}")
|
221
221
|
files.push(*found_files)
|
222
222
|
end
|
223
223
|
|
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.
|
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-
|
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
|