imedo_monitoring 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,16 @@
|
|
1
|
+
module Imedo
|
2
|
+
class MonitoringController < ApplicationController
|
3
|
+
def monitor
|
4
|
+
result = ActiveRecord::Base.connection.select_all("select 1 from dual")
|
5
|
+
if result == [{"1" => "1"}]
|
6
|
+
render :status => 200, :text => "OK"
|
7
|
+
else
|
8
|
+
render :status => 502, :text => "FAILED"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def ping
|
13
|
+
render :text => 'pong'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
%w{ controllers }.each do |dir|
|
2
|
+
path = File.join(File.dirname(__FILE__), 'app', dir)
|
3
|
+
$LOAD_PATH << path
|
4
|
+
ActiveSupport::Dependencies.load_paths << path
|
5
|
+
ActiveSupport::Dependencies.load_once_paths.delete(path)
|
6
|
+
end
|
7
|
+
|
8
|
+
require File.join(File.dirname(__FILE__), 'imedo_monitoring', 'routing')
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module ImedoMonitoring
|
2
|
+
module Routing
|
3
|
+
module MapperExtensions
|
4
|
+
def imedo_monitoring
|
5
|
+
@set.add_route("/monitoring/ping", {:controller => "imedo/monitoring", :action => "ping"})
|
6
|
+
@set.add_route("/monitoring/monitor", {:controller => "imedo/monitoring", :action => "monitor"})
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
ActionController::Routing::RouteSet::Mapper.send :include, ImedoMonitoring::Routing::MapperExtensions
|
13
|
+
|
data/rails/init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "..", "lib", "imedo_monitoring")
|
metadata
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: imedo_monitoring
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Imedo GmbH
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-05-31 00:00:00 +02:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: activesupport
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - "="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 5
|
30
|
+
segments:
|
31
|
+
- 2
|
32
|
+
- 3
|
33
|
+
- 3
|
34
|
+
version: 2.3.3
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: actionpack
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - "="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 5
|
46
|
+
segments:
|
47
|
+
- 2
|
48
|
+
- 3
|
49
|
+
- 3
|
50
|
+
version: 2.3.3
|
51
|
+
type: :runtime
|
52
|
+
version_requirements: *id002
|
53
|
+
description:
|
54
|
+
email:
|
55
|
+
- entwickler@imedo.de
|
56
|
+
executables: []
|
57
|
+
|
58
|
+
extensions: []
|
59
|
+
|
60
|
+
extra_rdoc_files: []
|
61
|
+
|
62
|
+
files:
|
63
|
+
- lib/app/controllers/imedo/monitoring_controller.rb
|
64
|
+
- lib/imedo_monitoring.rb
|
65
|
+
- lib/imedo_monitoring/routing.rb
|
66
|
+
- lib/imedo_monitoring/version.rb
|
67
|
+
- rails/init.rb
|
68
|
+
has_rdoc: true
|
69
|
+
homepage: http://www.imedo.de
|
70
|
+
licenses: []
|
71
|
+
|
72
|
+
post_install_message:
|
73
|
+
rdoc_options: []
|
74
|
+
|
75
|
+
require_paths:
|
76
|
+
- lib
|
77
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
+
none: false
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
hash: 3
|
83
|
+
segments:
|
84
|
+
- 0
|
85
|
+
version: "0"
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
hash: 3
|
92
|
+
segments:
|
93
|
+
- 0
|
94
|
+
version: "0"
|
95
|
+
requirements: []
|
96
|
+
|
97
|
+
rubyforge_project:
|
98
|
+
rubygems_version: 1.3.7
|
99
|
+
signing_key:
|
100
|
+
specification_version: 3
|
101
|
+
summary: App slice providing monitoring routes
|
102
|
+
test_files: []
|
103
|
+
|