mtr_monitor 0.13.3 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 011e48e8082ba84320bb8cd5fd46accdd903b0a4
4
- data.tar.gz: 258ff5f5ca66c2394d968430f9b0538541b3521f
3
+ metadata.gz: 73a181cc6a8de48749185ba9754fac177d23a521
4
+ data.tar.gz: 69e889ab6f97437fd3af5dc41f04c08175477964
5
5
  SHA512:
6
- metadata.gz: 5321c6d62702880ba38db94ee1cac1df6394417807062334cbc7d14fe157ebaf4a3260993c2f720b12df9b5c488b64763b12c009e27383e1340ddd176500b172
7
- data.tar.gz: a6dc9538ddf761c7ea47427aca2034227ef7d883984113571a6e018c7dd7b06548d3d9f572c983fdb39af3c7d2472f5bea3890a5a0cc645d8f19b9c48e817946
6
+ metadata.gz: cce3af5c5b57ed6788ad004cbdd1601960845c5ea0b3a7c852ea4b1548d2ef9bfe5715d1e03d4c725d078f0ed56c164f727af04b039b95fe935f1c20720e5a5c
7
+ data.tar.gz: b64090ba0a9b55b42dc4ca0c8a8e3179bd54e50e5c59c0148dab07ebc17d717bd6e3f98244a0bf36a95e1ac5b2a92184814e28909ad43981ae81a251d0f92760
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mtr_monitor (0.13.3)
4
+ mtr_monitor (0.14.0)
5
5
  rt-watchman (~> 0.10.0)
6
6
 
7
7
  GEM
data/lib/mtr_monitor.rb CHANGED
@@ -37,12 +37,18 @@ module MtrMonitor
37
37
  @aws_access_key_id = aws_access_key_id
38
38
  @aws_secret_access_key = aws_secret_access_key
39
39
  @mtr_options = mtr_options
40
- @host_ip_address = `dig +short myip.opendns.com @resolver1.opendns.com`.strip.gsub(".", "-")
41
- @hostname = `hostname`.strip.gsub(".", "-")
40
+ @host_ip_address = `dig +short myip.opendns.com @resolver1.opendns.com`.strip
41
+ @hostname = `hostname`.strip
42
42
  @dig_ip_address = dig_ip_address
43
43
  @logger = logger || Logger.new(STDOUT)
44
44
 
45
- path = "#{@name}/#{Time.now.strftime("%Y-%m-%d")}/#{@host_ip_address}/#{Time.now.strftime("%H-%M")}.log"
45
+ path = [
46
+ @name,
47
+ Time.now.strftime("%Y-%m-%d"),
48
+ @host_ip_address.gsub(".", "-"),
49
+ Time.now.strftime("%H-%M"),
50
+ ".log"
51
+ ].join("/")
46
52
 
47
53
  @log_path = "#{MtrMonitor::REPORTS_PATH}/#{path.gsub("/", "-")}"
48
54
  @s3_path = "s3://#{@s3_bucket}/#{path}"
@@ -2,6 +2,8 @@ module MtrMonitor
2
2
  module Metrics
3
3
 
4
4
  def self.submit(log_path, hostname, name, logger)
5
+ hostname = hostname.gsub(".", "-")
6
+
5
7
  logger.info "Submitting pulse: network.mtr.pulse, tags: #{[hostname, name]}, prefix: #{Watchman.prefix} port: #{Watchman.port}"
6
8
 
7
9
  Watchman.submit("network.mtr.pulse", 1, :gauge, :tags => [hostname, name])
@@ -1,3 +1,3 @@
1
1
  module MtrMonitor
2
- VERSION = "0.13.3"
2
+ VERSION = "0.14.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mtr_monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.3
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - RenderedText DevOps Team