zabbix_manager 5.0.6 → 5.0.7

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
  SHA256:
3
- metadata.gz: 1eba65965b358ec8595a777c899aa54dc1835945d17ad4d42687a22ce25d620f
4
- data.tar.gz: 68b13154bce3b7b7f1fcb568dc5e5472fd1b196f19d1a244fb25230e79f4a9ad
3
+ metadata.gz: a06ad87ced47aa4288d704ff5343ebeda605d34f7d6944459cecf4f69711d38d
4
+ data.tar.gz: 2e5e50ddf70f312b4c679d590d6a8aecbc6031764faf3f89e475c36958040772
5
5
  SHA512:
6
- metadata.gz: f0f0ea55235d315c9ce971e26047866a1c2a57b78a88520e98cfb2e051a75aa888a98dcc12d7e36f7fcfbad947270d99cf33192aceb3287bdb098ced135c021c
7
- data.tar.gz: 948831dfc8a7f1013b4835829c171e50376b185b965ba599990c9fe574a73a2d15c982badea135a58b9ed0b31701898c65b2a990f9ba923b1ca690ca68f5442a
6
+ metadata.gz: c6801af1c5372993075c7791ad45167c5b8a2f15a639861c7418e66d1ada84aee0e7c5bb7cb87369fcb662e93089d5bacee30623f7c110fee06f4bd95108ad48
7
+ data.tar.gz: 55c96cd371fa3a682ce39a421683606e60f444a1d2e1db60c3525e86bce946614757fad310dacaa9e21631e85524346e9328eec5a82f65779386b5ea8dfc9a63
data/CHANGELOG.md CHANGED
@@ -1,5 +1,3 @@
1
- ## [Unreleased]
1
+ #CHANGELOG
2
2
 
3
- ## [0.1.0] - 2021-12-17
4
-
5
- - Initial release
3
+ ### 5.0.7
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2021 TODO: Write your name
3
+ Copyright (c) 2022 TODO: WENWU.YAN
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,41 +1,98 @@
1
- # ZabbixManager
1
+ # Ruby Zabbix Api Module
2
2
 
3
- most codes are borrowed from zabbixapi, but changed some logic to fit everyday job wells. now support ZABBIX 4.0, 5.0, 6.0
3
+ [![Gem Version](http://img.shields.io/gem/v/zabbix_manager.svg)][gem]
4
+ [![Build Status](https://github.com/anapsix/zabbix_manager/workflows/CI/badge.svg)][github-ci]
4
5
 
5
- ## Installation
6
+ [gem]: https://rubygems.org/gems/zabbix_manager
7
+ [github-ci]: https://github.com/express42/zabbix_manager/actions?query=workflow%3ACI
8
+
9
+ Simple and lightweight ruby module for working with [Zabbix][Zabbix] via the [Zabbix API][Zabbix API]
6
10
 
7
- Add this line to your application's Gemfile:
11
+ ## Installation
12
+ ```sh
13
+ # latest
14
+ gem install zabbix_manager
8
15
 
9
- ```ruby
10
- gem 'zabbix_manager'
16
+ # specific version
17
+ gem install zabbix_manager -v 4.2.0
11
18
  ```
12
19
 
13
- And then execute:
20
+ ## Documentation
21
+ [http://rdoc.info/gems/zabbix_manager][documentation]
22
+
23
+ [documentation]: http://rdoc.info/gems/zabbix_manager
24
+
25
+ ## Examples
26
+ [https://github.com/express42/zabbix_manager/tree/master/examples][examples]
27
+
28
+ [examples]: https://github.com/express42/zabbix_manager/tree/master/examples
14
29
 
15
- $ bundle install
30
+ ## Version Policy
16
31
 
17
- Or install it yourself as:
32
+ **NOTE:** `master` branch is used for ongoing development on Zabbix API 5.x (5.0 and 5.2).
18
33
 
19
- $ gem install zabbix_manager
34
+ We support only two last versions of zabbix (5.0 and 5.2), so you should consider all previous versions deprecated.
20
35
 
21
- ## Usage
36
+ * Zabbix 1.8.2 (api version 1.2) | zabbix_manager 0.6.x | [branch zabbix1.8](https://github.com/express42/zabbix_manager/tree/zabbix1.8)
37
+ * Zabbix 1.8.9 (api version 1.3) | zabbix_manager 0.6.x | [branch zabbix1.8](https://github.com/express42/zabbix_manager/tree/zabbix1.8)
38
+ * Zabbix 2.0.x (api version 1.4 -> 2.0.10) | zabbix_manager 2.0.x | [branch zabbix2.0](https://github.com/express42/zabbix_manager/tree/zabbix2.0)
39
+ * Zabbix 2.2.x (api version 2.2.x) | zabbix_manager 2.2.x | [branch zabbix2.2](https://github.com/express42/zabbix_manager/tree/zabbix2.2)
40
+ * Zabbix 2.4.x (api version 2.2.x) | zabbix_manager 2.4.x | [branch zabbix2.4](https://github.com/express42/zabbix_manager/tree/zabbix2.4)
41
+ * Zabbix 3.0.x (api version 3.0.x) | zabbix_manager 3.0.x | [branch zabbix3.0](https://github.com/express42/zabbix_manager/tree/zabbix3.0)
42
+ * Zabbix 3.2.x (api version 3.2.x) | zabbix_manager 3.2.x | [branch zabbix3.2](https://github.com/express42/zabbix_manager/tree/zabbix3.2)
43
+ * Zabbix 4.0.x (api version 4.0.x) | zabbix_manager 4.1.x | [branch zabbix4.0](https://github.com/express42/zabbix_manager/tree/zabbix4.0)
44
+ * Zabbix 4.2.x (api version 4.2.x) | zabbix_manager 4.1.x | [branch zabbix4.0](https://github.com/express42/zabbix_manager/tree/zabbix4.0)
45
+ * Zabbix 4.4.x (api version 4.4.x) | zabbix_manager 4.2.x | [branch zabbix4.2](https://github.com/express42/zabbix_manager/tree/zabbix4.2)
22
46
 
23
- TODO: Write usage instructions here
47
+ ## Supported Ruby Versions
48
+ This library aims to support and is [tested against][github-ci] the following Ruby
49
+ versions:
24
50
 
25
- ## Development
51
+ * Ruby 2.5
52
+ * Ruby 2.6
53
+ * Ruby 2.7
54
+ * JRuby 9.2.10.0
26
55
 
27
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
56
+ If something doesn't work on one of these versions, it's a bug.
28
57
 
29
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
58
+ This library may inadvertently work (or seem to work) on other Ruby versions,
59
+ however support will only be provided for the versions listed above.
60
+
61
+ If you would like this library to support another Ruby version or
62
+ implementation, you may volunteer to be a maintainer. Being a maintainer
63
+ entails making sure all tests run and pass on that implementation. When
64
+ something breaks on your implementation, you will be responsible for providing
65
+ patches in a timely fashion. If critical issues for a particular implementation
66
+ exist at the time of a major release, support for that Ruby version may be
67
+ dropped.
68
+
69
+ ## Dependencies
70
+
71
+ * net/http
72
+ * json
30
73
 
31
74
  ## Contributing
32
75
 
33
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/zabbix_manager. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/zabbix_manager/blob/master/CODE_OF_CONDUCT.md).
76
+ * Fork the project.
77
+ * Base your work on the master branch.
78
+ * Make your feature addition or bug fix, write tests, write documentation/examples.
79
+ * Commit, do not mess with rakefile, version.
80
+ * Make a pull request.
81
+
82
+ ## Zabbix documentation
83
+
84
+ * [Zabbix Project Homepage][Zabbix]
85
+ * [Zabbix API docs][Zabbix API]
86
+
87
+ [Zabbix]: https://www.zabbix.com
88
+ [Zabbix API]: https://www.zabbix.com/documentation/5.2/manual/api
34
89
 
35
- ## License
90
+ ## Copyright
36
91
 
37
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
92
+ - Copyright (c) 2021 [contributors]
93
+ - Copyright (c) 2015-2018 Express 42 and [contributors]
38
94
 
39
- ## Code of Conduct
95
+ See [LICENSE] for details.
40
96
 
41
- Everyone interacting in the ZabbixManager project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ciscolive/zabbix_manager/blob/master/CODE_OF_CONDUCT.md).
97
+ [LICENSE]: LICENSE.md
98
+ [contributors]: https://github.com/express42/zabbix_manager/graphs/contributors
@@ -12,14 +12,13 @@ class ZabbixManager
12
12
  end
13
13
 
14
14
  private
15
-
16
- def set_error!
17
- @error = @response["error"]
18
- @error_message = "#{@error["message"]}: #{@error["data"]}"
19
- rescue StandardError
20
- @error = nil
21
- @error_message = nil
22
- end
15
+ def set_error!
16
+ @error = @response["error"]
17
+ @error_message = "#{@error["message"]}: #{@error["data"]}"
18
+ rescue StandardError
19
+ @error = nil
20
+ @error_message = nil
21
+ end
23
22
  end
24
23
 
25
24
  class ManagerError < BaseError
@@ -53,13 +53,13 @@ class ZabbixManager
53
53
  }
54
54
  )
55
55
 
56
- result.map do |graph|
56
+ result.filter_map do |graph|
57
57
  num = graph["graphid"]
58
58
  name = graph["name"]
59
59
  filter = data[:filter]
60
60
 
61
61
  num if filter.nil? || /#{filter}/ =~ name
62
- end.compact
62
+ end
63
63
  end
64
64
 
65
65
  # Get Graph Item object using Zabbix API
@@ -99,7 +99,7 @@ class ZabbixManager
99
99
  name: iface
100
100
  }
101
101
  }
102
- ).select { |item| item["snmp_oid"].match?(/1.3.6.1.2.1.31.1.1.1.(6|10)./) }
102
+ ).select { |item| item["snmp_oid"].match?(/1.3.6.1.2.1.31.1.1.1.(6|10|15)./) }
103
103
 
104
104
  # 检查是是否存在
105
105
  result.empty? ? nil : result
@@ -88,9 +88,9 @@ class ZabbixManager
88
88
  }
89
89
  )
90
90
 
91
- result.map do |rule|
91
+ result.filter_map do |rule|
92
92
  rule["roleid"]
93
- end.compact
93
+ end
94
94
  end
95
95
 
96
96
  # Update users in Userroles using Zabbix API
@@ -150,7 +150,7 @@ class ZabbixManager
150
150
  result = @client.api_request(
151
151
  method: "trigger.update",
152
152
  params: {
153
- triggerid: triggerid.to_i,
153
+ triggerid: triggerid,
154
154
  comments: data["comments"],
155
155
  priority: data["priority"],
156
156
  description: data["description"],
@@ -203,28 +203,27 @@ class ZabbixManager
203
203
  end
204
204
 
205
205
  private
206
-
207
- # Custom request method to handle both User and Global macros in one
208
- #
209
- # @param data [Hash] Needs to include macro and hostid to properly identify Global macros via Zabbix API
210
- # @param method [String] Zabbix API method to use for the request
211
- # @param result_key [String] Which key to use for parsing results based on User vs Global macros
212
- # @raise [ManagerError] Error returned when there is a problem with the Zabbix API call.
213
- # @raise [HttpError] Error raised when HTTP status from Zabbix Server response is not a 200 OK.
214
- # @return [Integer] Zabbix object id
215
- def request(data, method, result_key)
216
- # Zabbix has different result formats for gets vs updates
217
- if method.include?(".get")
218
- if result_key.include?("global")
219
- @client.api_request(method: method, params: { globalmacro: true, filter: data })
206
+ # Custom request method to handle both User and Global macros in one
207
+ #
208
+ # @param data [Hash] Needs to include macro and hostid to properly identify Global macros via Zabbix API
209
+ # @param method [String] Zabbix API method to use for the request
210
+ # @param result_key [String] Which key to use for parsing results based on User vs Global macros
211
+ # @raise [ManagerError] Error returned when there is a problem with the Zabbix API call.
212
+ # @raise [HttpError] Error raised when HTTP status from Zabbix Server response is not a 200 OK.
213
+ # @return [Integer] Zabbix object id
214
+ def request(data, method, result_key)
215
+ # Zabbix has different result formats for gets vs updates
216
+ if method.include?(".get")
217
+ if result_key.include?("global")
218
+ @client.api_request(method: method, params: { globalmacro: true, filter: data })
219
+ else
220
+ @client.api_request(method: method, params: { filter: data })
221
+ end
220
222
  else
221
- @client.api_request(method: method, params: { filter: data })
222
- end
223
- else
224
- result = @client.api_request(method: method, params: data)
223
+ result = @client.api_request(method: method, params: data)
225
224
 
226
- result.key?(result_key) && !result[result_key].empty? ? result[result_key][0].to_i : nil
225
+ result.key?(result_key) && !result[result_key].empty? ? result[result_key][0].to_i : nil
226
+ end
227
227
  end
228
- end
229
228
  end
230
229
  end
@@ -45,7 +45,7 @@ class ZabbixManager
45
45
  # Initializes a new Client object
46
46
  #
47
47
  # @param options [Hash]
48
- # @option opts [String] :url The url of zabbixapi(example: 'http://localhost/zabbix/api_jsonrpc.php')
48
+ # @option opts [String] :url The url of zabbix_manager(example: 'http://localhost/zabbix/api_jsonrpc.php')
49
49
  # @option opts [String] :user
50
50
  # @option opts [String] :password
51
51
  # @option opts [String] :http_user A user for basic auth.(optional)
@@ -63,7 +63,7 @@ class ZabbixManager
63
63
  end
64
64
 
65
65
  if api_version.match?(/^7\.\d+\.\d+$/)
66
- message = "Zabbix API version: #{api_version} is not supported by this version of zabbixapi"
66
+ message = "Zabbix API version: #{api_version} is not supported by this version of zabbix_manager"
67
67
  if @options[:ignore_version]
68
68
  puts "[WARNING] #{message}" if @options[:debug]
69
69
  else
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ZabbixManager
4
- VERSION = "5.0.6"
4
+ VERSION = "5.0.7"
5
5
  end
@@ -0,0 +1,43 @@
1
+ # coding: utf-8
2
+ # frozen_string_literal: true
3
+
4
+ lib = File.expand_path("../lib", __FILE__)
5
+
6
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
7
+
8
+ require "zabbix_manager/version"
9
+
10
+ Gem::Specification.new do |spec|
11
+ spec.add_dependency "http", "~> 4.0"
12
+ spec.add_dependency "json", "~> 2.0"
13
+ spec.add_development_dependency "bundler", "~> 2.3", ">= 2.3.9"
14
+
15
+ spec.add_development_dependency "rspec", "~> 3.11"
16
+ spec.add_development_dependency "yard", "~> 0.9.27"
17
+ spec.add_development_dependency "yardstick", "~> 0.9.9"
18
+ spec.add_development_dependency "rubocop", "~> 1.25", ">= 1.25.1"
19
+ spec.add_development_dependency "rubocop-minitest", "~> 0.18.0"
20
+ spec.add_development_dependency "rubocop-performance", "~> 1.13"
21
+ spec.add_development_dependency "rubocop-rails", "~> 2.13", ">= 2.13.2"
22
+ spec.add_development_dependency "rubocop-packaging", "~> 0.5.1"
23
+
24
+ spec.name = "zabbix_manager"
25
+ spec.version = ZabbixManager::VERSION
26
+ spec.authors = ["WENWU YAN"]
27
+ spec.email = ["careline@foxmail.com"]
28
+
29
+ spec.summary = "Simple and lightweight ruby module for working with the Zabbix API, support 4.0 5.0 6.0"
30
+ spec.description = "Most codes borrowed from zabbix_manager, But changed some logic for everyday jobs."
31
+ spec.homepage = "https://github.com/snmpd/zabbix_manager"
32
+ spec.licenses = "MIT"
33
+
34
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
35
+
36
+ spec.metadata["homepage_uri"] = spec.homepage
37
+ spec.metadata["source_code_uri"] = "https://github.com/snmpd/zabbix_manager"
38
+ spec.metadata["changelog_uri"] = "https://github.com/snmpd/zabbix_manager"
39
+
40
+ spec.files = %w[CHANGELOG.md LICENSE.txt README.md zabbix_manager.gemspec] + Dir["lib/**/*.rb"]
41
+ spec.require_paths = "lib"
42
+ spec.required_ruby_version = ">= 2.7.0"
43
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zabbix_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.6
4
+ version: 5.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - WENWU YAN
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-09 00:00:00.000000000 Z
11
+ date: 2022-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '4.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,35 +42,157 @@ dependencies:
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.3'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 2.3.9
51
+ type: :development
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '2.3'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 2.3.9
61
+ - !ruby/object:Gem::Dependency
62
+ name: rspec
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '3.11'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '3.11'
75
+ - !ruby/object:Gem::Dependency
76
+ name: yard
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: 0.9.27
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: 0.9.27
89
+ - !ruby/object:Gem::Dependency
90
+ name: yardstick
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: 0.9.9
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: 0.9.9
103
+ - !ruby/object:Gem::Dependency
104
+ name: rubocop
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '1.25'
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: 1.25.1
113
+ type: :development
114
+ prerelease: false
115
+ version_requirements: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - "~>"
118
+ - !ruby/object:Gem::Version
119
+ version: '1.25'
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: 1.25.1
123
+ - !ruby/object:Gem::Dependency
124
+ name: rubocop-minitest
125
+ requirement: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - "~>"
128
+ - !ruby/object:Gem::Version
129
+ version: 0.18.0
130
+ type: :development
131
+ prerelease: false
132
+ version_requirements: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - "~>"
135
+ - !ruby/object:Gem::Version
136
+ version: 0.18.0
137
+ - !ruby/object:Gem::Dependency
138
+ name: rubocop-performance
139
+ requirement: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - "~>"
142
+ - !ruby/object:Gem::Version
143
+ version: '1.13'
144
+ type: :development
145
+ prerelease: false
146
+ version_requirements: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - "~>"
149
+ - !ruby/object:Gem::Version
150
+ version: '1.13'
151
+ - !ruby/object:Gem::Dependency
152
+ name: rubocop-rails
153
+ requirement: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - "~>"
156
+ - !ruby/object:Gem::Version
157
+ version: '2.13'
45
158
  - - ">="
46
159
  - !ruby/object:Gem::Version
47
- version: '0'
160
+ version: 2.13.2
48
161
  type: :development
49
162
  prerelease: false
50
163
  version_requirements: !ruby/object:Gem::Requirement
51
164
  requirements:
165
+ - - "~>"
166
+ - !ruby/object:Gem::Version
167
+ version: '2.13'
52
168
  - - ">="
53
169
  - !ruby/object:Gem::Version
54
- version: '0'
55
- description: most codes are borrowed from zabbixapi, but changed some logic to fit
56
- everyday job wells. now support ZABBIX 4.0, 5.0, 6.0
170
+ version: 2.13.2
171
+ - !ruby/object:Gem::Dependency
172
+ name: rubocop-packaging
173
+ requirement: !ruby/object:Gem::Requirement
174
+ requirements:
175
+ - - "~>"
176
+ - !ruby/object:Gem::Version
177
+ version: 0.5.1
178
+ type: :development
179
+ prerelease: false
180
+ version_requirements: !ruby/object:Gem::Requirement
181
+ requirements:
182
+ - - "~>"
183
+ - !ruby/object:Gem::Version
184
+ version: 0.5.1
185
+ description: Most codes borrowed from zabbix_manager, But changed some logic for everyday
186
+ jobs.
57
187
  email:
58
188
  - careline@foxmail.com
59
189
  executables: []
60
190
  extensions: []
61
191
  extra_rdoc_files: []
62
192
  files:
63
- - ".idea/vcs.xml"
64
- - ".idea/workspace.xml"
65
- - ".rubocop.yml"
66
193
  - CHANGELOG.md
67
- - CODE_OF_CONDUCT.md
68
- - Gemfile
69
194
  - LICENSE.txt
70
195
  - README.md
71
- - Rakefile
72
- - bin/console
73
- - bin/setup
74
196
  - lib/zabbix_manager.rb
75
197
  - lib/zabbix_manager/basic/basic_alias.rb
76
198
  - lib/zabbix_manager/basic/basic_extend.rb
@@ -105,11 +227,7 @@ files:
105
227
  - lib/zabbix_manager/classes/valuemaps.rb
106
228
  - lib/zabbix_manager/client.rb
107
229
  - lib/zabbix_manager/version.rb
108
- - zabbix_manager-5.0.1.gem
109
- - zabbix_manager-5.0.2.gem
110
- - zabbix_manager-5.0.3.gem
111
- - zabbix_manager-5.0.4.gem
112
- - zabbix_manager-5.0.5.gem
230
+ - zabbix_manager.gemspec
113
231
  homepage: https://github.com/snmpd/zabbix_manager
114
232
  licenses:
115
233
  - MIT
@@ -126,7 +244,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
244
  requirements:
127
245
  - - ">="
128
246
  - !ruby/object:Gem::Version
129
- version: 2.4.0
247
+ version: 2.7.0
130
248
  required_rubygems_version: !ruby/object:Gem::Requirement
131
249
  requirements:
132
250
  - - ">="
@@ -136,5 +254,6 @@ requirements: []
136
254
  rubygems_version: 3.3.3
137
255
  signing_key:
138
256
  specification_version: 4
139
- summary: ZABBIX API connector for VERSION 4.0 5.0 6.0
257
+ summary: Simple and lightweight ruby module for working with the Zabbix API, support
258
+ 4.0 5.0 6.0
140
259
  test_files: []
data/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>
data/.idea/workspace.xml DELETED
@@ -1,67 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="AutoImportSettings">
4
- <option name="autoReloadType" value="SELECTIVE" />
5
- </component>
6
- <component name="ChangeListManager">
7
- <list default="true" id="9f25f96c-828f-4aea-8886-dcbae369ba60" name="变更" comment="" />
8
- <option name="SHOW_DIALOG" value="false" />
9
- <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
- <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
11
- <option name="LAST_RESOLUTION" value="IGNORE" />
12
- </component>
13
- <component name="Git.Settings">
14
- <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
15
- </component>
16
- <component name="JsBowerSettings">
17
- <bower-package value="" />
18
- <bower.json value="" />
19
- </component>
20
- <component name="ProjectId" id="265x23SpJKPxcHuoXgA68nnhQDg" />
21
- <component name="ProjectViewState">
22
- <option name="hideEmptyMiddlePackages" value="true" />
23
- <option name="showLibraryContents" value="true" />
24
- </component>
25
- <component name="PropertiesComponent">
26
- <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
27
- <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
28
- <property name="WebServerToolWindowFactoryState" value="false" />
29
- <property name="last_opened_file_path" value="$PROJECT_DIR$" />
30
- <property name="node.js.detected.package.eslint" value="true" />
31
- <property name="node.js.selected.package.eslint" value="(autodetect)" />
32
- <property name="node.js.selected.package.tslint" value="(autodetect)" />
33
- <property name="nodejs_interpreter_path" value="node" />
34
- <property name="nodejs_package_manager_path" value="yarn" />
35
- <property name="settings.editor.selected.configurable" value="org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable" />
36
- <property name="vue.rearranger.settings.migration" value="true" />
37
- </component>
38
- <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
39
- <component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" RAKE_SPRING_PRE_LOADER_OPTION="true" RAILS_SPRING_PRE_LOADER_OPTION="true" />
40
- <component name="TaskManager">
41
- <task active="true" id="Default" summary="默认任务">
42
- <changelist id="9f25f96c-828f-4aea-8886-dcbae369ba60" name="变更" comment="" />
43
- <created>1646727041577</created>
44
- <option name="number" value="Default" />
45
- <option name="presentableId" value="Default" />
46
- <updated>1646727041577</updated>
47
- <workItem from="1646727043249" duration="3509000" />
48
- <workItem from="1646732978147" duration="8000" />
49
- <workItem from="1646734414024" duration="13000" />
50
- </task>
51
- <servers />
52
- </component>
53
- <component name="TypeScriptGeneratedFilesManager">
54
- <option name="version" value="3" />
55
- </component>
56
- <component name="Vcs.Log.Tabs.Properties">
57
- <option name="TAB_STATES">
58
- <map>
59
- <entry key="MAIN">
60
- <value>
61
- <State />
62
- </value>
63
- </entry>
64
- </map>
65
- </option>
66
- </component>
67
- </project>
data/.rubocop.yml DELETED
@@ -1,13 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 2.7
3
-
4
- Style/StringLiterals:
5
- Enabled: true
6
- EnforcedStyle: double_quotes
7
-
8
- Style/StringLiteralsInInterpolation:
9
- Enabled: true
10
- EnforcedStyle: double_quotes
11
-
12
- Layout/LineLength:
13
- Max: 120
data/CODE_OF_CONDUCT.md DELETED
@@ -1,84 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
-
9
- ## Our Standards
10
-
11
- Examples of behavior that contributes to a positive environment for our community include:
12
-
13
- * Demonstrating empathy and kindness toward other people
14
- * Being respectful of differing opinions, viewpoints, and experiences
15
- * Giving and gracefully accepting constructive feedback
16
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- * Focusing on what is best not just for us as individuals, but for the overall community
18
-
19
- Examples of unacceptable behavior include:
20
-
21
- * The use of sexualized language or imagery, and sexual attention or
22
- advances of any kind
23
- * Trolling, insulting or derogatory comments, and personal or political attacks
24
- * Public or private harassment
25
- * Publishing others' private information, such as a physical or email
26
- address, without their explicit permission
27
- * Other conduct which could reasonably be considered inappropriate in a
28
- professional setting
29
-
30
- ## Enforcement Responsibilities
31
-
32
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
-
34
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
-
36
- ## Scope
37
-
38
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
-
40
- ## Enforcement
41
-
42
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at TODO: Write your email address. All complaints will be reviewed and investigated promptly and fairly.
43
-
44
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
-
46
- ## Enforcement Guidelines
47
-
48
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
-
50
- ### 1. Correction
51
-
52
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
-
54
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
-
56
- ### 2. Warning
57
-
58
- **Community Impact**: A violation through a single incident or series of actions.
59
-
60
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
-
62
- ### 3. Temporary Ban
63
-
64
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
-
66
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
-
68
- ### 4. Permanent Ban
69
-
70
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
-
72
- **Consequence**: A permanent ban from any sort of public interaction within the community.
73
-
74
- ## Attribution
75
-
76
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
-
79
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
-
81
- [homepage]: https://www.contributor-covenant.org
82
-
83
- For answers to common questions about this code of conduct, see the FAQ at
84
- https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile DELETED
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in zabbix_manager.gemspec
6
- gemspec
7
-
8
- gem "rake", "~> 13.0"
9
-
10
- gem "rubocop", "~> 1.7"
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rubocop/rake_task"
5
-
6
- RuboCop::RakeTask.new
7
-
8
- task default: :rubocop
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "bundler/setup"
5
- require "zabbix_manager"
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require "irb"
15
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
Binary file
Binary file
Binary file
Binary file
Binary file