nagios-manage 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/check_check.rb +10 -3
  2. metadata +3 -3
data/bin/check_check.rb CHANGED
@@ -144,10 +144,17 @@ def main(args)
144
144
  end
145
145
  end # if results[state]
146
146
  end # for each non-OK state
147
-
148
147
 
149
- #total = results.values.reduce(0) { |sum, val| sum += val }
150
- return 0
148
+ exitcode = 0
149
+
150
+ if results["WARNING"].length > 0
151
+ exitcode = 1
152
+ end
153
+
154
+ if results["CRITICAL"].length > 0
155
+ exitcode = 2
156
+ end
157
+ return exitcode
151
158
  end
152
159
 
153
160
  exit(main(ARGV))
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nagios-manage
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 0
10
- version: 0.5.0
9
+ - 1
10
+ version: 0.5.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - R.I. Pienaar, Jordan Sissel