scaltainer 0.1.2 → 0.1.3

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: 233c4ba55f098c5ce1c930679169eaa246834e85
4
- data.tar.gz: a30140aee44783ddda98eda7d67f560da97b7449
3
+ metadata.gz: e83fe8588dcb50e60dd1b55b3fccefa1957f553b
4
+ data.tar.gz: fcaca1ceaa70b6145ce7c0de83246775cfb14627
5
5
  SHA512:
6
- metadata.gz: a1f752c149bed555a6eaa71e04808ffe5a09570c05996f34c59ee5f65686d081d99078fb3c386c6e15bbef72f84d6abc16b8d9d5ea1211378af64fb40cf73e47
7
- data.tar.gz: 6f83ea153a3aa45b1cb77ac73512bff25624894f5f6b082718108d90df47101f9191b10b7420605464fb5a4e9e67f8c348cd267b84fb97eedff9db2649f61613
6
+ metadata.gz: e92dad052350902b89d6a1055daea1aedbb72b217a851767008b74cc7b5ad50f14124148eeb02ed3198480f39c428cb87b142dff733033e5fc8a1f6abcb8a8a2
7
+ data.tar.gz: 290abee67df29b3bde1517d4f331b6562f58064312d6406463f45f7b3f2f9fc66dbfbd23a768c4f7fc3f46521473a379dd3bbec644b2b61aa2f2e6c4e399cea2
data/Dockerfile ADDED
@@ -0,0 +1,9 @@
1
+ FROM ruby:2.3
2
+
3
+ MAINTAINER Hossam Hammady <github@hammady.net>
4
+
5
+ RUN gem install scaltainer
6
+
7
+ ENTRYPOINT ["scaltainer"]
8
+
9
+ CMD ["-h"]
data/README.md CHANGED
@@ -57,7 +57,7 @@ set `HIREFIRE_TOKEN` environment variable before invoking
57
57
  endpoint (see below) to get the number of jobs per queue
58
58
  for each worker.
59
59
 
60
- - `NEW_RELIC_LICENSE_KEY`: New Relic license key. Currently New Relic
60
+ - `NEW_RELIC_API_KEY`: New Relic API key. Currently New Relic
61
61
  is used to retrieve average response time metric for web services.
62
62
  More monitoring services can be added in the future.
63
63
 
@@ -18,7 +18,7 @@ module Scaltainer
18
18
  puts "\nEnvironment variables: \n"
19
19
  puts "- DOCKER_URL: defaults to local socket"
20
20
  puts "- HIREFIRE_TOKEN"
21
- puts "- NEW_RELIC_LICENSE_KEY"
21
+ puts "- NEW_RELIC_API_KEY"
22
22
  puts "- RESPONSE_TIME_WINDOW: defaults to 5"
23
23
  puts "- LOG_LEVEL: defaults to INFO"
24
24
  puts "- DOCKER_SECRETS_PATH_GLOB: path glob containing env files to load"
@@ -48,7 +48,6 @@ module Scaltainer
48
48
  unless files.empty?
49
49
  require 'dotenv'
50
50
  Dotenv.load(*files)
51
- puts ENV['NEW_RELIC_LICENSE_KEY']
52
51
  end
53
52
  end
54
53
  end
@@ -6,8 +6,8 @@ module Scaltainer
6
6
 
7
7
  def get_metrics(services)
8
8
  super
9
- nr_key = ENV['NEW_RELIC_LICENSE_KEY']
10
- raise ConfigurationError.new 'NEW_RELIC_LICENSE_KEY not set in environment' unless nr_key
9
+ nr_key = ENV['NEW_RELIC_API_KEY']
10
+ raise ConfigurationError.new 'NEW_RELIC_API_KEY not set in environment' unless nr_key
11
11
  nr = Newrelic::Metrics.new nr_key
12
12
  to = Time.now
13
13
  from = to - (ENV['RESPONSE_TIME_WINDOW'] || '5').to_i * 60
@@ -1,3 +1,3 @@
1
1
  module Scaltainer
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scaltainer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hossam Hammady
@@ -135,6 +135,7 @@ files:
135
135
  - ".gitignore"
136
136
  - ".rspec"
137
137
  - ".travis.yml"
138
+ - Dockerfile
138
139
  - Gemfile
139
140
  - LICENSE.txt
140
141
  - README.md