1
from landscape.deployment import Configuration
4
ALL_PLUGINS = ["ActiveProcessInfo", "ComputerInfo", "HardwareInventory",
5
"LoadAverage", "MemoryInfo", "MountInfo", "ProcessorInfo",
6
"Temperature", "PackageMonitor", "UserMonitor",
7
"RebootRequired", "AptPreferences", "NetworkActivity",
11
class MonitorConfiguration(Configuration):
12
"""Specialized configuration for the Landscape Monitor."""
14
def make_parser(self):
16
Specialize L{Configuration.make_parser}, adding many
17
monitor-specific options.
19
parser = super(MonitorConfiguration, self).make_parser()
21
parser.add_option("--monitor-plugins", metavar="PLUGIN_LIST",
22
help="Comma-delimited list of monitor plugins to "
23
"use. ALL means use all plugins.",
25
parser.add_option("--flush-interval", default=5 * 60, type="int",
27
help="The number of seconds between flushes.")
31
def plugin_factories(self):
32
if self.monitor_plugins == "ALL":
34
return [x.strip() for x in self.monitor_plugins.split(",")]