mtr_monitor 0.17.1 → 0.17.2

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: fb307030a2d9ee5bdcd196ef001bd576bab4b698
4
- data.tar.gz: 71c1cb484b24c573a1552a615a62fe55ad84ea15
3
+ metadata.gz: 6be33185373ab79b6d011cec548f116de082abad
4
+ data.tar.gz: 93c52fe0da0cc6a194af1ba1843cc16b7f905071
5
5
  SHA512:
6
- metadata.gz: e22a86b7de6544366c657522d5d086044deb044b6a7c3de8478f8cfc7c553ea29fb96444b1af9e209e130c6dd620aae6606f49df447ecd355e2f142315abad51
7
- data.tar.gz: 893e500030cfead414d0d3d4ddf4e7d520245343e392f5f4b80363b5e993a24f7305eb66f5ec9073119bc91134a97a65cab80d1e25c76ebf2fad0a5bf2ac4086
6
+ metadata.gz: 7ac5062855e550a4a151ab961c3b2e4f39540ffc2420409987586728f662ee86370bc5363d5834cbc5769e5445d7285835dc4c8128d0e0469db863d322164733
7
+ data.tar.gz: 2b380ed039b1bd59a9b1252a2feec5f3d6fb46c33eb8f7a6249eb3e4f018ba5f7210f07e0e041463608dda3899a4b2e370ee3cb82a377d036ebea9729ed21d35
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mtr_monitor (0.17.1)
4
+ mtr_monitor (0.17.2)
5
5
  logdna
6
6
  rt-watchman (~> 0.10.0)
7
7
 
@@ -1,3 +1,3 @@
1
1
  module MtrMonitor
2
- VERSION = "0.17.1"
2
+ VERSION = "0.17.2"
3
3
  end
data/lib/mtr_monitor.rb CHANGED
@@ -66,20 +66,32 @@ module MtrMonitor
66
66
  end
67
67
 
68
68
  def emit_provider_to_logdna
69
- telia if File.read(@log_path).include?("telia.net")
70
- gtt if File.read(@log_path).include?("gtt.net")
69
+ mtr_log = File.read(@log_path)
70
+
71
+ if mtr_log.include?("telia.net")
72
+ telia
73
+ elsif mtr_log.include?("gtt.net")
74
+ gtt
75
+ else
76
+ unknown
77
+ end
71
78
  end
72
79
 
73
80
  def telia
74
- @logdna.log("Network provider: Telia")
81
+ @logdna.log("Telia network provider")
75
82
  @logger.info("Network provider: Telia -- Emitted to LogDNA")
76
83
  end
77
84
 
78
85
  def gtt
79
- @logdna.log("Network provider: GTT")
86
+ @logdna.log("GTT network provider")
80
87
  @logger.info("Network provider: GTT -- Emitted to LogDNA")
81
88
  end
82
89
 
90
+ def unknown
91
+ @logdna.log("Unknown network provider ")
92
+ @logger.info("Network provider: Unknown -- Emitted to LogDNA")
93
+ end
94
+
83
95
  def generate_local_report
84
96
  destination = @dig_ip_address ? dig : @domain
85
97
 
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.17.1
4
+ version: 0.17.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - RenderedText DevOps Team