sensu-handlers-elasticsearch 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/bin/handler-elasticsearch.rb +2 -1
- data/lib/sensu-handlers-elasticsearch/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: 6b7e91f0b3521822ea91deca9442f3d73fb3b7fc
|
4
|
+
data.tar.gz: c9b3e7d238c57aa556c4c9e8f5731e790a9a5db4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6ed829cea39ab60b2637f216afd435651307278a2152fda9865d2033553f80b024224c9271c09cac31254b817568e4fa2afacd4344990db40b7dcbe81b35231
|
7
|
+
data.tar.gz: d3c6327aac5ed11e03f550e9ae50717c008599923cb191f3fe92e45fe973c735efb57d4542be7cac3967b867077c14d4473ea8b3eec4861701b77f7c7506bb86
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
5
5
|
|
6
6
|
## Unreleased
|
7
7
|
|
8
|
+
## [0.0.3] - 2016-01-12
|
9
|
+
### Added
|
10
|
+
- Using strftime for better formatting
|
11
|
+
|
8
12
|
## [0.0.2] - 2016-01-12
|
9
13
|
### Added
|
10
14
|
- Adding support for date interpolation in the ES index
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ The handler accepts the following command line options:
|
|
8
8
|
|
9
9
|
```
|
10
10
|
Usage: handler-elasticsearch.rb (options)
|
11
|
-
-i, --index <INDEX> Elasticsearch index (default: sensu)
|
11
|
+
-i, --index <INDEX> Elasticsearch index (default: sensu-%{Y}.%{m}.%{d})
|
12
12
|
-t, --type <TYPE> Elasticsearch index type (default: handler)
|
13
13
|
-u, --url <URL> Elasticsearch URL
|
14
14
|
```
|
@@ -47,7 +47,8 @@ class HandlerElasticsearch < Sensu::Handler
|
|
47
47
|
}
|
48
48
|
|
49
49
|
# interpolate %Y, %m and %d with today's date
|
50
|
-
|
50
|
+
now = Time.now
|
51
|
+
index = config[:index] % {:Y => now.strftime('%Y'), :m => now.strftime('%m'), :d => now.strftime('%d')}
|
51
52
|
|
52
53
|
uri = URI("#{config[:url]}/#{index}/#{config[:type]}/#{@event['id']}")
|
53
54
|
http = Net::HTTP.new(uri.host, uri.port)
|