def buildOptions(self):
     PBDaemon.buildOptions(self)
     self.parser.add_option('--statcycle',
                            dest='statcycle',
                            type='int',
                            help='Number of seconds between the writing of statistics',
                            default=0)
示例#2
0
 def buildOptions(self):
     PBDaemon.buildOptions(self)
     self.parser.add_option(
         '--statcycle',
         dest='statcycle',
         type='int',
         help='Number of seconds between the writing of statistics',
         default=0)
 def buildOptions(self):
     """
     Command-line options to add
     """
     PBDaemon.buildOptions(self)
     self.parser.add_option('-d', '--device',
                            dest='device',
                            default='',
                            help="Specify a device ID to monitor")
示例#4
0
 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)
示例#5
0
 def buildOptions(self):
     """
     Command-line options to add
     """
     PBDaemon.buildOptions(self)
     self.parser.add_option('-d',
                            '--device',
                            dest='device',
                            default='',
                            help="Specify a device ID to monitor")
示例#6
0
 def buildOptions(self):
     """
     stores the command-line/config file options
     """
     PBDaemon.buildOptions(self)
     self.parser.add_option('-a', '--app',
         dest='singleInstance',
         default=None,
         help="single GAE App to collect from")
     self.parser.add_option('--debug',
         dest='debug',
         default=False,
         action='store_true',
         help="turn on additional debugging")
     self.parser.add_option('--configCycleInterval',
         dest='configCycleInterval',
         default=60 * 4,  # EVERY 4 HOURS
         type='int',
         help="Period between modeling in minutes")
     self.parser.add_option('--showHttp',
         dest='showHttp',
         action='store_true',
         help="Show all http interactions")
示例#7
0
    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)