#!/usr/bin/env python """Configuration parameters for client builder and server packaging.""" import os import time from grr.lib import config_lib from grr.lib import rdfvalue from grr.lib import type_info config_lib.DEFINE_option( type_info.RDFValueType( rdfclass=rdfvalue.RDFURN, name="Config.aff4_root", default="aff4:/config/", description=("The path where the configs are stored in the aff4 " "namespace."))) config_lib.DEFINE_option( type_info.RDFValueType( rdfclass=rdfvalue.RDFURN, name="Config.python_hack_root", default="%(Config.aff4_root)/python_hacks", description=("The path where python hacks are stored in the aff4 " "namespace."))) # Executables must be signed and uploaded to their dedicated AFF4 namespace. config_lib.DEFINE_option( type_info.RDFValueType( rdfclass=rdfvalue.RDFURN, name="Executables.aff4_path", description="The aff4 path to signed executables.",
"domain socket or in a UDP host:port notation.") config_lib.DEFINE_string("Logging.filename", "%(Logging.path)/GRRlog.txt", help="Filename of the grr log file.") config_lib.DEFINE_string( "Logging.format", # Use a literal block here to prevent config system expansion as this should # be a python format string. "%{%(levelname)s:%(asctime)s %(module)s:%(lineno)s] %(message)s}", help="Log line format (using python's standard logging expansions).") config_lib.DEFINE_string("Logging.service_name", "GRR", help="The service name that will be logged with the " "event log engine.") config_lib.DEFINE_option(type_info.RDFValueType( rdfclass=rdfvalue.DomainEmailAddress, name="Monitoring.alert_email", help="The email address to send events to.", default="monitoring@localhost")) config_lib.DEFINE_option(type_info.RDFValueType( rdfclass=rdfvalue.DomainEmailAddress, name="Monitoring.emergency_access_email", help="The email address to notify in an emergency.", default="monitoring@localhost")) config_lib.DEFINE_integer("Monitoring.http_port", 0, "Port for stats monitoring server.")
def DEFINE_semantic(semantic_type, name, default=None, description=""): CONFIG.AddOption( type_info.RDFValueType(rdfclass=semantic_type, name=name, default=default, help=description))
config_lib.DEFINE_string( "Logging.format", # Use a literal block here to prevent config system expansion as this should # be a python format string. "%{%(levelname)s:%(asctime)s %(module)s:%(lineno)s] %(message)s}", help="Log line format (using python's standard logging expansions).") config_lib.DEFINE_string("Logging.service_name", "GRR", help="The service name that will be logged with the " "event log engine.") config_lib.DEFINE_option( type_info.RDFValueType(rdfclass=standard.DomainEmailAddress, name="Monitoring.alert_email", help="The email address to send events to.", default="grr-monitoring@localhost")) config_lib.DEFINE_option( type_info.RDFValueType(rdfclass=standard.DomainEmailAddress, name="Monitoring.emergency_access_email", help="The email address to notify in an emergency.", default="grr-emergency@localhost")) config_lib.DEFINE_integer("Monitoring.http_port", 0, "Port for stats monitoring server.") config_lib.DEFINE_integer( "Logging.aff4_audit_log_rollover", 60 * 60 * 24 * 14, "Audit log rollover interval in seconds. " "Default is 2 weeks")