Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
nagios-plugins-rhev
> check_rhev-host.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File check_rhev-host.patch of Package nagios-plugins-rhev (Revision 7)
Currently displaying revision
7
,
show latest
--- check_rhev.orig 2012-02-21 11:35:30.661735279 +0100 +++ check_rhev 2012-02-21 11:44:52.131181664 +0100 @@ -24,12 +24,6 @@ WARNING = 1 CRITICAL = 2 -############### -# ATTENTION: # -############### -# Add your rhev-h host below, like "192.168.1.101,192.168.1.102, ..." -HOSTS = "" - # General macros VDSM_PORT = 54321 TIMEOUT_SOCKET_SEC = 5 @@ -103,6 +97,7 @@ usage = "usage: %prog [options] arg" parser = OptionParser(usage) + parser.add_option("-H", "--host", action="store", dest="HOSTS") parser.add_option("-v", "--verbose", action="store_true", dest="verbose") parser.add_option("-q", "--quiet", action="store_false", dest="verbose") parser.add_option("-t", "--type-service", action="store", dest="type_service") @@ -111,7 +106,7 @@ parser.add_option("-p", "--password", action="store", dest="passw") (options, args) = parser.parse_args() - if HOSTS == "": + if options.HOSTS == "": print "UNKNOWN: please add your RHEV-H hosts into check_rhev!" sys.exit(UNKNOWN) @@ -121,7 +116,7 @@ # Generic calls - every option will use them rhev = checkRHEV() - hosts = HOSTS.split(",") + hosts = options.HOSTS.split(",") user = options.user passw = options.passw