Example #1
0
 def setupParser(self):
     p = Nagios.setupParser(self)
     p.add_option('-H', '--hostname', dest='host', 
                  default='localhost',
                  help='Host name of the db server')
     p.add_option('-w', '--warn', dest='warn', 
                  default=self.default_warn, 
                  help='Percentage at which to send a warning message')
     p.add_option('-c', '--critical', dest='crit', 
                  default=self.default_critical,
                  help='Percentage at which to send a critical message')
     return p
Example #2
0
 def __init__(self):
     Nagios.__init__(self)
     self.vars = readEnv()
Example #3
0
 def parseArgs(self):
     opts, args = Nagios.parseArgs(self)
     self.host = opts.host
     self.warn = float(opts.warn)
     self.crit = float(opts.crit)
     return opts, args