cdn_manager_pcache_probe 0.9 → 0.10

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: 8637683367765dc3a8f762051395fafabd02981e
4
- data.tar.gz: 12d67b2b2e5f234907f4629c9a9feb2ff773761b
3
+ metadata.gz: 002f454da9b61fe9adc3629b2413ba22b33c123a
4
+ data.tar.gz: 1d4e38b524741774bd5eff0974229604d2a5aac5
5
5
  SHA512:
6
- metadata.gz: a0e5b77edd59f66c1e9cd3cd70911066398606e8681886e423f52c008d05cc56ba966a17b4f6f7c9f19a65faab134375c34186ba30bd3dc3a09b7224166d415f
7
- data.tar.gz: ec0dcca3b1f9e8ee04affc7bfc5c6077258b945c1399b3db92277acbc22a1f015a712060961d8d324372c4c4b90e3482682c659672a8d759532305707221b4f1
6
+ metadata.gz: e160b53d0db7b0be1db6507364b257c6066749496fccaaf179c2d4f336d17be9b5f1de9feb5ae19892b58f8970eded2dcdf36cbed604defcd0a9b807ad94c23b
7
+ data.tar.gz: cc68e8fab734e02ff35be94968dbfafcdb477b079869d4f1b9eedcd2416e7d3fcbe5231c9c10539604f76778a0471e78a3924b0154e913bbf51a43c937c6b43a
data/README.md CHANGED
@@ -4,11 +4,13 @@ Pcache load probe for cdn-manager using ElasticSearch data.
4
4
  # Usage
5
5
 
6
6
  Get overall usage for last 3 minutes:
7
+
7
8
  ```bash
8
9
  get_pcache_probe collect --url http://indexer.swisstxt.ch:9200/_all/pcache/_search --interval 3
9
10
  ```
10
11
 
11
12
  Limit usage to volume_key "swisstxt.ch":
13
+
12
14
  ```bash
13
15
  get_pcache_probe collect --url http://indexer.swisstxt.ch:9200/_all/pcache/_search --key swisstxt.ch
14
16
  ```
@@ -25,28 +25,27 @@ module CdnManagerPcacheProbe
25
25
  def query(options = {})
26
26
  interval = (options[:interval] || 5).to_i
27
27
  delay = (options[:delay] || 5).to_i
28
- volume_key_filter = "\"volume_key.raw\": \"#{options[:key]}\"" if options[:key]
28
+ volume_key_filter = "\"volume_key\": \"#{options[:key]}\"" if options[:key]
29
29
  query = %Q({
30
30
  "size": 0,
31
31
  "query": {
32
- "filtered": {
33
- "filter": {
34
- "bool": {
35
- "must": [
36
- { "range": {
32
+ "bool": {
33
+ "filter": [
34
+ {
35
+ "range": {
37
36
  "@timestamp": {
38
37
  "gt": "now-#{interval + delay}m",
39
38
  "lt": "now-#{delay}m"
40
39
  }
41
- }},
42
- { "term": {
43
- "type": "pcache"
44
- #{", " + volume_key_filter if options[:key]}
45
- }
46
40
  }
47
- ]
48
- }
49
- }
41
+ },
42
+ {
43
+ "term": {
44
+ "type": "pcache"
45
+ #{", " + volume_key_filter if options[:key]}
46
+ }
47
+ }
48
+ ]
50
49
  }
51
50
  },
52
51
  "aggs": {
@@ -1,3 +1,3 @@
1
1
  module CdnManagerPcacheProbe
2
- VERSION = "0.9"
2
+ VERSION = "0.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cdn_manager_pcache_probe
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.9'
4
+ version: '0.10'
5
5
  platform: ruby
6
6
  authors:
7
7
  - niwo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-19 00:00:00.000000000 Z
11
+ date: 2017-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.4.5.1
107
+ rubygems_version: 2.5.2
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Pcache load probe for cdn-manager.