mtr_monitor 1.2.0 → 1.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e24f6a6de20be1a5ca35e3d1ecad95ed885943a
4
- data.tar.gz: 6aebd42acd07f506c065adbfd7bebbd47b4e02f5
3
+ metadata.gz: 9c1ae91ed9bd4cc5cdace5a8e2e348a80138401e
4
+ data.tar.gz: ca8a306ea9aa87dd6ffd919cded83c4ef83d11cb
5
5
  SHA512:
6
- metadata.gz: 7c119be37492ee77c4c81d57aaa4f6009d69578db006a43b54f8d62daa93d4db17350c9665b0cfe375c07e9f7cec7127956e8eb5e8c6e53c3b28c707de4cfccf
7
- data.tar.gz: 6e577f1cd059e902d135a404230cfcc3a3f416f159ad174823a25f1188b92e557b03039ba27b410f97212be863b9e2564b51e3c7286728cbe37b079697fdb74b
6
+ metadata.gz: 8e071b79a6e14c86bafbf82d63d2fceb2e048cc8b5be46551cde6bdc9f0200e296b2d7784baabc757dd279a630413d34efe3ce51ff2332acb446f23b96dc0242
7
+ data.tar.gz: 9f84f8bec6b0443e68631ec13689d4a5b5f5a35b5fc02cb2a18c1e80d148d8a22e80522208a4711403843638bdf3733b977c4d763fddbe057ddd78e404f97022
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mtr_monitor (1.2.0)
4
+ mtr_monitor (1.2.1)
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>-<HH-MM>.log
67
+ /var/log/mtr/<name>-<YYYY-DD-MM>-<host-ip-address>-<target-ip-address>-<HH-MM>.log
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-12-33.log
74
+ /var/log/mtr/hetzner-to-us-east-1-2017-12-18-142-21-43-11-138-21-32-191-12-33.log
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>/<HH-MM>.log
81
+ s3://<bucket-name>/<name>/<YYYY-DD-MM>/<host-ip-address>/<target-ip-address>/<HH-MM>.log
82
82
  ```
83
83
 
84
84
  ``` txt
85
- s3://<bucket-name>/hetzner-to-us-east-1/2017-12-18/142-21-43-11/12-33.log
85
+ s3://<bucket-name>/hetzner-to-us-east-1/2017-12-18/142-21-43-11/138-21-32-191/12-33.log
86
86
  ```
87
87
 
88
88
  ## Report Name
@@ -1,3 +1,3 @@
1
1
  module MtrMonitor
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
data/lib/mtr_monitor.rb CHANGED
@@ -15,7 +15,7 @@ module MtrMonitor
15
15
  # /var/log/mtr/<name>-<YYYY-DD-MM>-<host-ip-address>-<HH-MM>.log
16
16
  #
17
17
  # After that, it uploads the report to S3:
18
- # s3://<bucket-name>/<name>/<YYYY-DD-MM>/<host-ip-address>/<HH-MM>.log
18
+ # s3://<bucket-name>/<name>/<YYYY-DD-MM>/<host-ip-address>/<target-ip-address>/<HH-MM>.log
19
19
  #
20
20
  # Parameters:
21
21
  #
@@ -76,12 +76,12 @@ module MtrMonitor
76
76
 
77
77
  def generate_local_report
78
78
  run %Q(sudo mkdir -p /var/log/mtr)
79
- run %Q(sudo sh -c 'echo "Version: #{MtrMonitor::VERSION}" >> #{local_log_path}')
80
- run %Q(sudo sh -c 'echo "Name: #{@name}" >> #{local_log_path}')
81
- run %Q(sudo sh -c 'echo "Domain: #{@domain}" >> #{local_log_path}')
82
- run %Q(sudo sh -c 'echo "Source IP: #{@host_ip_address}" >> #{local_log_path}')
83
- run %Q(sudo sh -c 'echo "Target IP: #{destination}" >> #{local_log_path}')
84
- run %Q(sudo sh -c 'echo "---------------------------------------" >> #{local_log_path}')
79
+ run %Q(sudo sh -c 'echo "Version: #{MtrMonitor::VERSION.ljust(30)}" >> #{local_log_path}')
80
+ run %Q(sudo sh -c 'echo "Name: #{@name.ljust(30)}" >> #{local_log_path}')
81
+ run %Q(sudo sh -c 'echo "Domain: #{@domain.ljust(30)}" >> #{local_log_path}')
82
+ run %Q(sudo sh -c 'echo "Source IP: #{@host_ip_address.ljust(30)}" >> #{local_log_path}')
83
+ run %Q(sudo sh -c 'echo "Target IP: #{destination.ljust(30)}" >> #{local_log_path}')
84
+ run %Q(sudo sh -c 'echo "-----------------------------------------" >> #{local_log_path}')
85
85
  run %Q(sudo sh -c 'mtr --report --report-wide #{@mtr_options} #{destination} >> #{local_log_path}')
86
86
  end
87
87
 
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.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - RenderedText DevOps Team