prometheus-config-builder 0.0.13 → 0.0.14
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 +4 -4
- data/bin/prometheus-config-builder +10 -5
- data/prometheus-config-builder.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 00ac1726f32ed5be4a35c397b1a5ba0993b365bb
|
|
4
|
+
data.tar.gz: 9d18478517d710bd0fce63f56ad9ffed13f03514
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3c99f583f66130768b11528f966a758f87d237afcada49f4b23e62ba49f580599489d73cd0da5993ab24994f0c0e3d159408c169bf132ff1f300ea8c21555868
|
|
7
|
+
data.tar.gz: e3ee4ef2917dd20f869f9b4109d10003de35fc506e853b2f8ea6f254cdeb45e403ff79051849adabadf8ee2e60457e9b5e5972155a9d4bbec9b51bea2203bcba
|
|
@@ -101,12 +101,17 @@ loop do
|
|
|
101
101
|
iteration_count.increment
|
|
102
102
|
|
|
103
103
|
# Send a SIGHUP signal to Prometheus so that it knows to reload config files
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
104
|
+
begin
|
|
105
|
+
if something_changed && config[:pgrep] != nil
|
|
106
|
+
pid = `pgrep -f "#{config[:pgrep]}"`.split("\n").first.to_i
|
|
107
|
+
if pid
|
|
108
|
+
log.info("Sending SIGHUP signal to Prometheus at pid #{pid}.")
|
|
109
|
+
Process.kill "HUP", pid
|
|
110
|
+
end
|
|
109
111
|
end
|
|
112
|
+
rescue Exception => e
|
|
113
|
+
log.warn("Unable to send SIGHUP signal to Prometheus: #{e}")
|
|
114
|
+
puts e.backtrace
|
|
110
115
|
end
|
|
111
116
|
|
|
112
117
|
log.info("Sleeping for #{config[:every]} second and starting then again.")
|