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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 340fb2c178ee3bf0c32782ba335a46500dbdafd4
4
- data.tar.gz: 327af98c341fdcdfecadfe29ac00716f12fda348
3
+ metadata.gz: 00ac1726f32ed5be4a35c397b1a5ba0993b365bb
4
+ data.tar.gz: 9d18478517d710bd0fce63f56ad9ffed13f03514
5
5
  SHA512:
6
- metadata.gz: d32eb0c5cf9a5c657dab7305490f1f73d2101151670da96822c1581c4de6362fca2109018d1af1cb5dbea081a41145f7aec40d62866f4b4a834201e133d7ce0d
7
- data.tar.gz: bd94a8ea5f20bd18305b1e7a075484fb0287805f425df8df04f469923de74b69db6dab3778918b3aa6c599df1f5b0220780c3f0d1ec86bdb96766d0981b48afb
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
- if something_changed && config[:pgrep] != nil
105
- pid = `pgrep -f "#{config[:pgrep]}"`.split("\n").first.to_i
106
- if pid
107
- log.info("Sending SIGHUP signal to Prometheus at pid #{pid}.")
108
- Process.kill "HUP", pid
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.")
@@ -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.13'
6
+ s.version = '0.0.14'
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.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juho Mäkinen juho.makinen@gmail.com