mtr_monitor 1.6.0 → 1.7.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: 8555d4d1ae506bf14ca52ab2d2b92a150f4f0ddb
4
- data.tar.gz: 5ded34a1836573fc3e00168241d55a6c20352dd1
3
+ metadata.gz: 31dda3a31e9496ae66218124ba04e932236adf04
4
+ data.tar.gz: 0fb97646d625a4286010b192ef6979bc0b0cfe75
5
5
  SHA512:
6
- metadata.gz: 8c308f8c4135547bc712bda2cbc1f6466849493ef8d557794052b3c3e58a61624d33d72881584c9e43cfb8a11fc87819a12a76ea1f900ef2725f480af8bce4e8
7
- data.tar.gz: 2cf7a1b0d52db3c25fb5a1f7a4ba0af7e158643b5e2444ed1ecc2e6cbe3d3ec5d5e1ad2e0ca0e708a6f2043da5fcbe3ea94ec5c529e0d3d9c5b067c21a966631
6
+ metadata.gz: 16cf294defeea6391e30918da1c1e7cf1519a5175ed6e3adeb29f16e9a554f6f94f7c8bce451434115efe33560c3be56b9a5d815de5ca1db6eb0dbbe4910d294
7
+ data.tar.gz: 5a40776566d7fb692d93e4bc424aba88b5dda41558d05153143c1a5b94b2b5cf2c5eedacb3a5ff89a3fb5bbda8f04b7725cc49091bc67bc5507f3ef5bfbbbf41
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mtr_monitor (1.6.0)
4
+ mtr_monitor (1.7.0)
5
5
  logdna
6
6
  rt-watchman (~> 0.10.0)
7
7
 
data/README.md CHANGED
@@ -64,25 +64,25 @@ Local reports on the machine are located in the `/var/log/mtr` directory, and
64
64
  the following structure:
65
65
 
66
66
  ``` txt
67
- /var/log/mtr/<name>-<YYYY-DD-MM>-<host-ip-address>-<target-ip-address>-<HH-MM>.log
67
+ /var/log/mtr/<name>__<YYYY-DD-MM-HH-MM>__<host-ip-address>_to_<target-ip-address>.txt
68
68
  ```
69
69
 
70
70
  For example, if you call your report `hetzner-to-us-east-1` and run it at
71
71
  `2017-12-18 12:33:06`, the log will be generated in:
72
72
 
73
73
  ``` txt
74
- /var/log/mtr/hetzner-to-us-east-1-2017-12-18-142-21-43-11-138-21-32-191-12-33.log
74
+ /var/log/mtr/hetzner-to-us-east-1__2017-12-18-12-33__142-21-43-11_to_138-21-32-191.txt
75
75
  ```
76
76
 
77
77
  On S3, the path will follow the same convention, but will use a nested directory
78
78
  structure:
79
79
 
80
80
  ``` txt
81
- s3://<bucket-name>/<name>/<YYYY-DD-MM>/<host-ip-address>/<target-ip-address>/<HH-MM>.log
81
+ s3://<bucket-name>/<name>/<YYYY-DD-MM-HH-MM>/<host-ip-address>_to_<target-ip-address>.txt
82
82
  ```
83
83
 
84
84
  ``` txt
85
- s3://<bucket-name>/hetzner-to-us-east-1/2017-12-18/142-21-43-11/138-21-32-191/12-33.log
85
+ s3://<bucket-name>/hetzner-to-us-east-1/2017-12-18-12-33/142-21-43-11_to_138-21-32-191.txt
86
86
  ```
87
87
 
88
88
  ## Report Name
@@ -125,13 +125,19 @@ s3_bucket = "my-private-bucket-name" # change this
125
125
  aws_access_key_id = "<KEY>"
126
126
  aws_secret_access_key = "<KEY>"
127
127
 
128
- report = MtrMonitor::Report.new(name,
129
- domain,
130
- s3_bucket,
131
- aws_access_key_id,
132
- aws_secret_access_key)
133
-
134
- report.generate
128
+ options = {
129
+ :name => name,
130
+ :mtr_target => mtr_target,
131
+ :s3_bucket => s3_bucket,
132
+ :mtr_options => mtr_options,
133
+ :aws_access_key_id => aws_access_key_id,
134
+ :aws_secret_access_key => aws_secret_access_key,
135
+ :dig_ip_address => dig_ip_address,
136
+ :logdna_ingestion_key => logdna_ingestion_key,
137
+ :logger => logger
138
+ }
139
+
140
+ MtrMonitor::Report.new(options).generate
135
141
  ```
136
142
 
137
143
  This above snippet will :
@@ -200,52 +206,3 @@ information read the code in `lib/mtr_monitor/metrics.rb`.
200
206
  This is deployed as a docker-compose group of docker images. One docker images
201
207
  generates the MTR reports, while the other onw exposes an nginx server that
202
208
  responsd yes to incomming requests.
203
-
204
- ### MTR incident tracing
205
-
206
- To trace the incident when it occurs, the `mtr_monitor` contains the executable which
207
- comes out of the box with the gem.
208
-
209
- 1. Make sure you have `mtr_monitor` gem installed:
210
- ```
211
- gem install mtr_monitor
212
- ```
213
-
214
- and `~/.aws/credentials` set up.
215
-
216
- 2. Run executable:
217
- ```
218
- `mtr-incident-trace`
219
- ```
220
-
221
- The executable will collect latest MTR logs from S3 bucket and create the report
222
- with the following format:
223
-
224
- ```
225
- 1. AWS us-east
226
- 1.1 US => DE
227
- --links
228
-
229
- 1.2 DE => US
230
- --links
231
-
232
- 2. AWS us-west
233
- 2.1 US => DE
234
- --links
235
-
236
- 2.2 DE => US
237
- --links
238
- -
239
-
240
- 3. GitHub (San Francisco)
241
- 3.1 US => DE (Only GitHub can provide this)
242
-
243
- 3.2 DE => US
244
- --links
245
- ```
246
-
247
- ### Tier 1 provider info
248
-
249
- The information of the network provider on which we are running on is
250
- continuously emitted to
251
- [LogDNA](https://app.logdna.com/5691b7bf97/logs/dashboard).
@@ -12,10 +12,10 @@ module MtrMonitor
12
12
 
13
13
  #
14
14
  # MtrMonitor generates a MTR report for a domain and saves the report to:
15
- # /var/log/mtr/<name>-<YYYY-DD-MM>-<host-ip-address>-<HH-MM>.log
15
+ # /var/log/mtr/<name>__<YYYY-DD-MM-HH-MM>__<host-ip-address>_to_<target-ip-address>.txt
16
16
  #
17
17
  # After that, it uploads the report to S3:
18
- # s3://<bucket-name>/<name>/<YYYY-DD-MM>/<host-ip-address>/<target-ip-address>/<HH-MM>.txt
18
+ # s3://<bucket-name>/<name>/<YYYY-DD-MM-HH-MM>/<host-ip-address>_to_<target-ip-address>.txt
19
19
  #
20
20
  # Parameters:
21
21
  #
@@ -24,7 +24,7 @@ module MtrMonitor
24
24
  def submit
25
25
  msg = "Route: #{@route_name}, Host: #{@hostname}, Tier1: #{tier1_provider}, s3: #{@s3_url}"
26
26
 
27
- @logdna.log(@msg)
27
+ @logdna.log(msg)
28
28
  @logger.info("Emitted to LogDNA: #{msg}")
29
29
  end
30
30
 
@@ -1,3 +1,3 @@
1
1
  module MtrMonitor
2
- VERSION = "1.6.0"
2
+ VERSION = "1.7.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: 1.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - RenderedText DevOps Team