예제 #1
0
def add_argparse_arguments(parser):
    """Add generic BigGraphite arguments to an argparse parser.

    Args:
      parser: argparse.ArgumentParser()
    """
    parser.add_argument("--driver",
                        help="BigGraphite driver (%s)" %
                        ', '.join([v[0] for v in DRIVERS]),
                        default=DEFAULT_DRIVER)
    parser.add_argument("--cache",
                        help="BigGraphite cache (%s))" %
                        ', '.join([v[0] for v in CACHES]),
                        default=DEFAULT_CACHE)
    parser.add_argument("--cache-size", help="Metadata cache size.")
    parser.add_argument("--cache-sync", help="Metadata cache sync.")
    parser.add_argument("--storage_dir",
                        metavar="PATH",
                        help="Storage path (cache, etc..)")
    parser.add_argument(
        "--loglevel",
        metavar="LEVEL",
        help="Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)",
        default=DEFAULT_LOG_LEVEL)
    parser.add_argument("--admin_port",
                        metavar="PORT",
                        help="Admin port with /metrics",
                        default=DEFAULT_ADMIN_PORT)
    bg_cassandra.add_argparse_arguments(parser)
예제 #2
0
def add_argparse_arguments(parser):
    """Add generic BigGraphite arguments to an argparse parser.

    Args:
      parser: argparse.ArgumentParser()
    """
    parser.add_argument("--storage_dir",
                        metavar="PATH",
                        help="Storage path (cache, etc..)")
    parser.add_argument(
        "--loglevel",
        metavar="LEVEL",
        help="Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)",
        default=DEFAULT_LOG_LEVEL,
    )
    parser.add_argument(
        "--admin_port",
        metavar="PORT",
        help="Admin port with /metrics",
        default=DEFAULT_ADMIN_PORT,
    )
    bg_accessor_factory.add_argparse_arguments(parser)
    bg_cache_factory.add_argparse_arguments(parser)
    bg_cassandra.add_argparse_arguments(parser)
    bg_elasticsearch.add_argparse_arguments(parser)
예제 #3
0
def add_argparse_arguments(parser):
    """Add generic BigGraphite arguments to an argparse parser.

    Args:
      parser: argparse.ArgumentParser()
    """
    parser.add_argument(
        "--storage_dir", metavar="PATH", help="Storage path (cache, etc..)"
    )
    parser.add_argument(
        "--loglevel",
        metavar="LEVEL",
        help="Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)",
        default=DEFAULT_LOG_LEVEL,
    )
    parser.add_argument(
        "--admin_port",
        metavar="PORT",
        help="Admin port with /metrics",
        default=DEFAULT_ADMIN_PORT,
    )
    bg_accessor_factory.add_argparse_arguments(parser)
    bg_cache_factory.add_argparse_arguments(parser)
    bg_cassandra.add_argparse_arguments(parser)
    bg_elasticsearch.add_argparse_arguments(parser)
예제 #4
0
def add_argparse_arguments(parser):
    """Add generic BigGraphite arguments to an argparse parser.

    Args:
      parser: argparse.ArgumentParser()
    """
    parser.add_argument(
        "--driver",
        help="BigGraphite driver ('cassandra' or 'memory')",
        default=DEFAULT_DRIVER)
    parser.add_argument(
        "--storage_path", metavar="PATH",
        help="Storage path (cache, etc..)")
    parser.add_argument(
        "--loglevel", metavar="LEVEL",
        help="Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)",
        default=DEFAULT_LOG_LEVEL)
    bg_cassandra.add_argparse_arguments(parser)