Пример #1
0
 def parseArgs(self):
     opts, args = NagiosPlugin.parseArgs(self)
     if not opts.url:
         print "URL not defined"
         self.usage()
     if not opts.host or opts.host is 'localhost':
         print "Host not defined"
         self.usage()
     self.url = opts.url
     return opts, args
Пример #2
0
 def setupParser(self):
     p = NagiosPlugin.setupParser(self)
     p.add_option('-u', '--url', dest='url',
                  help='URL for page to parse')
     return p