check_passenger 0.2 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +101 -12
- data/bin/check_passenger +14 -3
- data/check_passenger.gemspec +1 -1
- data/lib/check_passenger/check.rb +24 -4
- data/lib/check_passenger/multiple_applications_error.rb +4 -0
- data/lib/check_passenger/nagios_check.rb +30 -14
- data/lib/check_passenger/no_application_error.rb +4 -0
- data/lib/check_passenger/parser.rb +2 -2
- data/lib/check_passenger/version.rb +1 -1
- data/lib/check_passenger.rb +2 -0
- data/test/sample_output_3.txt +32 -0
- data/test/test_check.rb +40 -0
- data/test/test_parser.rb +1 -1
- metadata +13 -4
- data/TODO.md +0 -31
data/README.md
CHANGED
@@ -1,29 +1,118 @@
|
|
1
|
-
#
|
1
|
+
# check_passenger
|
2
2
|
|
3
|
-
|
3
|
+
This gem provides a Nagios check command to monitor running Passenger processes and the memory that they use.
|
4
|
+
|
5
|
+
It can report data on a global or per-application basis, and raise warnings and alerts when consumption exceeds given thresholds.
|
4
6
|
|
5
|
-
## Installation
|
6
7
|
|
7
|
-
|
8
|
+
## Installation
|
8
9
|
|
9
|
-
|
10
|
+
The easiest way to install **check\_passenger** is through RubyGems:
|
10
11
|
|
11
|
-
|
12
|
+
# gem install check_passenger
|
12
13
|
|
13
|
-
|
14
|
+
Alternatively, the gem can be built from the source code with `gem build`, and manually installed in the machines where it needs to run.
|
14
15
|
|
15
|
-
|
16
|
+
Either way, the `check_passenger` command should become available in the path—although it may be necessary to perform an additional action, such as running `rbenv rehash` or similar.
|
16
17
|
|
17
|
-
$ gem install check_passenger
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
**check\_passenger** is intended to be executed in the same machine or machines where Passenger is running. It will call `passenger-status` and gather all data from its output.
|
22
|
+
|
23
|
+
Typically, the Nagios service will be running in a separate machine from those being monitored. Remote execution of `check_passenger` is then usually achieved with Nagios Remote Plugin Executor (NRPE), or MK's Remote Plugin Executor (MRPE).
|
24
|
+
|
25
|
+
`check_passenger` reads all necessary settings from the command-line when it's run, and does not take configuration from a file. It supports three working modes depending on the aspect being monitored, which are called with an argument as:
|
26
|
+
|
27
|
+
# check_passenger <mode>
|
28
|
+
|
29
|
+
Where the `<mode>` argument can be on of the following:
|
30
|
+
|
31
|
+
* `processes`: These are the Passenger processes that are currently running, associated to applications.
|
32
|
+
* `live_processes`: Of all the running processes, how many are actually being used. See the section [Passenger Live Processes](#passenger-live-processes) below.
|
33
|
+
* `memory`: Memory occupied by the Passenger processes that are running.
|
34
|
+
|
35
|
+
In addition, **check\_passenger** can be called with the following options:
|
36
|
+
|
37
|
+
* `-n, --app-name`: Limit check to application with *APP_NAME*—see the section [Global or Per-Application Reporting](#global-or-per-application-reporting) below.
|
38
|
+
* `-C, --cache`: Cache parsed output of `passenger-status`—see the section [Data Caching](#data-caching) below.
|
39
|
+
* `-D, --debug`: Let exception raise to the command-line, and keep the output of `passenger-status` in a file for debugging purposes.
|
40
|
+
* `-d, --dump`: Keep the output of `passenger-status` in a file for debugging purposes.
|
41
|
+
* `-a, --include-all`: Apart from reporting on a global counter, add data for the same counter for each running Passenger application—see the section [Global or Per-Application Reporting](#global-or-per-application-reporting) below.
|
42
|
+
* `-p, --passenger-status-path`: Full path to the `passenger-status` command—most of the time not needed.
|
43
|
+
|
44
|
+
To raise warnings and alerts, use the `-w, --warn`, and `-c, --crit` options. Ranges can be provided as described in the [Nagios Plugin Development Guidelines](https://nagios-plugins.org/doc/guidelines.html#THRESHOLDFORMAT). Note that memory is measured in megabytes.
|
45
|
+
|
46
|
+
Finally, run `check_passenger help [mode]` to get usage information on the command-line.
|
47
|
+
|
48
|
+
|
49
|
+
## Global or Per-Application Reporting
|
50
|
+
|
51
|
+
For each of the aspects that **check\_passenger** can monitor (processes, live processes, and memory), it can focus on all the applications running with Passenger, or on a specific application. This is controlled with the `-n` (`--app-name`), and `-a` (`--include-all`) options, as seen in the following examples.
|
52
|
+
|
53
|
+
The following command returns a counter for all the running Passenger processes in the machine:
|
54
|
+
|
55
|
+
# check_passenger processes
|
56
|
+
Passenger 4.0.59 OK - 46 processes|process_count=46;;;0;50
|
57
|
+
|
58
|
+
The next command limits the count to the processes that belong to *APP_NAME*:
|
59
|
+
|
60
|
+
# check_passenger processes --app-name APP_NAME
|
61
|
+
Passenger APP_NAME OK - 20 processes|process_count=20;;;0;
|
62
|
+
|
63
|
+
Where *APP_NAME* is the full path, or a unique part of it, to the root directory of the application. If, for example, each application is installed in its own user directory, this path could be something like `/home/USER/Site`, and only the username would be needed to filter the output for the application—but the full path could be provided.
|
64
|
+
|
65
|
+
If multiple applications match the *APP_NAME* given, **check\_passenger** reports an `UNKNOWN` status. If no application is found by the search string, it is assumed that the application failed and is not running, so **check\_passenger** raises a critical alert.
|
66
|
+
|
67
|
+
Finally, it's possible to obtain a global counter, together with additional counters for each running application, as follows:
|
68
|
+
|
69
|
+
# check_passenger processes --include-all
|
70
|
+
Passenger 4.0.59 OK - 46 processes|process_count=46;;;0;50 /home/APP_NAME_1/Site=20;;;; /home/APP_NAME_2/Site=12;;;; /home/APP_NAME_3/Site=4;;;; /home/APP_NAME_4/Site=10;;;;
|
71
|
+
/home/APP_NAME_1/Site 20 processes
|
72
|
+
/home/APP_NAME_2/Site 12 processes
|
73
|
+
/home/APP_NAME_3/Site 4 processes
|
74
|
+
/home/APP_NAME_4/Site 10 processes
|
75
|
+
|
76
|
+
This allows to monitor a resource, together with how much of it is being used by each application. Note though, that when monitoring a particular counter for all the applications in this way, it won't be possible to set alerts—just add an additional check for the alert you want to set for an application or globally.
|
77
|
+
|
78
|
+
All these examples work the same with processes, live processes, and memory.
|
79
|
+
|
80
|
+
|
81
|
+
## Passenger Live Processes
|
82
|
+
|
83
|
+
Passenger reuses running processes in a sort of LIFO manner. This means that when it needs a process to handle a request, and there are running processes not currently busy handling requests, it will preferably take first the one that was run the most recently. This feature is quite handy to know how many processes a particular application, or all running applications, actually ever execute in parallel.
|
84
|
+
|
85
|
+
In order to estimate the live process count, **check\_passenger** takes a look at those that have been run in the last 300 seconds (or 5 minutes). This works well as long as **check\_passenger** is executed with a periodicity of 5 minutes or less.
|
86
|
+
|
87
|
+
|
88
|
+
## Data Caching
|
89
|
+
|
90
|
+
In order to set alerts per global or application counter, **check\_passenger** must be called successive times with different settings. For example, to raise alerts on global memory consumption:
|
91
|
+
|
92
|
+
# check_passenger memory --warn 6000 --crit 8000
|
93
|
+
Passenger 4.0.59 OK - 4864MB memory used|memory=4864;6000;8000;0;
|
94
|
+
|
95
|
+
And then again, to raise alerts on the memory consumption of a specific application:
|
96
|
+
|
97
|
+
# check_passenger memory --app-name APP_NAME --warn 3000 --crit 4000
|
98
|
+
Passenger APP_NAME OK - 2123MB memory used|memory=2123;3000;4000;0;
|
99
|
+
|
100
|
+
For each call, **check\_passenger** must execute `passenger-status` and parse its output. While the performance penalty should not be high, this can lead to inconsistent data where, for example, the global process count is not equal to the sum of processes for all applications, as it's possible for processes to be started or terminated between calls.
|
101
|
+
|
102
|
+
To avoid this inconsistency, and speed things up a bit in the way, **check\_passenger** can cache the parsed output of `passenger-status`. Just provide the `-C`, or `--cache` command-line option.
|
103
|
+
|
104
|
+
Cached data is stored in the temporary directory of the system, with a time-to-live of just 5 seconds. That is, cached data will be ignored if it's more than 5 seconds old. Therefore, it's recommended that all calls to **check\_passenger** are made one after another, without inserting other checks in the middle that might take longer to complete.
|
105
|
+
|
22
106
|
|
23
107
|
## Contributing
|
24
108
|
|
25
|
-
1. Fork it ( https://github.com/
|
109
|
+
1. Fork it ( https://github.com/aredondo/check_passenger/fork )
|
26
110
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
-
3. Commit your changes (`git commit -am
|
111
|
+
3. Commit your changes (`git commit -am ‘Add some feature'`)
|
28
112
|
4. Push to the branch (`git push origin my-new-feature`)
|
29
113
|
5. Create a new Pull Request
|
114
|
+
|
115
|
+
|
116
|
+
## License
|
117
|
+
|
118
|
+
**check\_passenger** is released under the [MIT License](LICENSE.txt).
|
data/bin/check_passenger
CHANGED
@@ -19,7 +19,7 @@ class CheckPassengerCLI < Thor
|
|
19
19
|
banner: 'Also include counter for all running apps'
|
20
20
|
class_option :passenger_status_path, aliases: 'p', banner: 'Path to passenger-status command'
|
21
21
|
|
22
|
-
desc 'memory', 'Check Passenger
|
22
|
+
desc 'memory', 'Check memory used by Passenger processes'
|
23
23
|
option :warn, banner: 'Memory usage threshold to raise warning status', aliases: 'w'
|
24
24
|
option :crit, banner: 'Memory usage threshold to raise critical status', aliases: 'c'
|
25
25
|
def memory
|
@@ -28,7 +28,7 @@ class CheckPassengerCLI < Thor
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
desc 'processes', 'Check Passenger processes'
|
31
|
+
desc 'processes', 'Check running Passenger processes'
|
32
32
|
option :warn, aliases: 'w', banner: 'Process count threshold to raise warning status'
|
33
33
|
option :crit, aliases: 'c', banner: 'Process count threshold to raise critical status'
|
34
34
|
def processes
|
@@ -37,7 +37,7 @@ class CheckPassengerCLI < Thor
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
desc 'live_processes', 'Check Passenger
|
40
|
+
desc 'live_processes', 'Check live Passenger processes'
|
41
41
|
option :warn, aliases: 'w', banner: 'Live process count threshold to raise warning status'
|
42
42
|
option :crit, aliases: 'c', banner: 'Live process count threshold to raise critical status'
|
43
43
|
def live_processes
|
@@ -98,4 +98,15 @@ class CheckPassengerCLI < Thor
|
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
+
if ARGV.empty? or ARGV.first.downcase == 'help'
|
102
|
+
puts <<BANNER
|
103
|
+
check_passenger #{CheckPassenger::VERSION}, Copyright 2014-#{Time.now.year} MIT License
|
104
|
+
|
105
|
+
check_passenger is a Nagios check command to monitor running Passenger processes
|
106
|
+
and the memory that they use. It can report data on a global or per-application
|
107
|
+
basis, and raise warnings and alerts when consumption exceeds given thresholds.
|
108
|
+
|
109
|
+
BANNER
|
110
|
+
end
|
111
|
+
|
101
112
|
CheckPassengerCLI.start(ARGV)
|
data/check_passenger.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.email = ['alvaro@redondo.name']
|
13
13
|
spec.summary = %q{Nagios check to monitor Passenger processes and memory}
|
14
14
|
# spec.description = %q{TODO: Write a longer description. Optional.}
|
15
|
-
spec.homepage = ''
|
15
|
+
spec.homepage = 'https://github.com/aredondo/check_passenger'
|
16
16
|
spec.license = 'MIT'
|
17
17
|
|
18
18
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -8,9 +8,9 @@ module CheckPassenger
|
|
8
8
|
attr_reader :parsed_data
|
9
9
|
|
10
10
|
COUNTER_LABELS = {
|
11
|
-
live_process_count: '%d live processes',
|
11
|
+
live_process_count: ['%d live process', '%d live processes'],
|
12
12
|
memory: '%dMB memory used',
|
13
|
-
process_count: '%d processes'
|
13
|
+
process_count: ['%d process', '%d processes']
|
14
14
|
}
|
15
15
|
|
16
16
|
def check_counter(counter_name, options = {})
|
@@ -25,7 +25,7 @@ module CheckPassenger
|
|
25
25
|
[
|
26
26
|
options[:app_name] || parsed_data.passenger_version,
|
27
27
|
output_status.to_s.upcase,
|
28
|
-
|
28
|
+
counter_with_label(counter, counter_name)
|
29
29
|
],
|
30
30
|
counter: counter_name.to_s, value: counter,
|
31
31
|
warn: options[:warn], crit: options[:crit],
|
@@ -40,13 +40,17 @@ module CheckPassenger
|
|
40
40
|
parsed_data.application_names.each do |app_name|
|
41
41
|
counter = parsed_data.send(counter_name.to_sym, app_name)
|
42
42
|
output_data << {
|
43
|
-
text: '%s %s' % [app_name,
|
43
|
+
text: '%s %s' % [app_name, counter_with_label(counter, counter_name)],
|
44
44
|
counter: app_name, value: counter
|
45
45
|
}
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
49
|
return [output_status, output_data]
|
50
|
+
|
51
|
+
rescue NoApplicationError => e
|
52
|
+
status = :crit
|
53
|
+
return [status, 'Passenger %s %s - %s' % [e.name, status.to_s.upcase, e.to_s]]
|
50
54
|
end
|
51
55
|
|
52
56
|
def method_missing(method, *args)
|
@@ -64,6 +68,22 @@ module CheckPassenger
|
|
64
68
|
|
65
69
|
private
|
66
70
|
|
71
|
+
def counter_with_label(counter, counter_type)
|
72
|
+
counter_type = counter_type.to_sym
|
73
|
+
|
74
|
+
unless COUNTER_LABELS.keys.include?(counter_type)
|
75
|
+
raise ArgumentError, 'Unknown counter type: %s' % counter_type.to_s
|
76
|
+
end
|
77
|
+
|
78
|
+
label = if COUNTER_LABELS[counter_type].is_a?(Array)
|
79
|
+
counter == 1 ? COUNTER_LABELS[counter_type].first : COUNTER_LABELS[counter_type].last
|
80
|
+
else
|
81
|
+
COUNTER_LABELS[counter_type]
|
82
|
+
end
|
83
|
+
|
84
|
+
label % counter
|
85
|
+
end
|
86
|
+
|
67
87
|
def load_parsed_data(options)
|
68
88
|
@parsed_data = options[:parsed_data]
|
69
89
|
|
@@ -9,33 +9,49 @@ module CheckPassenger
|
|
9
9
|
exit 3
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
13
|
-
unless [:ok, :warn, :crit].include?(status)
|
14
|
-
raise ArgumentError, 'Invalid status provided: %s' % status.to_s
|
15
|
-
end
|
16
|
-
|
12
|
+
def nagios_format_output(data)
|
17
13
|
data = [data] unless data.is_a?(Array)
|
18
14
|
main_status = nil
|
19
15
|
status_data = []
|
20
16
|
perf_data = []
|
21
17
|
|
22
18
|
data.each do |line|
|
23
|
-
|
19
|
+
case line
|
20
|
+
when String
|
21
|
+
status_text = line
|
22
|
+
when Hash
|
23
|
+
status_text = line[:text]
|
24
|
+
perf_data << '%s=%d;%s;%s;%s;%s' % [
|
25
|
+
line[:counter], line[:value],
|
26
|
+
line[:warn], line[:crit],
|
27
|
+
line[:min], line[:max]
|
28
|
+
]
|
29
|
+
else
|
30
|
+
raise ArgumentError
|
31
|
+
end
|
24
32
|
|
25
33
|
if main_status.nil?
|
26
|
-
main_status =
|
34
|
+
main_status = status_text
|
27
35
|
else
|
28
|
-
status_data <<
|
36
|
+
status_data << status_text
|
29
37
|
end
|
38
|
+
end
|
30
39
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
40
|
+
[main_status, status_data, perf_data]
|
41
|
+
end
|
42
|
+
|
43
|
+
def nagios_output(status, data)
|
44
|
+
unless [:ok, :warn, :crit].include?(status)
|
45
|
+
raise ArgumentError, 'Invalid status provided: %s' % status.to_s
|
36
46
|
end
|
37
47
|
|
38
|
-
|
48
|
+
main_status, status_data, perf_data = nagios_format_output(data)
|
49
|
+
|
50
|
+
if perf_data.is_a?(Array) and perf_data.any?
|
51
|
+
puts '%s|%s' % [main_status, perf_data.join(' ')]
|
52
|
+
else
|
53
|
+
puts main_status
|
54
|
+
end
|
39
55
|
status_data.each { |status_datum| puts status_datum }
|
40
56
|
|
41
57
|
exit EXIT_CODES[status]
|
@@ -46,9 +46,9 @@ module CheckPassenger
|
|
46
46
|
if app_name
|
47
47
|
data = @application_data.select { |d| d[:name].include?(app_name) }
|
48
48
|
if data.size == 0
|
49
|
-
raise
|
49
|
+
raise NoApplicationError.new('Could not find an application by "%s"' % app_name, app_name)
|
50
50
|
elsif data.size > 1
|
51
|
-
raise
|
51
|
+
raise MultipleApplicationsError.new('More than one application match "%s"' % app_name, app_name)
|
52
52
|
else
|
53
53
|
return data.first
|
54
54
|
end
|
data/lib/check_passenger.rb
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
Version : 4.0.59
|
2
|
+
Date : 2015-05-30 01:53:14 +0200
|
3
|
+
Instance: 1965
|
4
|
+
----------- General information -----------
|
5
|
+
Max pool size : 50
|
6
|
+
Processes : 6
|
7
|
+
Requests in top-level queue : 0
|
8
|
+
|
9
|
+
----------- Application groups -----------
|
10
|
+
/home/application_1/Site#default:
|
11
|
+
App root: /home/application_1/Site
|
12
|
+
Requests in queue: 0
|
13
|
+
* PID: 14518 Sessions: 0 Processed: 11723 Uptime: 20h 8m 7s
|
14
|
+
CPU: 0% Memory : 144M Last used: 1m 33s ag
|
15
|
+
|
16
|
+
/home/application_2/Site#default:
|
17
|
+
App root: /home/application_2/Site
|
18
|
+
Requests in queue: 0
|
19
|
+
* PID: 14134 Sessions: 0 Processed: 2313 Uptime: 20h 8m 10s
|
20
|
+
CPU: 0% Memory : 63M Last used: 6h 22m 4
|
21
|
+
|
22
|
+
/home/application_3/Site#default:
|
23
|
+
App root: /home/application_3/Site
|
24
|
+
Requests in queue: 0
|
25
|
+
* PID: 21058 Sessions: 0 Processed: 725 Uptime: 2d 22h 35m 38s
|
26
|
+
CPU: 0% Memory : 30M Last used: 5m 4
|
27
|
+
* PID: 21071 Sessions: 0 Processed: 0 Uptime: 2d 22h 35m 38s
|
28
|
+
CPU: 0% Memory : 15M Last used: 2d 2
|
29
|
+
* PID: 21078 Sessions: 0 Processed: 0 Uptime: 2d 22h 35m 38s
|
30
|
+
CPU: 0% Memory : 15M Last used: 2d 2
|
31
|
+
* PID: 21085 Sessions: 0 Processed: 0 Uptime: 2d 22h 35m 38s
|
32
|
+
CPU: 0% Memory : 15M Last used: 2d 2
|
data/test/test_check.rb
CHANGED
@@ -119,4 +119,44 @@ describe CheckPassenger::Check do
|
|
119
119
|
end
|
120
120
|
end
|
121
121
|
end
|
122
|
+
|
123
|
+
describe 'sample output 3' do
|
124
|
+
before do
|
125
|
+
sample_path = File.expand_path('sample_output_3.txt', File.dirname(__FILE__))
|
126
|
+
data = File.read(sample_path)
|
127
|
+
@parsed_data = CheckPassenger::Parser.new(data)
|
128
|
+
end
|
129
|
+
|
130
|
+
it 'correctly uses singular/plural when reporting counts' do
|
131
|
+
options = { parsed_data: @parsed_data }
|
132
|
+
output_status, output_data = CheckPassenger::Check.process_count(options)
|
133
|
+
assert output_data.first[:text] =~ /\b6 processes\b/, output_data.first[:text]
|
134
|
+
output_status, output_data = CheckPassenger::Check.live_process_count(options)
|
135
|
+
assert output_data.first[:text] =~ /\b1 live process\b/, output_data.first[:text]
|
136
|
+
|
137
|
+
options = { parsed_data: @parsed_data, app_name: 'application_1' }
|
138
|
+
output_status, output_data = CheckPassenger::Check.process_count(options)
|
139
|
+
assert output_data.first[:text] =~ /\b1 process\b/, output_data.first[:text]
|
140
|
+
output_status, output_data = CheckPassenger::Check.live_process_count(options)
|
141
|
+
assert output_data.first[:text] =~ /\b1 live process\b/, output_data.first[:text]
|
142
|
+
|
143
|
+
options = { parsed_data: @parsed_data, app_name: 'application_2' }
|
144
|
+
output_status, output_data = CheckPassenger::Check.process_count(options)
|
145
|
+
assert output_data.first[:text] =~ /\b1 process\b/, output_data.first[:text]
|
146
|
+
output_status, output_data = CheckPassenger::Check.live_process_count(options)
|
147
|
+
assert output_data.first[:text] =~ /\b0 live processes\b/, output_data.first[:text]
|
148
|
+
|
149
|
+
options = { parsed_data: @parsed_data, app_name: 'application_3' }
|
150
|
+
output_status, output_data = CheckPassenger::Check.process_count(options)
|
151
|
+
assert output_data.first[:text] =~ /\b4 processes\b/, output_data.first[:text]
|
152
|
+
output_status, output_data = CheckPassenger::Check.live_process_count(options)
|
153
|
+
assert output_data.first[:text] =~ /\b0 live processes\b/, output_data.first[:text]
|
154
|
+
end
|
155
|
+
|
156
|
+
it 'raises an alert if the application is not running' do
|
157
|
+
options = { parsed_data: @parsed_data, app_name: 'application_4' }
|
158
|
+
output_status, output_data = CheckPassenger::Check.process_count(options)
|
159
|
+
assert_equal :crit, output_status, output_data.inspect
|
160
|
+
end
|
161
|
+
end
|
122
162
|
end
|
data/test/test_parser.rb
CHANGED
@@ -109,7 +109,7 @@ describe CheckPassenger::Parser do
|
|
109
109
|
end
|
110
110
|
|
111
111
|
it 'raises exception if term matches multiple apps' do
|
112
|
-
assert_raises
|
112
|
+
assert_raises CheckPassenger::MultipleApplicationsError do
|
113
113
|
@parser.memory('application')
|
114
114
|
end
|
115
115
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: check_passenger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0
|
4
|
+
version: '1.0'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-05-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -104,12 +104,13 @@ files:
|
|
104
104
|
- LICENSE.txt
|
105
105
|
- README.md
|
106
106
|
- Rakefile
|
107
|
-
- TODO.md
|
108
107
|
- bin/check_passenger
|
109
108
|
- check_passenger.gemspec
|
110
109
|
- lib/check_passenger.rb
|
111
110
|
- lib/check_passenger/check.rb
|
111
|
+
- lib/check_passenger/multiple_applications_error.rb
|
112
112
|
- lib/check_passenger/nagios_check.rb
|
113
|
+
- lib/check_passenger/no_application_error.rb
|
113
114
|
- lib/check_passenger/parser.rb
|
114
115
|
- lib/check_passenger/passenger_status.rb
|
115
116
|
- lib/check_passenger/status_output_error.rb
|
@@ -117,12 +118,13 @@ files:
|
|
117
118
|
- test/passenger-status
|
118
119
|
- test/sample_output_1.txt
|
119
120
|
- test/sample_output_2.txt
|
121
|
+
- test/sample_output_3.txt
|
120
122
|
- test/test_check.rb
|
121
123
|
- test/test_helper.rb
|
122
124
|
- test/test_nagios_check.rb
|
123
125
|
- test/test_parser.rb
|
124
126
|
- test/test_passenger_status.rb
|
125
|
-
homepage:
|
127
|
+
homepage: https://github.com/aredondo/check_passenger
|
126
128
|
licenses:
|
127
129
|
- MIT
|
128
130
|
post_install_message:
|
@@ -135,12 +137,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
135
137
|
- - ! '>='
|
136
138
|
- !ruby/object:Gem::Version
|
137
139
|
version: '0'
|
140
|
+
segments:
|
141
|
+
- 0
|
142
|
+
hash: 2306355991957231543
|
138
143
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
144
|
none: false
|
140
145
|
requirements:
|
141
146
|
- - ! '>='
|
142
147
|
- !ruby/object:Gem::Version
|
143
148
|
version: '0'
|
149
|
+
segments:
|
150
|
+
- 0
|
151
|
+
hash: 2306355991957231543
|
144
152
|
requirements: []
|
145
153
|
rubyforge_project:
|
146
154
|
rubygems_version: 1.8.29
|
@@ -151,6 +159,7 @@ test_files:
|
|
151
159
|
- test/passenger-status
|
152
160
|
- test/sample_output_1.txt
|
153
161
|
- test/sample_output_2.txt
|
162
|
+
- test/sample_output_3.txt
|
154
163
|
- test/test_check.rb
|
155
164
|
- test/test_helper.rb
|
156
165
|
- test/test_nagios_check.rb
|
data/TODO.md
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# Release
|
2
|
-
|
3
|
-
- README page.
|
4
|
-
- Add summary to command help.
|
5
|
-
|
6
|
-
|
7
|
-
# Fix
|
8
|
-
|
9
|
-
- Handle error:
|
10
|
-
|
11
|
-
```
|
12
|
-
It appears that multiple Passenger instances are running. Please select a
|
13
|
-
specific one by running:
|
14
|
-
|
15
|
-
passenger-status <PID>
|
16
|
-
|
17
|
-
The following Passenger instances are running:
|
18
|
-
PID: 1394
|
19
|
-
PID: 1413
|
20
|
-
```
|
21
|
-
|
22
|
-
- "1 live processes" should be "1 live process"
|
23
|
-
|
24
|
-
|
25
|
-
# Other
|
26
|
-
|
27
|
-
- Option `all` to monitor all counters for all applications and globally,
|
28
|
-
without possibility to raise alerts.
|
29
|
-
- PerfDatum class.
|
30
|
-
- Option to set TTL used to estimate live processes.
|
31
|
-
- Option to set TTL of cached data.
|