zabbix_graph 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zabbix_graph.rb +5 -2
- data/lib/zabbix_graph/version.rb +1 -1
- data/zabbix_graph.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b46ff71b6748e2e7043f682cecc9425cc3a64a92
|
4
|
+
data.tar.gz: 45742f64b62a28040feca403fbe125e435b81aae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6ab2693627e3af10d3337c815cde40ab262e473126dc6db7a94990f1aba69d2aa2a670ea8cddadf5bf52711bd69206ff657e6b2c542305b6d6e5cc16237a679
|
7
|
+
data.tar.gz: c9ee541dae84b7c66fba4d069bece5cbe618a4d304db648b534c9e53ccae77c5686b8b53a813b66f662fd56fc368e1ab691a64bc1ac04ab30785969c29673d3a
|
data/lib/zabbix_graph.rb
CHANGED
@@ -3,6 +3,7 @@ require "zabbixapi"
|
|
3
3
|
require "peco_selector"
|
4
4
|
require "optparse"
|
5
5
|
require "fileutils"
|
6
|
+
require "launchy"
|
6
7
|
|
7
8
|
module ZabbixGraph
|
8
9
|
class CLI
|
@@ -40,6 +41,8 @@ module ZabbixGraph
|
|
40
41
|
method: 'item.get',
|
41
42
|
params: {
|
42
43
|
hostids: hosts.map {|h| h['hostid'] },
|
44
|
+
sortfield: 'name',
|
45
|
+
sortorder: 'ASC',
|
43
46
|
},
|
44
47
|
)
|
45
48
|
|
@@ -69,7 +72,7 @@ module ZabbixGraph
|
|
69
72
|
def open_history(items)
|
70
73
|
url = URI.join(zabbix_url, "/history.php?#{query_string_from_items(items)}")
|
71
74
|
|
72
|
-
|
75
|
+
Launchy.open url.to_s
|
73
76
|
end
|
74
77
|
|
75
78
|
def open_host_graph(items)
|
@@ -116,7 +119,7 @@ module ZabbixGraph
|
|
116
119
|
f.write html
|
117
120
|
end
|
118
121
|
|
119
|
-
|
122
|
+
Launchy.open path
|
120
123
|
end
|
121
124
|
|
122
125
|
def temp_html_dir
|
data/lib/zabbix_graph/version.rb
CHANGED
data/zabbix_graph.gemspec
CHANGED
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
spec.add_dependency "zabbixapi", "~> 2.4.2"
|
21
21
|
spec.add_dependency "peco_selector", "~> 0.0.3"
|
22
|
+
spec.add_dependency "launchy"
|
22
23
|
|
23
24
|
spec.add_development_dependency "bundler", "~> 1.7"
|
24
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zabbix_graph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryota Arai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zabbixapi
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.0.3
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: launchy
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: bundler
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|