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 +4 -4
- data/README.md +2 -0
- data/lib/cdn_manager_pcache_probe/connector.rb +13 -14
- data/lib/cdn_manager_pcache_probe/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 002f454da9b61fe9adc3629b2413ba22b33c123a
|
|
4
|
+
data.tar.gz: 1d4e38b524741774bd5eff0974229604d2a5aac5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
28
|
+
volume_key_filter = "\"volume_key\": \"#{options[:key]}\"" if options[:key]
|
|
29
29
|
query = %Q({
|
|
30
30
|
"size": 0,
|
|
31
31
|
"query": {
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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": {
|
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.
|
|
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:
|
|
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.
|
|
107
|
+
rubygems_version: 2.5.2
|
|
108
108
|
signing_key:
|
|
109
109
|
specification_version: 4
|
|
110
110
|
summary: Pcache load probe for cdn-manager.
|