chihuahua 0.0.3 → 0.0.4
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 +27 -14
- data/lib/chihuahua/cli.rb +0 -1
- data/lib/chihuahua/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e654f06f03869d29b9e02c4284c56e9c8294b8fa
|
4
|
+
data.tar.gz: d4b7a5793405a0b8fcc0d606084dfb34c1920463
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6ecf2f09c0e447e0cc0766ed2b5c15687e239ced95a69c2b535dc21b59f6b62ba7f91710793d91f402b2f6bd4f266f922d861dd3a3b3a2e8c5aed1236cd5462
|
7
|
+
data.tar.gz: ca832b20dd3e8a8424ad35aad77a3e6b5836c0f36e62a94b10c8760efb984236aaec14c7478c112ffb6d12ea34688bb271ea84d78e1de1dbefc6522bffc35892
|
data/README.md
CHANGED
@@ -12,29 +12,42 @@ Chihuahua は [Datadog monitors](http://docs.datadoghq.com/guides/monitoring/)
|
|
12
12
|
|
13
13
|
## Installation
|
14
14
|
|
15
|
+
Add this line to your application's Gemfile:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
gem 'chihuahua'
|
19
|
+
```
|
20
|
+
|
21
|
+
And then execute:
|
22
|
+
|
15
23
|
```sh
|
16
|
-
|
17
|
-
cd chihuahua
|
18
|
-
bundle install --path vendor/bundle
|
24
|
+
$ bundle
|
19
25
|
```
|
20
26
|
|
27
|
+
Or install it yourself as:
|
28
|
+
|
29
|
+
```sh
|
30
|
+
$ gem install chihuahua
|
31
|
+
```
|
32
|
+
|
33
|
+
|
21
34
|
## Usage
|
22
35
|
|
23
36
|
```sh
|
24
37
|
export DATADOG_API_KEY=...
|
25
38
|
export DATADOG_APP_KEY=...
|
26
39
|
|
27
|
-
bundle exec
|
28
|
-
bundle exec
|
40
|
+
bundle exec chihuahua init
|
41
|
+
bundle exec chihuahua export --project=your_project_name --tags=project:foo,stage:production
|
29
42
|
vi ./monitors/your_project_name/monitors.yml
|
30
|
-
bundle exec
|
31
|
-
bundle exec
|
43
|
+
bundle exec chihuahua apply --project=your_project_name --dry-run
|
44
|
+
bundle exec chihuahua apply --project=your_project_name
|
32
45
|
```
|
33
46
|
|
34
47
|
## Help
|
35
48
|
|
36
49
|
```
|
37
|
-
$ bundle exec
|
50
|
+
$ bundle exec chihuahua --help
|
38
51
|
Commands:
|
39
52
|
chihuahua apply # Monitor 設定を apply する
|
40
53
|
chihuahua export # Monitor 設定を export する
|
@@ -51,7 +64,7 @@ Commands:
|
|
51
64
|
#
|
52
65
|
# 初回の書き出し
|
53
66
|
#
|
54
|
-
$ bundle exec
|
67
|
+
$ bundle exec chihuahua export --project=foo --tags=host:vagrant-ubuntu-trusty-64
|
55
68
|
Export...
|
56
69
|
4 monitors output done.
|
57
70
|
|
@@ -66,7 +79,7 @@ monitors/
|
|
66
79
|
#
|
67
80
|
# 2 回目以降、絞込の条件(--name や --tags に変更が無い場合)
|
68
81
|
#
|
69
|
-
$ bundle exec
|
82
|
+
$ bundle exec chihuahua export --project=foo
|
70
83
|
|
71
84
|
```
|
72
85
|
|
@@ -95,7 +108,7 @@ $ bundle exec ./bin/chihuahua export --project=foo
|
|
95
108
|
- dry-run
|
96
109
|
|
97
110
|
```sh
|
98
|
-
$ bundle exec
|
111
|
+
$ bundle exec chihuahua apply --project=foo --dry-run
|
99
112
|
Apply...(dry-run)
|
100
113
|
Check add line.
|
101
114
|
---
|
@@ -115,7 +128,7 @@ options:
|
|
115
128
|
- apply
|
116
129
|
|
117
130
|
```sh
|
118
|
-
$ bundle exec
|
131
|
+
$ bundle exec chihuahua apply --project=foo
|
119
132
|
Apply...
|
120
133
|
Add line.
|
121
134
|
...
|
@@ -155,7 +168,7 @@ done.
|
|
155
168
|
- dry-run
|
156
169
|
|
157
170
|
```sh
|
158
|
-
$ bundle exec
|
171
|
+
$ bundle exec chihuahua apply --project=foo --dry-run
|
159
172
|
Apply...(dry-run)
|
160
173
|
Check update line.
|
161
174
|
---
|
@@ -183,7 +196,7 @@ Check update line.
|
|
183
196
|
- apply
|
184
197
|
|
185
198
|
```sh
|
186
|
-
$ bundle exec
|
199
|
+
$ bundle exec chihuahua apply --project=foo
|
187
200
|
Apply...
|
188
201
|
Update line.
|
189
202
|
...
|
data/lib/chihuahua/cli.rb
CHANGED
@@ -32,7 +32,6 @@ module Chihuahua
|
|
32
32
|
args = {}
|
33
33
|
args['name'] = options[:name]
|
34
34
|
args['tags'] = options[:tags]
|
35
|
-
p args.class
|
36
35
|
exporter = Chihuahua::Export.new(options[:project], args)
|
37
36
|
monitors_data = exporter.export_monitors(options[:project])
|
38
37
|
exporter.store_monitors_data(monitors_data)
|
data/lib/chihuahua/version.rb
CHANGED