Beispiel #1
0
    def buildOptions(self):
        super(ZenActionD, self).buildOptions()
        maintenanceBuildOptions(self.parser)
        workersBuildOptions(self.parser, 1)

        default_max_commands = 10
        self.parser.add_option('--maxcommands', dest="maxCommands", type="int", default=default_max_commands,
                               help='Max number of action commands to perform concurrently (default: %d)' % \
                                    default_max_commands)
        default_url = getDefaultZopeUrl()
        self.parser.add_option(
            '--zopeurl',
            dest='zopeurl',
            default=default_url,
            help="http path to the root of the zope server (default: %s)" %
            default_url)
        self.parser.add_option(
            "--monitor",
            dest="monitor",
            default=DEFAULT_MONITOR,
            help="Name of monitor instance to use for heartbeat "
            " events. Default is %s." % DEFAULT_MONITOR)
        self.parser.add_option(
            '--maintenance-window-cycletime',
            dest='maintenceWindowCycletime',
            default=60,
            type="int",
            help=
            "How often to check to see if there are any maintenance windows to execute"
        )
Beispiel #2
0
 def buildOptions(self):
     super(ZenEventD, self).buildOptions()
     maintenanceBuildOptions(self.parser)
     self.parser.add_option('--synceveryevent', dest='syncEveryEvent',
                 action="store_true", default=False,
                 help='Force sync() before processing every event; default is to sync() no more often '
                 'than once every 1/2 second.')
     objectEventNotify(BuildOptionsEvent(self))
Beispiel #3
0
    def buildOptions(self):
        super(ZenActionD, self).buildOptions()
        maintenanceBuildOptions(self.parser)
        workersBuildOptions(self.parser, 1)

        default_max_commands = 10
        self.parser.add_option('--maxcommands', dest="maxCommands", type="int", default=default_max_commands,
                               help='Max number of action commands to perform concurrently (default: %d)' % \
                                    default_max_commands)
        default_max_pagingworkers = 1
        self.parser.add_option('--maxpagingworkers', dest="maxPagingWorkers", type="int", default=default_max_pagingworkers,
                               help='max number of paging workers to perform concurrently (default: %d)' % \
                                       default_max_pagingworkers)
        default_pagingworkers_timeout = 30
        self.parser.add_option('--pagingworkerstimeout', dest="pagingWorkersTimeout", type="int", default=default_pagingworkers_timeout,
                               help='Timeout, in seconds, for paging workers (default: %d)' % \
                                       default_pagingworkers_timeout)
        default_url = getDefaultZopeUrl()
        self.parser.add_option(
            '--zopeurl',
            dest='zopeurl',
            default=default_url,
            help="http path to the root of the zope server (default: %s)" %
            default_url)
        self.parser.add_option(
            "--monitor",
            dest="monitor",
            default=DEFAULT_MONITOR,
            help="Name of monitor instance to use for heartbeat "
            " events. Default is %s." % DEFAULT_MONITOR)
        self.parser.add_option(
            '--maintenance-window-cycletime',
            dest='maintenceWindowCycletime',
            default=60,
            type="int",
            help=
            "How often to check to see if there are any maintenance windows to execute"
        )
        self.parser.add_option(
            '--maintenance-window-batch-size',
            dest='maintenceWindowBatchSize',
            default=200,
            type="int",
            help=
            "How many devices update per one transaction on maintenance windows execution"
        )
        self.parser.add_option(
            '--strip-email-body-tags',
            dest='stripEmailBodyTags',
            default=True,
            action="store_false",
            help="Strip HTML/XML tags from plaintext email notifications?")

        self.parser.add_option("--workerid",
                               dest='workerid',
                               type='int',
                               default=None,
                               help="ID of the worker instance.")
Beispiel #4
0
 def buildOptions(self):
     super(ZenEventD, self).buildOptions()
     maintenanceBuildOptions(self.parser)
     self.parser.add_option('--synceveryevent', dest='syncEveryEvent',
                 action="store_true", default=False,
                 help='Force sync() before processing every event; default is to sync() no more often '
                 'than once every 1/2 second.')
     self.parser.add_option('--messagesperworker', dest='messagesPerWorker', default=1,
                 type="int",
                 help='Sets the number of messages each worker gets from the queue at any given time. Default is 1. '
                 'Change this only if event processing is deemed slow. Note that increasing the value increases the '
                 'probability that events will be processed out of order.')
     objectEventNotify(BuildOptionsEvent(self))
Beispiel #5
0
 def buildOptions(self):
     super(ZenEventD, self).buildOptions()
     maintenanceBuildOptions(self.parser)
     self.parser.add_option('--synceveryevent', dest='syncEveryEvent',
                 action="store_true", default=False,
                 help='Force sync() before processing every event; default is to sync() no more often '
                 'than once every 1/2 second.')
     self.parser.add_option('--messagesperworker', dest='messagesPerWorker', default=1,
                 type="int",
                 help='Sets the number of messages each worker gets from the queue at any given time. Default is 1. '
                 'Change this only if event processing is deemed slow. Note that increasing the value increases the '
                 'probability that events will be processed out of order.')
     self.parser.add_option('--maxpickle', dest='maxpickle', default=100, type="int",
                 help='Sets the number of pickle files in var/zeneventd/failed_transformed_events.')
     self.parser.add_option('--pickledir', dest='pickledir', default=zenPath('var/zeneventd/failed_transformed_events'),
                 type="string", help='Sets the path to save pickle files.')
     objectEventNotify(BuildOptionsEvent(self))
Beispiel #6
0
    def buildOptions(self):
        super(ZenActionD, self).buildOptions()
        maintenanceBuildOptions(self.parser)
        workersBuildOptions(self.parser, 1)

        default_max_commands = 10
        self.parser.add_option('--maxcommands', dest="maxCommands", type="int", default=default_max_commands,
                               help='Max number of action commands to perform concurrently (default: %d)' % \
                                    default_max_commands)
        default_url = getDefaultZopeUrl()
        self.parser.add_option('--zopeurl', dest='zopeurl', default=default_url,
                               help="http path to the root of the zope server (default: %s)" % default_url)
        self.parser.add_option("--monitor", dest="monitor",
            default=DEFAULT_MONITOR,
            help="Name of monitor instance to use for heartbeat "
                " events. Default is %s." % DEFAULT_MONITOR)
        self.parser.add_option('--maintenance-window-cycletime',
            dest='maintenceWindowCycletime', default=60, type="int",
            help="How often to check to see if there are any maintenance windows to execute")
Beispiel #7
0
 def buildOptions(self):
     super(ZenEventD, self).buildOptions()
     maintenanceBuildOptions(self.parser)
     self.parser.add_option(
         '--synceveryevent',
         dest='syncEveryEvent',
         action="store_true",
         default=False,
         help=('Force sync() before processing every event; default is'
               ' to sync() no more often than once every 1/2 second.'))
     self.parser.add_option(
         '--process-event-timeout',
         dest='process_event_timeout',
         type='int',
         default=0,
         help=('Set the Timeout(in seconds) for processing each event.'
               ' The timeout may be extended for a transforms using,'
               'signal.alarm(<timeout seconds>) in the transform'
               'set to 0 to disable'))
     self.parser.add_option(
         '--messagesperworker',
         dest='messagesPerWorker',
         default=1,
         type="int",
         help=('Sets the number of messages each worker gets from the queue'
               ' at any given time. Default is 1. Change this only if event'
               ' processing is deemed slow. Note that increasing the value'
               ' increases the probability that events will be processed'
               ' out of order.'))
     self.parser.add_option(
         '--maxpickle',
         dest='maxpickle',
         default=100,
         type="int",
         help=('Sets the number of pickle files in'
               ' var/zeneventd/failed_transformed_events.'))
     self.parser.add_option(
         '--pickledir',
         dest='pickledir',
         default=zenPath('var/zeneventd/failed_transformed_events'),
         type="string",
         help='Sets the path to save pickle files.')
     objectEventNotify(BuildOptionsEvent(self))
Beispiel #8
0
 def buildOptions(self):
     super(ZenEventD, self).buildOptions()
     maintenanceBuildOptions(self.parser)
     self.parser.add_option(
         '--synceveryevent', dest='syncEveryEvent',
         action="store_true", default=False,
         help=('Force sync() before processing every event; default is'
               ' to sync() no more often than once every 1/2 second.')
     )
     self.parser.add_option(
         '--process-event-timeout', dest='process_event_timeout',
         type='int', default=0,
         help=('Set the Timeout(in seconds) for processing each event.'
               ' The timeout may be extended for a transforms using,'
               'signal.alarm(<timeout seconds>) in the transform'
               'set to 0 to disable')
     )
     self.parser.add_option(
         '--messagesperworker', dest='messagesPerWorker', default=1,
         type="int",
         help=('Sets the number of messages each worker gets from the queue'
               ' at any given time. Default is 1. Change this only if event'
               ' processing is deemed slow. Note that increasing the value'
               ' increases the probability that events will be processed'
               ' out of order.')
     )
     self.parser.add_option(
         '--maxpickle', dest='maxpickle', default=100, type="int",
         help=('Sets the number of pickle files in'
               ' var/zeneventd/failed_transformed_events.')
     )
     self.parser.add_option(
         '--pickledir', dest='pickledir',
         default=zenPath('var/zeneventd/failed_transformed_events'),
         type="string",
         help='Sets the path to save pickle files.'
     )
     objectEventNotify(BuildOptionsEvent(self))
Beispiel #9
0
    def buildOptions(self):
        super(ZenActionD, self).buildOptions()
        maintenanceBuildOptions(self.parser)
        workersBuildOptions(self.parser, 1)

        default_max_commands = 10
        self.parser.add_option('--maxcommands', dest="maxCommands", type="int", default=default_max_commands,
                               help='Max number of action commands to perform concurrently (default: %d)' % \
                                    default_max_commands)
        default_max_pagingworkers = 1
        self.parser.add_option('--maxpagingworkers', dest="maxPagingWorkers", type="int", default=default_max_pagingworkers,
                               help='max number of paging workers to perform concurrently (default: %d)' % \
                                       default_max_pagingworkers)
        default_pagingworkers_timeout = 30
        self.parser.add_option('--pagingworkerstimeout', dest="pagingWorkersTimeout", type="int", default=default_pagingworkers_timeout,
                               help='Timeout, in seconds, for paging workers (default: %d)' % \
                                       default_pagingworkers_timeout)
        default_url = getDefaultZopeUrl()
        self.parser.add_option('--zopeurl', dest='zopeurl', default=default_url,
                               help="http path to the root of the zope server (default: %s)" % default_url)
        self.parser.add_option("--monitor", dest="monitor",
            default=DEFAULT_MONITOR,
            help="Name of monitor instance to use for heartbeat "
                " events. Default is %s." % DEFAULT_MONITOR)
        self.parser.add_option('--maintenance-window-cycletime',
            dest='maintenceWindowCycletime', default=60, type="int",
            help="How often to check to see if there are any maintenance windows to execute")
        self.parser.add_option('--maintenance-window-batch-size',
            dest='maintenceWindowBatchSize', default=200, type="int",
            help="How many devices update per one transaction on maintenance windows execution")
        self.parser.add_option('--strip-email-body-tags',
            dest='stripEmailBodyTags', default=True, action="store_false",
            help="Strip HTML/XML tags from plaintext email notifications?")

        self.parser.add_option("--workerid", dest='workerid', type='int', default=None,
                               help="ID of the worker instance.")