Пример #1
0
 class clickhouse(ConfigSection):
     rw_addresses = ServiceParameter(service="clickhouse", wait=True)
     db = StringParameter(default="noc")
     rw_user = StringParameter(default="default")
     rw_password = SecretParameter()
     ro_addresses = ServiceParameter(service="clickhouse", wait=True)
     ro_user = StringParameter(default="readonly")
     ro_password = SecretParameter()
     request_timeout = SecondsParameter(default="1h")
     connect_timeout = SecondsParameter(default="10s")
     default_merge_tree_granularity = IntParameter(default=8192)
     encoding = StringParameter(default="", choices=["", "deflate", "gzip"])
     # Enable LowCardinality fileds
     enable_low_cardinality = BooleanParameter(default=False)
     # Cluster name for sharded/replicated configuration
     # Matches appropriative <remote_servers> part
     cluster = StringParameter()
     # Cluster topology
     # Expression in form
     # <topology> ::= <shard> | <shard>,<topology>
     # <shard> ::= [<weight>]<replicas>
     # <weight> := <DIGITS>
     # <replicas> := <DIGITS>
     # Examples:
     # 1 - non-replicated, non-sharded configuration
     # 1,1 - 2 shards, non-replicated
     # 2,2 - 2 shards, 2 replicas in each
     # 3:2,2 - first shard has 2 replicas an weight 3,
     #   second shard has 2 replicas and weight 1
     cluster_topology = StringParameter(default="1")
Пример #2
0
 class nsqlookupd(ConfigSection):
     addresses = ServiceParameter(service="nsqlookupd",
                                  wait=True,
                                  near=True,
                                  full_result=False)
     http_addresses = ServiceParameter(service="nsqlookupdhttp",
                                       wait=True,
                                       full_result=False)
Пример #3
0
 class nsqd(ConfigSection):
     addresses = ServiceParameter(service="nsqd", wait=True, near=True, full_result=False)
     http_addresses = ServiceParameter(
         service="nsqdhttp", wait=True, near=True, full_result=False
     )
     pub_retries = IntParameter(default=5)
     pub_retry_delay = FloatParameter(default=1)
     mpub_messages = IntParameter(default=10000)
     mpub_size = IntParameter(default=1048576)
     topic_mpub_rate = IntParameter(default=10)
     ch_chunk_size = IntParameter(default=4000)
     connect_timeout = SecondsParameter(default="3s")
     request_timeout = SecondsParameter(default="30s")
     reconnect_interval = IntParameter(default=15)
     compression = StringParameter(choices=["", "deflate", "snappy"], default="")
     compression_level = IntParameter(default=6)
     max_in_flight = IntParameter(default=1)
Пример #4
0
 class pg(ConfigSection):
     addresses = ServiceParameter(service="postgres",
                                  wait=True,
                                  near=True,
                                  full_result=False)
     db = StringParameter(default="noc")
     user = StringParameter()
     password = SecretParameter()
     connect_timeout = IntParameter(default=5)
Пример #5
0
 class mongo(ConfigSection):
     addresses = ServiceParameter(service="mongo", wait=True)
     db = StringParameter(default="noc")
     user = StringParameter()
     password = SecretParameter()
     rs = StringParameter()
     retries = IntParameter(default=20)
     timeout = SecondsParameter(default="3s")
     retry_writes = BooleanParameter(default=False)
     app_name = StringParameter()
     max_idle_time = SecondsParameter(default="60s")
Пример #6
0
 class redis(ConfigSection):
     addresses = ServiceParameter(service="redis",
                                  wait=True,
                                  full_result=True)
     db = IntParameter(default=0)
     default_ttl = SecondsParameter(default="1d")
Пример #7
0
 class memcached(ConfigSection):
     addresses = ServiceParameter(service="memcached",
                                  wait=True,
                                  full_result=True)
     pool_size = IntParameter(default=8)
     default_ttl = SecondsParameter(default="1d")
Пример #8
0
 class liftbridge(ConfigSection):
     addresses = ServiceParameter(service="liftbridge",
                                  wait=True,
                                  near=True,
                                  full_result=False)
     max_message_size = IntParameter(
         default=921600, help="Max message size for GRPC client")
     publish_async_ack_timeout = IntParameter(default=10)
     compression_threshold = IntParameter(default=524288)
     compression_method = StringParameter(choices=["", "zlib", "lzma"],
                                          default="zlib")
     enable_http_proxy = BooleanParameter(default=False)
     #  mx, kafkasender, events, dispose
     stream_events_retention_max_age = SecondsParameter(
         default="24h",
         help=
         "FM events stream retention interval. If 0 use Liftbrdige setting value",
     )
     stream_events_retention_max_bytes = BytesParameter(
         default=0,
         help=
         "FM events stream retention size (in bytes). If 0 use Liftbrdige setting value",
     )
     stream_events_segment_max_age = SecondsParameter(
         default="1h",
         help=
         "FM events stream segment interval. Must be less retention age. If 0 use Liftbrdige setting value",
     )
     stream_events_segment_max_bytes = BytesParameter(
         default=0,
         help=
         "FM events stream segment size. Must be less retention size. If 0 use Liftbrdige setting value",
     )
     stream_events_auto_pause_time = SecondsParameter(
         default=0,
         help=
         "FM events stream pause time. If 0 use Liftbrdige setting value")
     stream_events_auto_pause_disable_if_subscribers = BooleanParameter(
         default=False)
     stream_dispose_retention_max_age = SecondsParameter(
         default="24h",
         help=
         "FM alarms stream retention interval. If 0 use Liftbrdige setting value",
     )
     stream_dispose_retention_max_bytes = BytesParameter(
         default=0,
         help=
         "FM alarms stream retention size (in bytes). If 0 use Liftbrdige setting value",
     )
     stream_dispose_segment_max_age = SecondsParameter(
         default="1h",
         help=
         "FM alarms stream segment interval. Must be less retention age. If 0 use Liftbrdige setting value",
     )
     stream_dispose_segment_max_bytes = BytesParameter(
         default=0,
         help=
         "FM alarms stream segment size. Must be less retention size. If 0 use Liftbrdige setting value",
     )
     stream_dispose_auto_pause_time = SecondsParameter(
         default=0,
         help=
         "FM alarms stream pause time. If 0 use Liftbrdige setting value")
     stream_dispose_auto_pause_disable_if_subscribers = BooleanParameter(
         default=False)
     stream_message_retention_max_age = SecondsParameter(default="1h")
     stream_message_retention_max_bytes = BytesParameter(default=0)
     stream_message_segment_max_age = SecondsParameter(default="30M")
     stream_message_segment_max_bytes = BytesParameter(default=0)
     stream_message_auto_pause_time = SecondsParameter(default=0)
     stream_message_auto_pause_disable_if_subscribers = BooleanParameter(
         default=False)
     stream_kafkasender_retention_max_age = SecondsParameter(default="1h")
     stream_kafkasender_retention_max_bytes = BytesParameter(default=0)
     stream_kafkasender_segment_max_age = SecondsParameter(default="30M")
     stream_kafkasender_segment_max_bytes = BytesParameter(default=0)
     stream_kafkasender_auto_pause_time = SecondsParameter(default=0)
     stream_kafkasender_auto_pause_disable_if_subscribers = BooleanParameter(
         default=False)
     stream_ch_retention_max_age = SecondsParameter(default="1h")
     stream_ch_retention_max_bytes = BytesParameter(default="100M")
     stream_ch_segment_max_age = SecondsParameter(default="30M")
     stream_ch_segment_max_bytes = BytesParameter(default="50M")
     stream_ch_auto_pause_time = SecondsParameter(default=0)
     stream_ch_auto_pause_disable_if_subscribers = BooleanParameter(
         default=False)
     stream_ch_replication_factor = IntParameter(
         default=1, help="Replicaton factor for clickhouse streams")
     metrics_send_delay = FloatParameter(default=0.25)