Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Skip checking servers which are down - the services logically will be…

… too, and we should already have alerted on the host
  • Loading branch information...
commit fb108fb4a9a56d2ac1a89f3495561f4621e63586 1 parent 8ab1e38
@jonlives authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  check_check.rb
View
2  check_check.rb
@@ -34,6 +34,8 @@ def update
def services(service_pattern=nil, host_pattern=nil)
matches = []
self.hosts(host_pattern).each do |host, hostinfo|
+ #Skip hosts if the host is down - obviously the services will be too, and we should already have alerted on the host.
+ next if hostinfo[current_state].to_i != 0
# Skip hosts if there is no hostinfo (no services associated, etc).
next if hostinfo["servicestatus"].nil?
# Skip hosts if they are in scheduled downtime
Please sign in to comment.
Something went wrong with that request. Please try again.