def buildOptions(self, parser): parser.add_option('--debug', dest='debug', default=False, action='store_true', help='Increase logging verbosity.') parser.add_option( '--proxywmi', dest='proxywmi', default=False, action='store_true', help='Use a process proxy to avoid long-term blocking') parser.add_option('--queryTimeout', dest='queryTimeout', default=None, type='int', help='The number of milliseconds to wait for ' 'WMI query to respond. Overrides the ' 'server settings.') parser.add_option('--batchSize', dest='batchSize', default=None, type='int', help='Number of data objects to retrieve in a ' 'single WMI query.') parser.add_option('--statusRefresh', dest='statusRefresh', default=15, type='int', help='An interval in minutes at which the ' 'status of every monitored service on ' 'the device will be refreshed. ' 'Defaults to 15 minutes.') addNTLMv2Option(parser)
def buildOptions(self): """ Build our list of command-line options """ PBDaemon.buildOptions(self) self.parser.add_option('--debug', dest='debug', action="store_true", default=False, help="Don't fork threads for processing") self.parser.add_option('--nowmi', dest='nowmi', action="store_true", default=not USE_WMI, help="Do not execute WMI plugins") self.parser.add_option('--parallel', dest='parallel', type='int', default=defaultParallel, help="Number of devices to collect from in parallel") self.parser.add_option('--cycletime', dest='cycletime', type='int', help="Run collection every x minutes") self.parser.add_option('--ignore', dest='ignorePlugins',default="", help="Modeler plugins to ignore. Takes a regular expression") self.parser.add_option('--collect', dest='collectPlugins',default="", help="Modeler plugins to use. Takes a regular expression") self.parser.add_option('-p', '--path', dest='path', help="Start class path for collection ie /NetworkDevices") self.parser.add_option('-d', '--device', dest='device', help="Fully qualified device name ie www.confmon.com") self.parser.add_option('--startat', dest='startat', help="Start string in cron(8) format") self.parser.add_option('-a', '--collage', dest='collage', default=0, type='float', help="Do not collect from devices whose collect date " + "is within this many minutes") self.parser.add_option('--writetries', dest='writetries',default=2,type='int', help="Number of times to try to write if a " "read conflict is found") # FIXME: cleanup --force option #2660 self.parser.add_option("-F", "--force", dest="force", action='store_true', default=True, help="Force collection of config data (deprecated)") self.parser.add_option('--portscantimeout', dest='portscantimeout', type='int', default=defaultPortScanTimeout, help="Time to wait for connection failures when port scanning") self.parser.add_option('--now', dest='now', action="store_true", default=False, help="Start daemon now, do not sleep before starting") self.parser.add_option('--communities', dest='discoverCommunity', action="store_true", default=False, help="If an snmp connection fails try and rediscover it's connection info") self.parser.add_option('--checkstatus', dest='checkStatus', action="store_true", default=False, help="Don't model if the device is ping or snmp down") TCbuildOptions(self.parser, self.usage) if USE_WMI: addNTLMv2Option(self.parser)
def buildOptions(self, parser): parser.add_option('--testCounter', dest='testcounter', default=None, help='Perform a test read of this one counter' ) parser.add_option('--captureFile', dest='capturefile', default=None, help="Filename prefix to capture data into") addNTLMv2Option(parser)
def buildOptions(self, parser): parser.add_option('--batchSize', dest='batchSize', default=None, type='int', help='Number of data objects to retrieve in a ' + 'single WMI query.') parser.add_option('--queryTimeout', dest='queryTimeout', default=None, type='int', help='The number of milliseconds to wait for ' + \ 'WMI query to respond. Overrides the ' + \ 'server settings.') parser.add_option('--testClause', dest='testClause', default=None, help="Override the device's zWinEventlogClause" \ " with this string.") addNTLMv2Option(parser)
def buildOptions(self, parser): parser.add_option('--debug', dest='debug', default=False, action='store_true', help='Increase logging verbosity.') parser.add_option( '--proxywmi', dest='proxywmi', default=False, action='store_true', help='Use a process proxy to avoid long-term blocking') parser.add_option('--queryTimeout', dest='queryTimeout', default=None, type='int', help='The number of milliseconds to wait for ' + \ 'WMI query to respond. Overrides the ' + \ 'server settings.') parser.add_option('--batchSize', dest='batchSize', default=None, type='int', help='Number of data objects to retrieve in a ' + 'single WMI query.') addNTLMv2Option(parser)
def buildOptions(self, parser): parser.add_option('--debug', dest='debug', default=False, action='store_true', help='Increase logging verbosity.') parser.add_option('--proxywmi', dest='proxywmi', default=False, action='store_true', help='Use a process proxy to avoid long-term blocking' ) parser.add_option('--queryTimeout', dest='queryTimeout', default=None, type='int', help='The number of milliseconds to wait for ' 'WMI query to respond. Overrides the ' 'server settings.') parser.add_option('--batchSize', dest='batchSize', default=None, type='int', help='Number of data objects to retrieve in a ' 'single WMI query.') parser.add_option('--statusRefresh', dest='statusRefresh', default=15, type='int', help='An interval in minutes at which the ' 'status of every monitored service on ' 'the device will be refreshed. ' 'Defaults to 15 minutes.') addNTLMv2Option(parser)
def buildOptions(self): """ Build our list of command-line options """ PBDaemon.buildOptions(self) self.parser.add_option('--debug', dest='debug', action="store_true", default=False, help="Don't fork threads for processing") self.parser.add_option('--nowmi', dest='nowmi', action="store_true", default=not USE_WMI, help="Do not execute WMI plugins") self.parser.add_option( '--parallel', dest='parallel', type='int', default=defaultParallel, help="Number of devices to collect from in parallel") self.parser.add_option('--cycletime', dest='cycletime', type='int', help="Run collection every x minutes") self.parser.add_option( '--ignore', dest='ignorePlugins', default="", help="Modeler plugins to ignore. Takes a regular expression") self.parser.add_option( '--collect', dest='collectPlugins', default="", help="Modeler plugins to use. Takes a regular expression") self.parser.add_option( '-p', '--path', dest='path', help="Start class path for collection ie /NetworkDevices") self.parser.add_option( '-d', '--device', dest='device', help="Fully qualified device name ie www.confmon.com") self.parser.add_option('--startat', dest='startat', help="Start string in cron(8) format") self.parser.add_option( '-a', '--collage', dest='collage', default=0, type='float', help="Do not collect from devices whose collect date " + "is within this many minutes") self.parser.add_option('--writetries', dest='writetries', default=2, type='int', help="Number of times to try to write if a " "read conflict is found") # FIXME: cleanup --force option #2660 self.parser.add_option( "-F", "--force", dest="force", action='store_true', default=True, help="Force collection of config data (deprecated)") self.parser.add_option( '--portscantimeout', dest='portscantimeout', type='int', default=defaultPortScanTimeout, help="Time to wait for connection failures when port scanning") self.parser.add_option( '--now', dest='now', action="store_true", default=False, help="Start daemon now, do not sleep before starting") self.parser.add_option( '--communities', dest='discoverCommunity', action="store_true", default=False, help= "If an snmp connection fails try and rediscover it's connection info" ) self.parser.add_option( '--checkstatus', dest='checkStatus', action="store_true", default=False, help="Don't model if the device is ping or snmp down") self.parser.add_option( '--save_raw_results', dest='save_raw_results', action="store_true", default=False, help="Save raw results for replay purposes in /tmp") self.parser.add_option( '--save_processed_results', dest='save_processed_results', action="store_true", default=False, help="Save modeler plugin outputs for replay purposes in /tmp") addWorkerOptions(self.parser) TCbuildOptions(self.parser, self.usage) if USE_WMI: addNTLMv2Option(self.parser)