{"componentChunkName":"component---src-components-mark-down-block-js","path":"/docs/config-file/","result":{"data":{"markdownRemark":{"html":"<h2 id=\"config-file\" style=\"position:relative;\"><a href=\"#config-file\" aria-label=\"config file permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Config File</h2>\n<p><code>scope.yml</code> is the sole library configuration file in AppScope.</p>\n<p>In Cribl Edge or Cribl Stream, you can use the AppScope Config Editor to create your own variants of <code>scope.yml</code> and save them in the AppScope Config Library.</p>\n<h3 id=\"scopeyml-config-file\" style=\"position:relative;\"><a href=\"#scopeyml-config-file\" aria-label=\"scopeyml config file permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>scope.yml Config File</h3>\n<p>Below are the default contents of <code>scope.yml</code>:</p>\n<pre><code>#\n# AppScope Runtime Configuration\n#\n# The AppScope library (`libscope.so`) starts with default configs that are\n# mimicked here in this file. This means that if you run AppScope with the\n# stock version of this config, you get the same results as if you run without\n# any config.\n#\n# After loading defaults, the library looks for a config in the following\n# places in the order shown. The first readable file found is used and the rest\n# are ignored. Entries in the config file override the defaults.\n#\n#   1. $SCOPE_CONF_PATH\n#   2. $SCOPE_HOME/conf/scope.yml\n#   3. $SCOPE_HOME/scope.yml\n#   4. /etc/scope/scope.yml\n#   5. $HOME/conf/scope.yml\n#   6. $HOME/scope.yml\n#   7. ./conf/scope.yml\n#   8. ./scope.yml\n#\n# Next, SCOPE_* environment variables are used to override corresponding\n# entries in the configs. Details are provided below for each setting and\n# the corresponding environment variable names.\n#\n# Finally, if the `cribl > enable` config is true at this point, either from\n# the config file or the $SCOPE_CRIBL/$SCOPE_CRIBL_CLOUD environment variable,\n# the library forces the following:\n#\n#   - `metric > transport` is superseded by the `cribl` transport\n#   - `metric > enable` is set to true\n#   - `metric > format` is set to ndjson\n#   - `event > transport` is superseded by the `cribl` transport\n#   - `event > enable` is set to true\n#   - `libscope > log > level` is set to warning\n#   - `libscope > configevent` is set to true\n#\n# Use the `scope extract` command to get a copy of the default `scope.yml`.\n#\n# Use the command below to get a stripped-down version of this config.\n#\n#   egrep -v '^ *#.*$' scope.yml | sed '/^$/d' >scope-minimal.yml\n#\n\n# Settings for the `metrics` feature\n#\nmetric:\n\n  # Enable the `metrics` feature\n  #   Type:     boolean\n  #   Values:   true, false\n  #   Default:  true\n  #   Override: $SCOPE_METRIC_ENABLE\n  #\n  #\n  enable: true\n\n  # Settings for the format of metric data\n  format:\n\n    # Metric format type\n    #   Type:     string\n    #   Values:   statsd, ndjson\n    #   Default:  statsd\n    #   Override: $SCOPE_METRIC_FORMAT\n    #\n    # When the `cribl` feature is enabled, this is forced to ndjson.\n    #\n    type: statsd\n\n    # Prefix for StatsD metrics; ignored if type isn't statsd\n    #   Type:     string\n    #   Values:   (and string)\n    #   Default:  (none)\n    #   Override: $SCOPE_STATSD_PREFIX\n    #\n    statsdprefix:\n\n    # Maximum length of formatted StatsD metrics; ignored unless type is statsd\n    #   Type:     integer\n    #   Values:   (greater than zero)\n    #   Default:  512\n    #   Override: $SCOPE_STATSD_MAXLEN\n    #\n    statsdmaxlen: 512\n\n    # Metric verbosity level\n    #   Type:     integer\n    #   Values:   0-9\n    #   Default:  4\n    #   Override: $SCOPE_METRIC_VERBOSITY\n    #\n    # This setting controls two different aspects of the metrics generated by\n    # the library: tag cardinality and aggregation. Lower values reduce the\n    # verbosity of metric data produced, while higher values increase it.\n    #\n    # Metrics have at a minimum name, value, and type properties. Optional tags\n    # can be added to provide additional detail on the measurement. The library\n    # adds expanded StatsD tags depending on the value of this setting as\n    # described below. These affect the cardinality of the metrics data.\n    #\n    #   0  none\n    #   1  adds data and unit\n    #   2  adds class and proto\n    #   3  adds op\n    #   4  adds pid, host, proc, and http_status\n    #   5  adds domain and file\n    #   6  adds localip, remoteip, localp, port, and remotep\n    #   7  adds fd and args\n    #   8  adds duration, numops, req_per_sec, req, resp, and protocol\n    #\n    # The library counts various events and generates metrics for them\n    # periodically. The verbosity config disables this metric aggregation for\n    # groups of events. When disabled, events that would normally have been\n    # summarized in an aggregate metric are instead sent as individual metrics\n    # with a count of 1 and additional details from the event added, e.g.,\n    # operation, filename, process, error code, etc.\n    #\n    #   0-4 full metric aggregation\n    #   5   disable error metric aggregation\n    #   6   disable filesystem open/close and DNS metric aggregation\n    #   7   disable filesystem stat and network connect metric aggregation\n    #   8   disable filesystem seek metric aggregation\n    #   9   disable filesystem read/write and network send/recv metric aggregation\n    #\n    verbosity : 4\n\n  # The `metric > watch[*]` array contains objects that enable different\n  # categories of metrics. Their `type` property specifies the category.\n  # Comment out an array entry to disable the category. If you comment\n  # out `metric > watch` entirely, AppScope will use the default metric\n  # watch list, which enables all categories.\n  #\n  watch:\n    # The statsd category creates metrics from StatsD network traffic that is\n    # sent from or received by the scoped process. This includes extended\n    # StatsD, where dimensions will be included in the metrics produced.\n    # See the STATSD protocol detector for more info about how AppScope\n    # determines whether network traffic contains StatsD metric data.\n    # Set $SCOPE_METRIC_STATSD to true or false to enable or disable\n    # this category.\n    #\n    - type: statsd\n\n    # The filesystem category creates metrics from the scoped process' file reads,\n    # writes, opens, closes, etc.\n    #\n    #   Type:     string\n    #   Values:   fs\n    #   Default:  fs\n    #   Override: $SCOPE_METRIC_FS\n    #\n    - type: fs\n\n    # The network category creates metrics from the scoped process' network sends,\n    # receives, socket opens, socket closes, etc.\n    #\n    #   Type:     string\n    #   Values:   net\n    #   Default:  net\n    #   Override: $SCOPE_METRIC_NET\n    #\n    - type: net\n\n    # The HTTP category creates metrics from the scoped process' HTTP requests and\n    # responses, including their timing, content length, etc.\n    #   Type:     string\n    #   Values:   http\n    #   Default:  http\n    #   Override: $SCOPE_METRIC_HTTP\n    #\n    - type: http\n\n    # The DNS category creates metrics from the scoped process' network DNS requests.\n    #   Type:     string\n    #   Values:   dns\n    #   Default:  dns\n    #   Override: $SCOPE_METRIC_DNS\n    #\n    - type: dns\n\n    # The process category creates metrics from the state of the scoped process,\n    # e.g., number of open file descriptors, number of running threads,\n    # memory usage, etc.\n    #\n    #   Type:     string\n    #   Values:   process\n    #   Default:  process\n    #   Override: $SCOPE_METRIC_PROC\n    #\n    - type: process\n\n  # Settings for the `metrics` transport\n  #\n  # When the `cribl` feature is enabled, these settings are ignored,\n  # and AppScope sends metrics via the `cribl` transport rather than this one.\n  #\n  transport:\n\n    # Set $SCOPE_METRIC_DEST to override the type, host, port, and path configs\n    # below. The environment variable should be set to a URL.\n    #\n    #   file:///tmp/output.log  send to a file; note the triple slash\n    #   file://stdout           send to standard out\n    #   file://stderr           send to standard error\n    #   udp://host:port         send to a network server (UDP protocol)\n    #   tcp://host:port         send to a network server (TCP protocol)\n    #   unix://@abstractname    send to a unix domain server w/abstract addr\n    #   unix:///var/run/mysock  send to a unix domain server w/filesystem addr\n    #   edge                    send to cribl edge (over unix domain)\n    #\n    # Note: tls:// is not an option here. For TLS/SSL, use tcp://host:port and\n    # set the $SCOPE_METRIC_TLS_* variables.\n\n    # Connection type\n    #   Type:     string\n    #   Values:   udp, tcp, unix, file, and edge\n    #   Default:  udp\n    #   Override: the protocol token in the $SCOPE_METRIC_DEST URL\n    #\n    type: udp\n\n    # Connection host/address\n    #   Type:     string\n    #   Values:   (hostname or IP address)\n    #   Default:  127.0.0.1\n    #   Override: the host token in the $SCOPE_METRIC_DEST URL\n    #\n    host: 127.0.0.1\n\n    # Connection port\n    #   Type:     integer or string\n    #   Values:   port number or service name\n    #   Default:  8125\n    #   Override: the port token in the $SCOPE_METRIC_DEST URL\n    #\n    # The default 8125 is for normal StatsD services.\n    #\n    port: 8125\n\n    # File path / UNIX domain socket path\n    #   Type:     string\n    #   Values:   (directory path, or socket path)\n    #   Default:  (none)\n    #   Override: the path token in the $SCOPE_METRIC_DEST URL\n    #\n    # Applies when connection type is file or unix.\n    #\n    #path: ''\n\n    # File buffering\n    #   Type:     string\n    #   Values:   line, full\n    #   Default:  line\n    #\n    # Only applies when connection type is file\n    #\n    # Set this to line if there's a chance that multiple scoped processes will\n    # be writing to the same file. This prevents interleaving of lines and\n    # scrambling of the log file. Setting this to full may improve performance\n    # in single-writer scenarios.\n    #\n    #buffer: line\n\n    # TLS connection settings\n    tls:\n\n      # Enable TLS for the `metrics` transport\n      #   Type:     boolean\n      #   Values:   true, false\n      #   Default:  false\n      #   Override: $SCOPE_METRIC_TLS_ENABLE\n      #\n      # Only applies when the connection type is tcp.\n      #\n      enable: false\n\n      # Validate the TLS server certificate\n      #   Type:     boolean\n      #   Values:   true, false\n      #   Default:  false\n      #   Override: $SCOPE_METRIC_TLS_VALIDATE_SERVER\n      #\n      # Set to false, works like the `curl -k` option. When set to true, the\n      # connection will fail if the server certificate cannot be validated.\n      #\n      # Only applies if the connection type is tcp and TLS is enabled.\n      #\n      validateserver: true\n\n      # CA certification path\n      #   Type:     string\n      #   Values:   (file path)\n      #   Default:  (none)\n      #   Override: $SCOPE_METRIC_TLS_CA_CERT_PATH\n      #\n      # Leave this blank when validateserver is set to true and the local\n      # OS-provided trusted CA certificates are used to validate the server's\n      # certificate. To use a PEM certificate file instead, specify its\n      # full path; useful with self-signed certificates.\n      #\n      # Only applies if the connection type is tcp and TLS is enabled.\n      #\n      cacertpath: ''\n\n# Settings for the `events` feature\n#\nevent:\n\n  # Enable the `events` feature\n  #   Type:     boolean\n  #   Values:   true, false\n  #   Default:  true\n  #   Override: $SCOPE_EVENT_ENABLE\n  #\n  #\n  enable: true\n\n  # Settings for the format of event data\n  format:\n\n    # Metric format type\n    #   Type:     string\n    #   Values:   ndjson\n    #   Default:  ndjson\n    #   Override: $SCOPE_EVENT_FORMAT\n    #\n    type: ndjson\n\n    # Event rate limiter\n    #   Type:     integer\n    #   Values:   0+\n    #   Default:  10000\n    #   Override: $SCOPE_EVENT_MAXEPS\n    #\n    # Set this to 0 to disable the limiter.\n    #\n    maxeventpersec: 10000\n\n    # Enable enhanced filesystem event data\n    #   Type:     boolean\n    #   Values:   true, false\n    #   Default:  true\n    #   Override: $SCOPE_ENHANCE_FS\n    #\n    # When set to true, `event > watch[*] > type=fs` is enabled. We add uid,\n    # gid, and mode to open events.\n    #\n    enhancefs: true\n\n  # The `event > watch[*]` array contains objects that enable different\n  # categories of events. Their `type` property specifies the category.\n  # Comment out an array entry to disable the category. If you comment\n  # out `event > watch` entirely, AppScope will use the default event\n  # watch list, which enables all categories except metric.\n  #\n  watch:\n\n    # The file category includes writes to files. It's intended primarily for\n    # monitoring log files, but is capable of generating events from writes to any\n    # file. The name and value properties are regular expressions applied to\n    # the filename and written data, respectively. Events will be generated when\n    # both match.\n    #\n    # Set $SCOPE_EVENT_LOGFILE to true or false to enable or disable this\n    # category. The regular expressions can be set with\n    # $SCOPE_EVENT_LOGFILE_NAME and $SCOPE_EVENT_LOGFILE_VALUE.\n    #\n    - type: file\n      name: (\\/logs?\\/)|(\\.log$)|(\\.log[.\\d]) # matches the filename\n      value: .*                               # matches data read or written\n\n    # The console category includes writes to standard out and error and is\n    # intended for monitoring console output, especially in containerized\n    # environments where logging to files isn't commonly done. The name and\n    # value properties are regular expressions applied to the filename and\n    # written data, respectively. Events will be generated when both match.\n    #\n    # Set $SCOPE_EVENT_CONSOLE to true or false to enable or disable this\n    # category. The regular expressions can be set with\n    # $SCOPE_EVENT_CONSOLE_NAME and $SCOPE_EVENT_CONSOLE_VALUE.\n    #\n    # Set $SCOPE_ALLOW_BINARY_CONSOLE to true or false to allow or disallow\n    # emitting binary data for console events.\n    #\n    - type: console\n      name: (stdout)|(stderr) # matches the output stream\n      value: .*               # matches data written\n      allowbinary: true\n\n    # The net category includes open and close events on network connections.\n    # The name, field, and value properties are regular expressions applied\n    # to the corresponding event properties. Events will be generated when\n    # all match.\n    #\n    # Set $SCOPE_EVENT_NET to true or false to enable or disable this\n    # category. The regular expressions can be set with\n    # $SCOPE_EVENT_NET_NAME, $SCOPE_EVENT_NET_FIELD, and $SCOPE_EVENT_NET_VALUE.\n    #\n    - type: net\n      name: .*\n      field: .*\n      value: .*\n\n    # The fs category includes filesystem operations like open, close,\n    # and delete. The name, field, and value properties are regular\n    # expressions applied to the corresponding event properties. Events\n    # will be generated when all match.\n    #\n    # Set $SCOPE_EVENT_FS to true or false to enable or disable this\n    # category. The regular expressions can be set with\n    # $SCOPE_EVENT_FS_NAME, $SCOPE_EVENT_FS_FIELD, and $SCOPE_EVENT_FS_VALUE.\n    #\n    - type: fs\n      name: .*\n      field: .*\n      value: .*\n\n    # The dns category includes DNS request and response events. The name,\n    # field, and value properties are regular expressions applied to the\n    # corresponding event properties. Events will be generated when all\n    # match.\n    #\n    # Set $SCOPE_EVENT_DNS to true or false to enable or disable this\n    # category. The regular expressions can be set with\n    # $SCOPE_EVENT_DNS_NAME, $SCOPE_EVENT_DNS_FIELD, and $SCOPE_EVENT_DNS_VALUE.\n    #\n    - type: dns\n      name: .*\n      field: .*\n      value: .*\n\n    # The http category includes HTTP request and response events. The name,\n    # field, and value properties are regular expressions applied to the\n    # corresponding event properties. Events will be generated when all match.\n    #\n    # The headers entry is a list of regular expressions that are applied to\n    # the HTTP headers in request and response events. Matches are applied to\n    # the whole header line, not just the name. Headers that match are included\n    # in the generated events. Note that headers named `host`, `user-agent`,\n    # `x-forwarded-for`, and `x-appscope` are included by default.\n    #\n    # Set $SCOPE_EVENT_HTTP to true or false to enable or disable this\n    # category. The regular expressions can be set with $SCOPE_EVENT_HTTP_NAME,\n    # $SCOPE_EVENT_HTTP_FIELD, $SCOPE_EVENT_HTTP_VALUE, and\n    # $SCOPE_EVENT_HTTP_HEADER. Note that $SCOPE_EVENT_HTTP_HEADER only sets\n    # a single entry in the `headers` array.\n    #\n    - type: http\n      name: .*         # event name; http.req or http.resp\n      field: .*        # matches field names; duration, http_status, etc\n      value: .*        # matches field values\n      headers:         # list of filters matched against header names\n        #- (?i)Accept                # example of case-insensitive filter\n        #- \"x-content-type-.*: no.*\" # example of required quotes\n\n    # The metric category is very seldom used.\n    # If turned on, AppScope sends non-aggregated metrics out the event channel.\n    # By non-aggregated, we mean metrics with verbosity set to the maximum.\n    # This is only ever used as a last resort when tracking down a problem.\n    # Enable rarely, if ever. Fraught with peril!\n    #\n    # The name, field, and value properties are all regular expressions. Only\n    # matching events will be generated.\n    #\n    # Warning: Enabling this may interfere with proper metric aggregation.\n    #\n    # Set $SCOPE_EVENT_METRIC to true or false to enable or disable this\n    # category. The regular expressions can be set with\n    # $SCOPE_EVENT_METRIC_NAME, $SCOPE_EVENT_METRIC_FIELD, and\n    # $SCOPE_EVENT_METRIC_VALUE.\n    #\n    #- type: metric\n    #  name: .*\n    #  field: .*\n    #  value: .*\n\n  # Settings for the `events` transport\n  #\n  # When the `cribl` feature is enabled, these settings are ignored,\n  # and AppScope sends events via the `cribl` transport rather than this one.\n  #\n  transport:\n\n    # Set $SCOPE_EVENT_DEST to override the type, host, port, and path configs\n    # below. The environment variable should be set to a URL.\n    #\n    #   file:///tmp/output.log  send to a file; note the triple slash\n    #   file://stdout           send to standard out\n    #   file://stderr           send to standard error\n    #   udp://host:port         send to a network server (UDP protocol)\n    #   tcp://host:port         send to a network server (TCP protocol)\n    #   unix://@abstractname    send to a unix domain server w/abstract addr\n    #   unix:///var/run/mysock  send to a unix domain server w/filesystem addr\n    #   edge                    send to cribl edge (over unix domain)\n    #\n    # Note: tls:// is not an option here. For TLS/SSL, use tcp://host:port and\n    # set the $SCOPE_EVENT_TLS_* variables.\n\n    # Connection type\n    #   Type:     string\n    #   Values:   udp, tcp, unix, file, and edge\n    #   Default:  tcp\n    #   Override: the protocol token in the $SCOPE_EVENT_DEST URL\n    #\n    type: tcp\n\n    # Connection host/address\n    #   Type:     string\n    #   Values:   (hostname or IP address)\n    #   Default:  127.0.0.1\n    #   Override: the host token in the $SCOPE_EVENT_DEST URL\n    #\n    host: 127.0.0.1\n\n    # Connection port\n    #   Type:     integer or string\n    #   Values:   port number or service name\n    #   Default:  9109\n    #   Override: the port token in the $SCOPE_EVENT_DEST URL\n    #\n    port: 9109\n\n    # File path / UNIX domain socket path\n    #   Type:     string\n    #   Values:   (directory path, or socket path)\n    #   Default:  (none)\n    #   Override: the path token in the $SCOPE_EVENT_DEST URL\n    #\n    # Applies when connection type is file or unix.\n    #\n    #path: ''\n\n    # File buffering\n    #   Type:     string\n    #   Values:   line, full\n    #   Default:  line\n    #\n    # Only applies when connection type is file.\n    #\n    # Set this to line if there's a chance that multiple scoped processes will\n    # be writing to the same file. This prevents interleaving of lines and\n    # scrambling of the log file. Setting this to full may improve performance\n    # in single-writer scenarios.\n    #\n    #buffer: line\n\n    # TLS connection settings\n    tls:\n\n      # Enable TLS for the `events` transport\n      #   Type:     boolean\n      #   Values:   true, false\n      #   Default:  false\n      #   Override: $SCOPE_EVENT_TLS_ENABLE\n      #\n      # Only applies when the connection type is tcp.\n      #\n      enable: false\n\n      # Validate the TLS server certificate\n      #   Type:     boolean\n      #   Values:   true, false\n      #   Default:  false\n      #   Override: $SCOPE_EVENT_TLS_VALIDATE_SERVER\n      #\n      # Set to false, works like the `curl -k` option. When set to true, the\n      # connection will fail if the server certificate cannot be validated.\n      #\n      # Only applies if the connection type is tcp and TLS is enabled.\n      #\n      validateserver: true\n\n      # CA certification path\n      #   Type:     string\n      #   Values:   (file path)\n      #   Default:  (none)\n      #   Override: $SCOPE_EVENT_TLS_CA_CERT_PATH\n      #\n      # Leave this blank when validateserver is set to true and the local\n      # OS-provided trusted CA certificates are used to validate the server's\n      # certificate. To use a PEM certificate file instead, specify its\n      # full path; useful with self-signed certificates.\n      #\n      # Only applies if the connection type is tcp and TLS is enabled.\n      #\n      cacertpath: ''\n\n# Settings for the `payloads` feature\n#\npayload:\n\n  # Enable payload capture\n  #   Type:     boolean\n  #   Values:   true, false\n  #   Default:  false\n  #   Override: $SCOPE_PAYLOAD_ENABLE\n  #\n  # This can produce large amounts of data from I/O-intensive programs and\n  # should be considered carefully before being enabled.\n  #\n  # See `protocol` for a way to enable this for specific protocols instead of\n  # all traffic.\n  #\n  enable: false\n\n  # Directory for payload files\n  #   Type:     string\n  #   Values:   (directory path)\n  #   Default:  /tmp\n  #   Override: $SCOPE_PAYLOAD_DIR\n  #\n  # Consider using a performant filesystem to reduce I/O performance impacts.\n  #\n  dir: '/tmp'\n\n# Setting up the AppScope library\n#\nlibscope:\n\n  # Enable the config-event message\n  #   Type:     boolean\n  #   Values:   true, false\n  #   Default:  true\n  #   Override: $SCOPE_CONFIG_EVENT\n  #\n  # The config-event message is the first one set on the connection and\n  # contains details identifying the scoped program and the runtime configs.\n  # It's more commonly referred to as the process-start message.\n  #\n  configevent: true\n\n  # Metric summary interval\n  #   Type:     integer\n  #   Values:   1+ seconds\n  #   Default:  10\n  #   Override: $SCOPE_SUMMARY_PERIOD\n  #\n  # See also `metric > verbosity`.\n  #\n  summaryperiod : 10\n\n  # Command directory\n  #   Type:     string\n  #   Values:   (directory path)\n  #   Default:  /tmp\n  #   Override: $SCOPE_CMD_DIR\n  #\n  # The library looks here periodically (see `libscope > summaryperiod`) for a\n  # file named scope.{pid} matching the current process. If found, it's loaded\n  # and deleted. The file should contain environment variables, one per line.\n  #\n  #   SCOPE_METRIC_VERBOSITY=9\n  #   SCOPE_EVENT_HTTP=false\n  #\n  # The given variables are applied to the running config just like startup.\n  # This entire mechanism is what the AppScope docs call Dynamic Configuration.\n  #\n  commanddir : '/tmp'\n\n\n  # Logging settings for the library\n  #\n  log:\n\n    # Set logging verbosity\n    #   Type:     string\n    #   Values:   debug, info, warning, error, or none\n    #   Default:  warning\n    #   Override: $SCOPE_LOG_LEVEL\n    #\n    # When the `cribl` feature is enabled, this is forced to warning.\n    #\n    level: warning\n\n    # Connection settings for the `logs` transport\n    #\n    # The `logs` transport is independent of all other transports, because\n    # AppScope log data (which is in neither JSON nor StatsD format) should normally\n    # be sent to a different destination than events or metrics.\n    #\n    transport:\n\n      # Set $SCOPE_LOG_DEST to override the type, host, port, and path configs\n      # below. The environment variable should be set to a URL.\n      #\n      #   file:///tmp/output.log  send to a file; note the triple slash\n      #   file://stdout           send to standard out\n      #   file://stderr           send to standard error\n      #   udp://host:port         send to a network server (UDP protocol)\n      #   tcp://host:port         send to a network server (TCP protocol)\n      #   unix://@abstractname    send to a unix domain server w/abstract addr\n      #   unix:///var/run/mysock  send to a unix domain server w/filesystem addr\n      #   edge                    send to cribl edge (over unix domain)\n      #\n      # Note: tls:// is not an option here. For TLS/SSL, use tcp://host:port and\n      # set the $SCOPE_LOG_TLS_* variables.\n\n      # Connection type\n      #   Type:     string\n      #   Values:   udp, tcp, unix, file, and edge\n      #   Default:  file\n      #   Override: the protocol token in the $SCOPE_LOG_DEST URL\n      #\n      type: file\n\n      # Connection host/address\n      #   Type:     string\n      #   Values:   (hostname or IP address)\n      #   Default:  (none)\n      #   Override: the host token in the $SCOPE_LOG_DEST URL\n      #\n      #host:\n\n      # Connection port\n      #   Type:     integer or string\n      #   Values:   port number or service name\n      #   Default:  (none)\n      #   Override: the port token in the $SCOPE_LOG_DEST URL\n      #\n      #port:\n\n      # File path / UNIX domain socket path\n      #   Type:     string\n      #   Values:   (directory path, or socket path)\n      #   Default:  '/tmp/scope.log'\n      #   Override: the path token in the $SCOPE_LOG_DEST URL\n      #\n      # Applies when connection type is file or unix.\n      #\n      path: '/tmp/scope.log'\n\n      # File buffering\n      #   Type:     string\n      #   Values:   line, full\n      #   Default:  line\n      #\n      # Only applies when connection type is file.\n      #\n      # Set this to line if there's a chance that multiple scoped processes will\n      # be writing to the same file. This prevents interleaving of lines and\n      # scrambling of the log file. Setting this to full may improve performance\n      # in single-writer scenarios.\n      #\n      buffer: line\n\n  # Settings for the `crash analysis` feature, which writes a snapshot to\n  # the snapshot directory, which is /tmp/appscope/&#x3C;pid>/.\n  # The snapshot consists of either a core dump, a backtrace (i.e., stack trace),\n  # or both.\n  # - If SCOPE_SNAPSHOT_COREDUMP=true, AppScope generates a core dump and writes\n  # it to the snapshot directory as core_&#x3C;timestamp>.\n  # - If SCOPE_SNAPSHOT_BACKTRACE=true, AppScope generates a core dump and writes\n  # it to the snapshot directory as backtrace_&#x3C;timestamp>.\n  # - In either case, AppScope writes two additional files to the snapshot directory,\n  # namely info_&#x3C;timestamp> and cfg_&#x3C;timestamp>.\n  #\n  snapshot:\n\n    # Enable core dump generation\n    #   Type:     boolean\n    #   Values:   true, false\n    #   Default:  false\n    #   Override: $SCOPE_SNAPSHOT_COREDUMP\n    #\n    coredump: false\n\n    # Enable backtrace generation\n    #   Type:     boolean\n    #   Values:   true, false\n    #   Default:  false\n    #   Override: $SCOPE_SNAPSHOT_BACKTRACE\n    #\n    backtrace: false\n\n# Settings for the `cribl` feature.\n# When you enable this feature, AppScope sends both events and metrics over the\n# same transport and connection, in NDJSON format, with log level set to warning\n# and configevent set to true, overriding previously-defined settings.\n#\ncribl:\n\n  # Enable the `cribl` feature\n  #   Type:     boolean\n  #   Values:   true, false\n  #   Default:  true\n  #   Override: $SCOPE_CRIBL_ENABLE\n  #\n  enable: true\n\n  # Authentication token\n  #   Type:     string\n  #   Values:   (any)\n  #   Default:  (none)\n  #   Override: $SCOPE_CRIBL_AUTHTOKEN\n  #\n  # If set, the value is added as a top-level authToken property in the initial\n  # config-event (header) sent to Cribl when the library connects.\n  #\n  #authtoken:\n\n  # Connection settings for the `cribl` transport\n  #\n  transport:\n\n    # Set $SCOPE_CRIBL to override the type, host, port and socket path configs below.\n    # The environment variable should be set to a URL.\n    #\n    #   tcp://host:port         send to a TCP server\n    #   unix://@abstractname    send to a unix domain server w/abstract addr\n    #   unix:///var/run/mysock  send to a unix domain server w/filesystem addr\n    #   edge                    send to cribl edge (over unix domain)\n    #\n    # Note: tls:// is not an option here. For TLS/SSL, use tcp://host:port and\n    # set the $SCOPE_CRIBL_TLS_* variables.\n    #\n    # Note: file:// is not supported here.\n    #\n    # Alternatively, set $SCOPE_CRIBL_CLOUD to the same URL and the library\n    # sets $SCOPE_CRIBL_TLS_ENABLE=true, $SCOPE_CRIBL_TLS_VALIDATE_SERVER=true,\n    # and $SCOPE_CRIBL_TLS_CA_CERT_PATH=\"\" for you.\n\n    # Connection type\n    #   Type:     string\n    #   Values:   tcp, unix, and edge\n    #   Default:  edge\n    #   Override: the protocol token in the $SCOPE_CRIBL or $SCOPE_CRIBL_CLOUD URL\n    #\n    type: edge\n\n    # Connection host/address\n    #   Type:     string\n    #   Values:   (hostname or IP address)\n    #   Default:  127.0.0.1\n    #   Override: the host token in the $SCOPE_CRIBL or $SCOPE_CRIBL_CLOUD URL\n    #\n    # Only applies when the connection type is tcp.\n    #\n    host: 127.0.0.1\n\n    # Connection port\n    #   Type:     integer or string\n    #   Values:   port number or service name\n    #   Default:  10090\n    #   Override: the port token in the $SCOPE_CRIBL or $SCOPE_CRIBL_CLOUD URL\n    #\n    # Defaults to 10090, which is the TCP port on the AppScope Source\n    # in Cribl Stream or Cribl Edge. If you are using the cloud version,\n    # 10090 is the TLS port on the client-facing load balancer which is\n    # proxied to the cloud instance's TCP:10090 port, without TLS.\n    #\n    # Use 10091 here if you need to connect to Cribl.Cloud without TLS and\n    # are not making any changes in the AppScope Source.\n    #\n    # Only applies when the connection type is tcp.\n    #\n    port: 10090\n\n    # Unix domain socket path\n    #   Type:     string\n    #   Values:   socket path\n    #   Default:  (none)\n    #   Override: the socket_path token in the $SCOPE_CRIBL or $SCOPE_CRIBL_CLOUD URL\n    #\n    # Only applies when the connection type is unix.\n    #\n    #path: ''\n\n    # TLS connection settings\n    tls:\n\n      # Enable TLS for the `cribl` transport\n      #   Type:     boolean\n      #   Values:   true, false\n      #   Default:  false\n      #   Override: $SCOPE_CRIBL_TLS_ENABLE or use $SCOPE_CRIBL_CLOUD\n      #\n      # Only applies when the connection type is tcp.\n      #\n      enable: false\n\n      # Validate the TLS server certificate\n      #   Type:     boolean\n      #   Values:   true, false\n      #   Default:  false\n      #   Override: $SCOPE_CRIBL_TLS_VALIDATE_SERVER\n      #\n      # Set to false, works like the `curl -k` option. When set to true, the\n      # connection will fail if the server certificate cannot be validated.\n      #\n      # Only applies if the connection type is tcp and TLS is enabled.\n      #\n      validateserver: true\n\n      # CA certification path\n      #   Type:     string\n      #   Values:   (file path)\n      #   Default:  (none)\n      #   Override: $SCOPE_CRIBL_TLS_CA_CERT_PATH\n      #\n      # Leave this blank when validateserver is set to true and the local\n      # OS-provided trusted CA certificates are used to validate the server's\n      # certificate. To use a PEM certificate file instead, specify its\n      # full path; useful with self-signed certificates.\n      #\n      # Only applies if the connection type is tcp and TLS is enabled.\n      #\n      cacertpath: ''\n\n# Tags for events and metrics\n#\ntags:\n  # `key: value` entries here become fields in generated events and metrics.\n  #\n  # Simple $EXAMPLE variables in the value will be replaced with the\n  # corresponding environment variable values. The regex looks for dollar signs\n  # followed by one or more alphanumeric or underscore characters. If the\n  # corresponding environment variable is not set, the variable is left in the\n  # value.\n  #\n  # Tags can also be added with environment variables prefixed with SCOPE_TAG_.\n  # For example, SCOPE_TAG_service=eg is equivalent to the \"service\" example\n  # below. The value of the environment variable may contain other variables\n  # as described above too; e.g., SCOPE_TAG_user=\\$USER.\n  #\n  #user: $USER\n  #service: eg\n\n# Protocol detection and handling\n#\nprotocol:\n  # Entries in this list define protocols that AppScope should detect in network\n  # payloads and how to handle matches. The first packet seen on a channel is\n  # checked against the regular expression in each entry in the order they\n  # appear in this file. When one matches, later entries are skipped.\n  #\n  # Entries have the following properties:\n  #\n  #   name     String protocol name used in protocol-detect events and payload\n  #            headers sent to Cribl Stream or Cribl Edge (required)\n  #   regex    The regular expression to use (required)\n  #   binary   Boolean indicating whether the regex should be applied to a\n  #            hex-string version of the payload instead of the binary payload\n  #            (default: false)\n  #   len      The number of bytes to convert to hex when `binary` is true\n  #            (default: 256)\n  #   detect   Boolean indicating whether protocol-detect events should be\n  #            generated (default: true)\n  #   payload  Boolean indicating whether payload-processing should be enabled\n  #            for matching streams (default: false)\n  #\n  # When payloads are enabled globally (`payload > enable`), the payload\n  # options here are ignored.\n  #\n  # Warning: The `name` value is currently inserted into the JSON header for\n  # payloads sent to Cribl Stream or Cribl Edge, so it cannot contain double\n  # quotes or backslashes without breaking the JSON. It needs to be kept fairly\n  # short, too, so the header doesn't exceed the 1k limit. If this becomes a\n  # problem, we'll consider adding logging and validation.\n  #\n\n  # Example for the plain-text Redis protocol using the default detect and\n  # payload settings\n  #\n  #- name: Redis\n  #  regex: \"^[*]\\\\d+|^[+]\\\\w+|^[$]\\\\d+\"\n\n  # Example for the MongoDB protocol showing how to detect a binary protocol\n  #\n  #- name: Mongo\n  #  regex: \"^240100000000000000000000d407\"\n  #  binary: true\n  #  len: 14\n\n  # AppScope uses an internally defined protocol detector for HTTP like the\n  # example below by default.\n  #\n  # Uncomment this and adjust as needed to override the defaults.\n  #\n  #- name: HTTP\n  #  regex: \"HTTP\\\\/1\\\\.[0-2]|PRI \\\\* HTTP\\\\/2\\\\.0\\r\\n\\r\\nSM\\r\\n\\r\\n\"\n\n  # By default, AppScope uses an internally-defined protocol detector for\n  # StatsD, similar to the example below.\n  #\n  # Uncomment this and adjust as needed to override the defaults.\n  #\n  #- name: STATSD\n  #  regex: \"^([^:]+):([\\\\d.]+)\\\\|(c|g|ms|s|h)\"\n\n  # AppScope uses another internally defined protocol detector for SSL/TLS like\n  # the example below by default.\n  #\n  # Uncomment this entry to override the regex details or to set detect to\n  # false. The payload setting here is never used. AppScope never sends\n  # encrypted payloads to disk, to Cribl Stream, or to Cribl Edge.\n  #\n  #- name: TLS\n  #  regex: \"^(?:(?:16030[0-3].{4})|(?:8[0-9a-fA-F]{3}01))\"\n  #  binary: true\n  #  len: 5\n\n# Custom configs\n# Use this area of the config file to specify settings to override,\n# and what new settings to override them with, for processes that match\n# criteria you define as filters.\n#\ncustom:\n  # Each custom entry has a name, a `filter` element, and a `config` element.\n  # When a scoped process matches the filter(s), the setting defined\n  # in the `config` element overrides previously-defined settings.\n  #\n  #   name:\n  #     filter:\n  #       ...\n  #     config:\n  #       ...\n  #\n  # Entries under `filter` are used to match aspects of a scoped process. There\n  # must be at least one of them and all of them must match for the filter to\n  # succeed. The following filters are supported.\n  #\n  #   procname: string\n  #\n  #     Matches if the given string value matches the basename of the scoped\n  #     process.\n  #\n  #   arg: string\n  #\n  #     Matches if the given string value appears and a substring anywhere in\n  #     the scoped process's full command line including an options and\n  #     arguments.\n  #\n  #   hostname: string\n  #\n  #     Matches if the given string value matches the hostname of the machine\n  #     where the scoped process is running.\n  #\n  #   username: string\n  #\n  #     Matches if the given string value matches the username for the scoped\n  #     process's UID.\n  #\n  #   env: string\n  #\n  #     The string value is the name of an environment variable alone (i.e.\n  #     \"FOO\") or with a value (i.e. \"FOO=bar\"). The filter matches if the\n  #     environment variable is set and, in the later case, the value matches.\n  #\n  #   ancestor: string\n  #\n  #     Matches if given string matches the basename of the scoped process's\n  #     parent, parent's parent, etc.\n  #\n  # The `config` section specifies the settings that should be overridden when\n  # the filter matches. Entries under `config` use the same schema as the\n  # top-level entries (without `custom`).\n  #\n\n  # Increase metric verbosity for processes owned by the \"eg\" user and running\n  # on the \"eg1\" host.\n  #\n  #example:\n  #  filter:\n  #    username: eg\n  #    hostname: eg1\n  #  config:\n  #    metric:\n  #      format:\n  #        verbosity: 7\n  #    tags:\n  #      service: eg\n\n  # Enable the Cribl Stream destination for Nginx\n  # processes. Both this entry and the `example` entry above would\n  # apply if both filters match – so the service tag here would\n  # override the one above. In this example, we use a Cribl.Cloud-managed\n  # Cribl Stream instance.\n  #\n  #nginx:\n  #  filter:\n  #    procname: nginx\n  #  config:\n  #    tags:\n  #      service: nginx\n  #    cribl:\n  #      enable: true\n  #      transport:\n  #        type: tcp\n  #        host: in.main-default-&#x3C;organization>.cribl.cloud\n  #        port: 10090\n  #        tls:\n  #          enable: true\n\n# EOF\n</code></pre>","frontmatter":{"title":"Config File"}}},"pageContext":{"slug":"/config-file/","id":"1bd5e446-5528-59d0-b00a-8afad28fcdd6"}},"staticQueryHashes":["2787008656","306729481","625673991","640077088"]}