capistrano2-zabbix 0.1.3 → 0.1.4

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: 5ff5eb345ec9879e64d547b161f3115e7fb05027
4
- data.tar.gz: 88b40acbf5f0a59c1a441793a5e763f42772927b
3
+ metadata.gz: 0070782fe09f350bd9e427dfb22e18060ded9d42
4
+ data.tar.gz: 0612e93998719526cf4882ff6c3fa2ae93d3e454
5
5
  SHA512:
6
- metadata.gz: 54e357c547e20c32a323e34faf11b59fe9a463d3d4c4315472c1369c3f4ccd60bcafdd8431ab1bb7e153fff21742aa82b67861b288398e3819ecbbf5a43903b4
7
- data.tar.gz: 31a9c2eb46ca7108ea87a91f25be877572174282d39fd48a40fd4f0eef884546725e4a01919cabc56c92c3e4fe69e281ea88544ee04aa300c596cb7fdf03ca36
6
+ metadata.gz: 9b023f1cfd2d1581e5a50b40f2d5c91e9975f4ca0eaf9077b41add265e60cd8be0222c9dba0a7ad394f7ab40382e351383a0fc5d374b1784940b5ecc43504147
7
+ data.tar.gz: 1641217cf425a656e851497e9eb72ec476e5fca632095c34e2019fc8e91c8a2c5a924e75274ed250b0c057971c9253c8a159e1c17169259440e084583b73fac0
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ - 2.1.0
5
+ - 2.2.0
6
+ - ruby-head
7
+ - jruby-head
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # capistrano2-zabbix
2
2
 
3
+ [![Build Status](https://travis-ci.org/skrobul/capistrano2-zabbix.svg?branch=master)](https://travis-ci.org/skrobul/capistrano2-zabbix)
4
+
3
5
  Tired of manually creating maintenance objects in your Zabbix monitoring
4
6
  system for every new release of your application ? This gem is for you! It
5
7
  automates creation and removal of necessary objects so that your code can be
@@ -26,10 +28,11 @@ Then in your `config/deploy.rb` you need to require the gem:
26
28
  * `:zabbix_user` - user name that has permissions to edit maintenances
27
29
  * `:zabbix_password` - self explanatory
28
30
  * `:zabbix_period` - number of seconds that maintance is created for
29
- * `:zabbix_groupid` - ID of server group included in the maintenace
31
+ * `:zabbix_groupid` - ID of server group included in the maintenace. For
32
+ example, with default installations `Linux servers` is group number 2.
30
33
  * `:zabbix_auto_trigger` - if set to `true`, your deployment will
31
34
  automatically execute `zabbix:create` before deploying code and
32
- `zabbix:delete` when it's finished. If set to `false` (default) you have
35
+ `zabbix:delete` when it's finished. If set to `false` you have
33
36
  to hook those tasks up where you think it's appropriate.
34
37
 
35
38
  ### Configuration defaults
@@ -38,8 +41,8 @@ Then in your `config/deploy.rb` you need to require the gem:
38
41
  set :zabbix_user, 'Admin'
39
42
  set :zabbix_password, 'zabbix'
40
43
  set :zabbix_period, 60 * 60 * 10 # 10 hours
41
- set :zabbix_groupid, 2
42
- set :zabbix_auto_trigger, false
44
+ set :zabbix_groupid, 2 # Linux servers
45
+ set :zabbix_auto_trigger, true
43
46
  ```
44
47
 
45
48
  ## Usage
@@ -54,10 +57,17 @@ gem:
54
57
  something like this:
55
58
 
56
59
  ```ruby
57
- set :zabbix_auto_trigger, false # This is default, can be skipped.
60
+ set :zabbix_auto_trigger, false
58
61
  after 'deploy:update_code', 'zabbix:create'
59
62
  ```
60
63
 
64
+ * start/stop maintenances straight from your command line:
65
+ ```
66
+ ~/devel/zab-testproject cap zabbix:create
67
+ * 2015-05-14 17:19:40 executing `zabbix:create'
68
+ ~/devel/zab-testproject`
69
+ ```
70
+
61
71
 
62
72
  ## Contributing to capistrano2-zabbix
63
73
 
@@ -68,8 +78,7 @@ gem:
68
78
  * Commit and push until you are happy with your contribution.
69
79
  * Feel free to submit PR :)
70
80
 
71
- ## Copyright
72
-
73
- Copyright (c) 2015 Marek Skrobacki. See LICENSE.txt for
74
- further details.
81
+ ## License
82
+ 2015 [MIT](https://tldrlegal.com/license/mit-license).
75
83
 
84
+ Author: Marek Skrobacki.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: capistrano2-zabbix 0.1.3 ruby lib
5
+ # stub: capistrano2-zabbix 0.1.4 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "capistrano2-zabbix"
9
- s.version = "0.1.3"
9
+ s.version = "0.1.4"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Marek Skrobacki"]
14
- s.date = "2015-05-14"
14
+ s.date = "2015-05-26"
15
15
  s.description = "\n Tired of manually creating maintenance objects in your Zabbix monitoring\n system for every new release of your application ? This gem is for you! It\n automates creation and removal of necessary objects so that your code can be\n released without unnecessary false alerts.\n "
16
16
  s.email = "skrobul@skrobul.com"
17
17
  s.extra_rdoc_files = [
@@ -23,6 +23,7 @@ Gem::Specification.new do |s|
23
23
  ".rspec",
24
24
  ".rubocop.yml",
25
25
  ".ruby-version",
26
+ ".travis.yml",
26
27
  "Gemfile",
27
28
  "Gemfile.lock",
28
29
  "Guardfile",
@@ -12,7 +12,7 @@ Capistrano::Configuration.instance.load do
12
12
  set_default(:zabbix_password) { 'zabbix' }
13
13
  set_default(:zabbix_period) { 60 * 60 * 10 } # 10 hours
14
14
  set_default(:zabbix_groupid) { 2 }
15
- set_default(:zabbix_auto_trigger) { false }
15
+ set_default(:zabbix_auto_trigger) { true }
16
16
 
17
17
  namespace :zabbix do
18
18
  desc 'Create maintenance in Zabbix'
@@ -25,9 +25,9 @@ Capistrano::Configuration.instance.load do
25
25
  zm_api.delete(id: zm_api.maint_id)
26
26
  end
27
27
  end
28
-
28
+ # has to be set before the plugin is actually required
29
29
  if zabbix_auto_trigger
30
- after 'deploy:setup', 'zabbix:create'
30
+ before 'deploy:update', 'zabbix:create'
31
31
  after 'deploy:restart', 'zabbix:delete'
32
32
  end
33
33
 
@@ -22,8 +22,8 @@ class ZabbixMaintenance
22
22
 
23
23
  def maint_id
24
24
  ret = @zbx.query method: 'maintenance.get', params: {
25
- 'search': {
26
- 'name': @maint_title
25
+ 'search' => {
26
+ 'name' => @maint_title
27
27
  }
28
28
  }
29
29
  begin
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano2-zabbix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marek Skrobacki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-14 00:00:00.000000000 Z
11
+ date: 2015-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zabbixapi
@@ -227,6 +227,7 @@ files:
227
227
  - ".rspec"
228
228
  - ".rubocop.yml"
229
229
  - ".ruby-version"
230
+ - ".travis.yml"
230
231
  - Gemfile
231
232
  - Gemfile.lock
232
233
  - Guardfile