mtr_monitor 1.6.0 → 1.7.0
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +17 -60
- data/lib/mtr_monitor.rb +2 -2
- data/lib/mtr_monitor/log_dna.rb +1 -1
- data/lib/mtr_monitor/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31dda3a31e9496ae66218124ba04e932236adf04
|
4
|
+
data.tar.gz: 0fb97646d625a4286010b192ef6979bc0b0cfe75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16cf294defeea6391e30918da1c1e7cf1519a5175ed6e3adeb29f16e9a554f6f94f7c8bce451434115efe33560c3be56b9a5d815de5ca1db6eb0dbbe4910d294
|
7
|
+
data.tar.gz: 5a40776566d7fb692d93e4bc424aba88b5dda41558d05153143c1a5b94b2b5cf2c5eedacb3a5ff89a3fb5bbda8f04b7725cc49091bc67bc5507f3ef5bfbbbf41
|
data/Gemfile.lock
CHANGED
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
|
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-
|
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
|
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-
|
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
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
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).
|
data/lib/mtr_monitor.rb
CHANGED
@@ -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
|
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
|
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
|
#
|
data/lib/mtr_monitor/log_dna.rb
CHANGED
data/lib/mtr_monitor/version.rb
CHANGED