graylog2-client 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -4
- data/lib/graylog2-client/parser.rb +3 -1
- data/lib/graylog2-client/version.rb +1 -1
- metadata +24 -14
data/README.md
CHANGED
@@ -24,10 +24,7 @@ Usage
|
|
24
24
|
You will need to set some configurations:
|
25
25
|
|
26
26
|
config = {
|
27
|
-
:
|
28
|
-
:password => "p4s5w0rd",
|
29
|
-
:url => "http://graylog2.yourcompany.com",
|
30
|
-
:stream_id => "000000000000000000000000"
|
27
|
+
:url => "http://graylogbackend:9200/graylog2/_search"
|
31
28
|
}
|
32
29
|
|
33
30
|
The `stream_id` is the id from the required graylog stream.
|
@@ -21,7 +21,9 @@ module Graylog2Client
|
|
21
21
|
})
|
22
22
|
response = HTTParty.get(url, :body => params)
|
23
23
|
hits = response["hits"]["hits"]
|
24
|
-
|
24
|
+
|
25
|
+
hits.sort_by! {|m| m["_source"]["created_at"]}
|
26
|
+
hits.map {|m| m["_source"]["message"]}
|
25
27
|
end
|
26
28
|
end
|
27
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graylog2-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-07-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|
17
|
-
requirement:
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,15 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements:
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0'
|
26
31
|
- !ruby/object:Gem::Dependency
|
27
32
|
name: rspec
|
28
|
-
requirement:
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
29
34
|
none: false
|
30
35
|
requirements:
|
31
36
|
- - ! '>='
|
@@ -33,7 +38,12 @@ dependencies:
|
|
33
38
|
version: '0'
|
34
39
|
type: :development
|
35
40
|
prerelease: false
|
36
|
-
version_requirements:
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
37
47
|
description: A simple gem to search on a graylog2 server
|
38
48
|
email:
|
39
49
|
- pothix@pothix.com
|
@@ -42,16 +52,16 @@ executables: []
|
|
42
52
|
extensions: []
|
43
53
|
extra_rdoc_files: []
|
44
54
|
files:
|
45
|
-
- ./Gemfile
|
46
55
|
- ./graylog2-client.gemspec
|
47
|
-
- ./
|
48
|
-
- ./
|
49
|
-
- ./lib/graylog2-client.rb
|
50
|
-
- ./LICENSE
|
56
|
+
- ./spec/spec_helper.rb
|
57
|
+
- ./spec/graylog2-client.rb
|
51
58
|
- ./Rakefile
|
59
|
+
- ./Gemfile
|
52
60
|
- ./README.md
|
53
|
-
- ./
|
54
|
-
- ./
|
61
|
+
- ./LICENSE
|
62
|
+
- ./lib/graylog2-client.rb
|
63
|
+
- ./lib/graylog2-client/version.rb
|
64
|
+
- ./lib/graylog2-client/parser.rb
|
55
65
|
homepage: http://github.com/locaweb/graylog2-client
|
56
66
|
licenses: []
|
57
67
|
post_install_message:
|
@@ -72,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
82
|
version: '0'
|
73
83
|
requirements: []
|
74
84
|
rubyforge_project:
|
75
|
-
rubygems_version: 1.8.
|
85
|
+
rubygems_version: 1.8.23
|
76
86
|
signing_key:
|
77
87
|
specification_version: 3
|
78
88
|
summary: This gem provides a simple interface to search on a graylog server for a
|