mtr_monitor 0.14.4 → 0.15.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 +31 -2
- data/lib/mtr_monitor.rb +1 -1
- data/lib/mtr_monitor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5889cd469d83f1878c05a8e57d15244fe83934e5
|
|
4
|
+
data.tar.gz: ac08bad663e33dc72e01051a12d03d97793cfe52
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d669684b06376032c347a4a819fec44e5a6e773620b0a09f04dce577bd6b8259e644b056da59faf1f46f6a9c55f3f56c7eb4b157fb83fd796c667d0b6c8b5835
|
|
7
|
+
data.tar.gz: 0356c03875a93d455ae9b424c2ed63cce4f7fe83bfb9b75a01cb8a5b1d1adc703eaabc98fce90b9ee5389ba9a462647ff92fa2b411b2890fb4d1660135cdd864
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -140,6 +140,24 @@ MTR hops are also submitted to Grafana. Based on these metrics you can observe
|
|
|
140
140
|
the packet loss, avg, best, and worst latency on the network. For more
|
|
141
141
|
information read the code in `lib/mtr_monitor/metrics.rb`.
|
|
142
142
|
|
|
143
|
+
## Bump gem version
|
|
144
|
+
|
|
145
|
+
1. Change version in `lib/mtr_monitor/version.rb`
|
|
146
|
+
2. Run `bundle`
|
|
147
|
+
3. Push gem to RubyGems manually or let Semaphore do it for you automatically
|
|
148
|
+
|
|
149
|
+
## Update MTR monitor in Job Runner
|
|
150
|
+
|
|
151
|
+
MTR monitor is run in the [mtr_report cron task](https://github.com/renderedtext/job_runner/blob/master/lib/tasks/network.rake#L32-L40) within Job Runner.
|
|
152
|
+
|
|
153
|
+
To update the version used in Job Runner:
|
|
154
|
+
|
|
155
|
+
1. Run `bundle update mtr_monitor`.
|
|
156
|
+
2. Make sure the code using gem corresponds to the new version.
|
|
157
|
+
3. Try to run the task locally.
|
|
158
|
+
4. Deploy to staging sec1 and check if it works properly.
|
|
159
|
+
5. Finally, deploy to production build servers.
|
|
160
|
+
|
|
143
161
|
## Using MTR Monitor as a standalone Docker container
|
|
144
162
|
|
|
145
163
|
The MTR monitor can be used as a standalone Docker container. This is our
|
|
@@ -201,8 +219,19 @@ deployed servers.
|
|
|
201
219
|
|
|
202
220
|
#### Continuously deploying MTR monitor to a EC2 machine
|
|
203
221
|
|
|
204
|
-
|
|
222
|
+
To deploy MTR monitor as docker container within EC2 machine:
|
|
223
|
+
1. Make sure Docker is installed:
|
|
224
|
+
```
|
|
225
|
+
curl https://get.docker.com | sudo bash
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
2. Run deploy rake task in [Rakefile](https://github.com/renderedtext/mtr-monitor/blob/master/Rakefile#L8) by passing server IP address like:
|
|
229
|
+
```
|
|
230
|
+
SERVER=1.2.3.4 bundle exec rake deploy
|
|
231
|
+
```
|
|
205
232
|
|
|
206
233
|
#### Set up Alerts and Monitoring for a MTR monitor
|
|
207
234
|
|
|
208
|
-
|
|
235
|
+
Each deployed MTR monitor needs to has its own panel on grafana [Platform - Network](https://semaphore.grafana.net/dashboard/db/platform-network?orgId=1) dashboard.
|
|
236
|
+
|
|
237
|
+
Make sure to setup BuildServers alert.
|
data/lib/mtr_monitor.rb
CHANGED
|
@@ -42,7 +42,7 @@ module MtrMonitor
|
|
|
42
42
|
@dig_ip_address = dig_ip_address
|
|
43
43
|
@logger = logger || Logger.new(STDOUT)
|
|
44
44
|
|
|
45
|
-
path = "#{@name}/#{Time.now.strftime("%Y-%m-%d")}/#{@host_ip_address.gsub(".", "-")}/#{Time.now.strftime("%H-%M")}.log"
|
|
45
|
+
path = "#{@name}/#{Time.now.strftime("%Y-%m-%d")}/#{@host_ip_address.gsub(".", "-")}/#{Time.now.utc.strftime("%H-%M")}.log"
|
|
46
46
|
|
|
47
47
|
@log_path = "#{MtrMonitor::REPORTS_PATH}/#{path.gsub("/", "-")}"
|
|
48
48
|
@s3_path = "s3://#{@s3_bucket}/#{path}"
|
data/lib/mtr_monitor/version.rb
CHANGED
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: 0.
|
|
4
|
+
version: 0.15.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-01-
|
|
11
|
+
date: 2018-01-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rt-watchman
|