---
title: "GET /api/v1/config/log-control-config"
method: GET
path: "/api/v1/config/log-control-config"
tags: ["LogControlConfig"]
---

# GET /api/v1/config/log-control-config

`GET /api/v1/config/log-control-config`

## Response `200`

A successful response.

- Configv1ReadLogControlConfigResponse
  - `log_control_config` Configv1LogControlConfig — LogControlConfig is a singleton configuration object that specifies the configuration for log control.
    - `created_at` string, date-time — Timestamp of when the LogControlConfig was created. Cannot be set by clients.
    - `rules` Configv1LogControlRule[] — Control Rules are the ordered list of control rules.
      - `drop_field` LogControlRuleDropField — DropField is the configuration for a drop field action.
        - `field_regex` string, required — Defines the the regular expression that determines which fields to drop.
        - `parent_path` Configv1LogFieldPath
          - `selector` string — The log filter used to indicate the field path. Use `parent[child]` syntax to indicate nesting.
      - `emit_metrics` LogControlRuleEmitMetrics — EmitMetrics is the configuration for emit metrics action.
        - `counter` EmitMetricsCounter
          - `value` Configv1LogFieldPath
            - `selector` string — The log filter used to indicate the field path. Use `parent[child]` syntax to indicate nesting.
        - `drop_log` boolean — Optional. If `true`, drops the entire log after emitting the defined metric.
        - `gauge` EmitMetricsGauge
          - `aggregation_type` 'LAST' | 'MIN' | 'MAX'
          - `value` Configv1LogFieldPath, required
            - `selector` string — The log filter used to indicate the field path. Use `parent[child]` syntax to indicate nesting.
        - `histogram` EmitMetricsHistogram
          - `value` Configv1LogFieldPath, required
            - `selector` string — The log filter used to indicate the field path. Use `parent[child]` syntax to indicate nesting.
        - `labels` LogControlRuleEmitMetricsLabel[] — The labels to emit with the metric, specified as key/value pairs. The generated label is a valid Prometheus label name, mapped to a log key.
          - `key` string
          - `value` Configv1LogFieldPath
            - `selector` string — The log filter used to indicate the field path. Use `parent[child]` syntax to indicate nesting.
        - `mode` 'COUNTER' | 'GAUGE' | 'HISTOGRAM', required
        - `name` string, required — A unique name for the generated metric. This name must conform to Prometheus naming conventions.
      - `filter` string — Log query filter to return log data for the control rule. The control action applies to only matching logs.
      - `mode` 'ENABLED' | 'DISABLED'
      - `name` string — User-defined name of the control rule.
      - `parse_field` LogControlRuleParseField — ParseField is the configuration for a parse field action.
        - `destination` Configv1LogFieldPath
          - `selector` string — The log filter used to indicate the field path. Use `parent[child]` syntax to indicate nesting.
        - `parser` LogIngestConfigLogParser
          - `grok_parser` LogParserGrokParser
            - `pattern` string — The grok pattern to apply. Named capture groups become named fields in the extracted log.
          - `key_value_parser` LogParserKeyValueParser — A parser to extract key/value pairs from a string. If duplicate keys are found, the first instance is used.
            - `delimiter` string, required — The string for splitting the input into key/value pairs.
            - `pair_separator` string, required — The string for splitting each pair into its key and value.
            - `trim_set` string — Specifies the code points of any Unicode characters to trim from the beginning and end of keys and values.
          - `parser_type` 'JSON' | 'REGEX' | 'KEY_VALUE' | 'GROK'
          - `regex_parser` LogParserRegexParser
            - `regex` string — The regular expression parser pattern to apply. Must use RE2 syntax. Named capturing groups become named fields in the extracted log.
        - `source` Configv1LogFieldPath
          - `selector` string — The log filter used to indicate the field path. Use `parent[child]` syntax to indicate nesting.
      - `replace_field` LogControlRuleReplaceField — ReplaceField is the configuration for a replace field action.
        - `field` Configv1LogFieldPath, required
          - `selector` string — The log filter used to indicate the field path. Use `parent[child]` syntax to indicate nesting.
        - `mapped_value` ReplaceFieldMappedValue — MappedValue is the configuration for mapped value replace mode.
          - `default_value` string — The value to use if no matching value is found.
          - `pairs` MappedValueReplacePair[] — A list of key/value pairs to replace matched content with.
            - `key` string
            - `value` string
          - `use_default` boolean — If `true`, specifies a default value if no matching key is found. If `false`, the value will be unchanged if no matching key is found.
        - `replace_all` boolean — Determines whether to replace all matches or just the first match.
        - `replace_mode` 'HASH' | 'STATIC_VALUE' | 'MAPPED_VALUE', required — - HASH: Replace the matched content with a hashed string, which can help reduce the size of large strings. After replacing the original content with a string, there’s no way to recover that information. - STATIC_VALUE: Replace the matched content with a static string. For example, replace punctuation in a field with an empty string, or truncate the ends of long stack traces. - MAPPED_VALUE: Replace the matched content with specified key/value pairs. For example, reduce log volume by replacing a string error with a specific error code. If none of the key/value pairs match, the provided default value is used. @REQUIRED
        - `replace_regex` string, required — Defines the the regular expression that determines which part of the field to replace.
        - `static_value` ReplaceFieldStaticValue — StaticValue is the configuration for the replace field control rule in static value mode. Used to replace the selected content with a static value.
          - `value` string — The value to replace selected content with. If empty, the action removes the selected content.
      - `sample` LogControlRuleSample — Sample is the configuration for the sample logs action.
        - `rate` number, double, required — Percentage of matching logs to keep. Must be in the range `[0, 1]`, where `1` is equal to 100% of logs. For example, to keep 25% of logs, enter `0.25` as the `rate`.
      - `type` 'DROP' | 'SAMPLE' | 'DROP_FIELD' | 'REPLACE_FIELD' | 'EMIT_METRICS' | 'PARSE_FIELD'
    - `updated_at` string, date-time — Timestamp of when the LogControlConfig was last updated. Cannot be set by clients.

## Other responses

- `404` — Cannot read the LogControlConfig because LogControlConfig has not been created.
- `500` — An unexpected error response.
- `default` — An undefined error response.

---

[API](https://skmtc.net/chronosphere/apis/data-v1-api.md) · [All operations](https://skmtc.net/chronosphere/apis/data-v1-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/chronosphere/data-v1-api/versions/ee91fd539ced/schema)
