mtr_monitor 1.4.4 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/mtr_monitor/{tier1_logger.rb → log_dna.rb} +9 -6
- data/lib/mtr_monitor/version.rb +1 -1
- data/lib/mtr_monitor.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00de5b77c9aec2c650df50c7f1324f2f4c0145cd
|
4
|
+
data.tar.gz: b83d36b66a38108b983d04a8437fda0e33a9563f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ecf3e3b331d642c964afb2ab325037e7972e008b09212d2e8c141a5f96be120ef109e32eb9b418881b743d8fc0be0ae520a7a1a2a24ef35eb42bc25a274c2bb
|
7
|
+
data.tar.gz: 6d5e21a42e1c62d3d1ae79fda623c03868f9cfa35dd7c6c6f70e4eb0eee3c6be806fd7335667f12bb128543b4356ef63b927b9334eea8cd11df8ba42eaa91f2d
|
data/Gemfile.lock
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
module MtrMonitor
|
2
|
-
class
|
2
|
+
class LogDna
|
3
3
|
|
4
4
|
def self.submit(*args)
|
5
5
|
new(*args).submit
|
6
6
|
end
|
7
7
|
|
8
|
-
def initialize(route_name, logdna_ingestion_key, local_log_path, host_ip_address, s3_url, logger)
|
8
|
+
def initialize(route_name, logdna_ingestion_key, local_log_path, host_ip_address, s3_url, hostname, logger)
|
9
9
|
config = {
|
10
10
|
:ip => host_ip_address,
|
11
11
|
:app => "mtr-monitor",
|
@@ -14,6 +14,7 @@ module MtrMonitor
|
|
14
14
|
|
15
15
|
@route_name = route_name
|
16
16
|
@s3_url = s3_url
|
17
|
+
@hostname = hostname
|
17
18
|
|
18
19
|
@mtr_log = File.read(local_log_path)
|
19
20
|
@logdna = Logdna::Ruby.new(logdna_ingestion_key, config)
|
@@ -21,8 +22,10 @@ module MtrMonitor
|
|
21
22
|
end
|
22
23
|
|
23
24
|
def submit
|
24
|
-
|
25
|
-
|
25
|
+
msg = "Route: #{@route_name}, Host: #{@hostname}, Tier1: #{tier1_provider}, s3: #{@s3_url}"
|
26
|
+
|
27
|
+
@logdna.log(@msg)
|
28
|
+
@logger.info("Emitted to LogDNA: #{msg}")
|
26
29
|
end
|
27
30
|
|
28
31
|
private
|
@@ -35,9 +38,9 @@ module MtrMonitor
|
|
35
38
|
elsif @mtr_log.include?("ntt.net")
|
36
39
|
"NTT"
|
37
40
|
elsif @mtr_log.include?("core-backbone.com")
|
38
|
-
"
|
41
|
+
"Core_Backbone"
|
39
42
|
else
|
40
|
-
"Unknown
|
43
|
+
"Unknown"
|
41
44
|
end
|
42
45
|
end
|
43
46
|
|
data/lib/mtr_monitor/version.rb
CHANGED
data/lib/mtr_monitor.rb
CHANGED
@@ -5,7 +5,7 @@ require "logdna"
|
|
5
5
|
require "mtr_monitor/version"
|
6
6
|
require "mtr_monitor/hop"
|
7
7
|
require "mtr_monitor/metrics"
|
8
|
-
require "mtr_monitor/
|
8
|
+
require "mtr_monitor/log_dna"
|
9
9
|
require "mtr_monitor/cleaner"
|
10
10
|
|
11
11
|
module MtrMonitor
|
@@ -71,7 +71,7 @@ module MtrMonitor
|
|
71
71
|
generate_local_report
|
72
72
|
upload_to_s3
|
73
73
|
|
74
|
-
MtrMonitor::
|
74
|
+
MtrMonitor::LogDna.submit(@name, @logdna_ingestion_key, local_log_path, @host_ip_address, s3_url, @hostname, @logger)
|
75
75
|
MtrMonitor::Metrics.submit(local_log_path, @hostname, @name, @logger)
|
76
76
|
end
|
77
77
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mtr_monitor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RenderedText DevOps Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logdna
|
@@ -108,8 +108,8 @@ files:
|
|
108
108
|
- lib/mtr_monitor.rb
|
109
109
|
- lib/mtr_monitor/cleaner.rb
|
110
110
|
- lib/mtr_monitor/hop.rb
|
111
|
+
- lib/mtr_monitor/log_dna.rb
|
111
112
|
- lib/mtr_monitor/metrics.rb
|
112
|
-
- lib/mtr_monitor/tier1_logger.rb
|
113
113
|
- lib/mtr_monitor/version.rb
|
114
114
|
- mtr_monitor.gemspec
|
115
115
|
homepage: https://github.com/renderedtext/mtr-monitor
|