dogwatch 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dogwatch/version.rb +1 -1
- metadata +3 -69
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cd76b5e962e718554b2c4dff70418bd0e7baf53
|
4
|
+
data.tar.gz: e3f7dc83cbcea15b11bb904b39acc20da5b7e55c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 763a083f222e91cc2e6786a38360d1354a3a715dd46f816d4d8e184ea4e064979e230999b93b9efb8260e68252183e9b41d65ca3028159228583ec0913199abf
|
7
|
+
data.tar.gz: 871dbc3204a5ed8b46445e76e3c865baff775e275998856a120ada786578b7437ce3ba1a418deda79dbe19b5696857c2695cbb018ec273071acd8c1c35dd8845
|
data/lib/dogwatch/version.rb
CHANGED
@@ -2,5 +2,5 @@
|
|
2
2
|
module DogWatch
|
3
3
|
VERSION = IO.read(File.expand_path('../../../VERSION', __FILE__)) rescue '0.0.1'
|
4
4
|
SUMMARY = 'A DSL to create DataDog Monitors'
|
5
|
-
DESCRIPTION =
|
5
|
+
DESCRIPTION = 'DogWatch provides a simple method for creating DataDog monitors in Ruby.'
|
6
6
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dogwatch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Greene
|
@@ -38,73 +38,7 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.19'
|
41
|
-
description:
|
42
|
-
# DogWatch
|
43
|
-
|
44
|
-
_A DSL to create DataDog monitors_
|
45
|
-
|
46
|
-
This gem is designed to provide a simple method for creating DataDog monitors in Ruby.
|
47
|
-
|
48
|
-
## Installation
|
49
|
-
Add this line to your application's Gemfile:
|
50
|
-
|
51
|
-
```ruby
|
52
|
-
gem 'dogwatch'
|
53
|
-
```
|
54
|
-
|
55
|
-
And then execute:
|
56
|
-
```shell
|
57
|
-
$ bundle exec dogwatch create [--dogfile=DOGFILE] [--api_key=API KEY] [--app_key=APP KEY]
|
58
|
-
```
|
59
|
-
Or install it yourself as:
|
60
|
-
```shell
|
61
|
-
$ gem install dogwatch
|
62
|
-
```
|
63
|
-
|
64
|
-
## Credentials
|
65
|
-
[DataDog API credentials](https://app.datadoghq.com/account/settings#api) are required.
|
66
|
-
|
67
|
-
Generate both an api key and an app key and either place them in a file named `~/.dogwatch/credentials` or pass them via the command line.
|
68
|
-
|
69
|
-
A sample credentials file is provided in the `example` directory.
|
70
|
-
## Usage
|
71
|
-
|
72
|
-
DogWatch is a thin DSL over the [DataDog ruby client](https://github.com/DataDog/dogapi-rb) that handles generating DataDog monitors.
|
73
|
-
|
74
|
-
The following is an example of a `Dogfile`:
|
75
|
-
```ruby
|
76
|
-
require 'dogwatch'
|
77
|
-
|
78
|
-
DogWatch.monitor do
|
79
|
-
## Create a new monitor - monitor name is REQUIRED
|
80
|
-
monitor 'MONITOR NAME' do
|
81
|
-
type :metric_alert # REQUIRED: One of [:metric_alert | :service_check | :event_alert]
|
82
|
-
query 'QUERY' # REQUIRED
|
83
|
-
message 'MESSAGE'
|
84
|
-
tags %w(A list of tags to associate with your monitor)
|
85
|
-
|
86
|
-
options do
|
87
|
-
silenced '*': nil
|
88
|
-
notify_no_data false
|
89
|
-
no_data_timeframe 3
|
90
|
-
timeout_h 99
|
91
|
-
renotify_interval 60
|
92
|
-
escalation_message 'oh snap'
|
93
|
-
include_tags true
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
```
|
98
|
-
|
99
|
-
Monitors that already exist are matched by name and updated accordingly. If the name isn't matched exactly, DogWatch assumes you want a new monitor.
|
100
|
-
|
101
|
-
A sample `Dogfile` is provided in the `example` directory.
|
102
|
-
|
103
|
-
For a full list of options and a description of each parameter, see [DataDog's API documentation](http://docs.datadoghq.com/api/#monitors).
|
104
|
-
|
105
|
-
## TO DO
|
106
|
-
* More descriptive errors
|
107
|
-
* Better error handling if a monitor fails local validation
|
41
|
+
description: DogWatch provides a simple method for creating DataDog monitors in Ruby.
|
108
42
|
email:
|
109
43
|
- David_Greene@rapid7.com
|
110
44
|
executables:
|
@@ -165,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
99
|
version: '0'
|
166
100
|
requirements: []
|
167
101
|
rubyforge_project:
|
168
|
-
rubygems_version: 2.4.
|
102
|
+
rubygems_version: 2.4.3
|
169
103
|
signing_key:
|
170
104
|
specification_version: 4
|
171
105
|
summary: A DSL to create DataDog Monitors
|