---
icon: "material/rocket-launch"
---

Apps and modules offer quickstart [YAML config](https://doc.log10x.com/config/yaml/) files for local and online editing.

### :material-play-outline: Main Config

Each app defines a main config file which [+includes](https://doc.log10x.com/config/yaml/#include-directives)
the config files of its required modules (e.g., inputs, output). 

Edit Main config files to select which different configurable modules comprising the app to load.

<figure markdown="span">
  ![Image title](https://doc.log10x.com/assets/edit_main.png){ style="float: left; margin-right: 1rem;"; width=90%; height=90% }
  <figcaption>App main config files load required modules</figcaption>
</figure>

For example, the [Edge reporter](https://doc.log10x.com/apps/reporter/run/#config-files) main config file loads metric output modules for publishing cost insight metrics to an array of time-series DBs (e.g., Prometheus, Datadog). 

### :octicons-package-24: Module Config

Edit module config files to enable and configure input, processing and output modules. 

Default values are provided where possible. Fields that require user input (e.g., api keys) are marked with `(# ❗ REQUIRED)`.

For example, to enable a [Datadog output](https://doc.log10x.com/run/output/metric/datadog/), ensure its Datadog api and app keys are set inline or (preferably) via environment variables, and any other optional value defined in its config file.

<figure markdown="span">
  ![Image title](https://doc.log10x.com/assets/edit_module.png){ style="float: left; margin-right: 1rem;"; width=90%; height=90% }
  <figcaption>Edit module config files to enable and authenticate I/O modules</figcaption>
</figure>

### :material-github: Edit Online

Manage configurations via a secure, centralized [GitOps](https://doc.log10x.com/engine/gitops/) workflow. 

The 10x Engine can [pull](https://doc.log10x.com/config/github/) config and JavaScript files from GitHub at startup and on remote changes. In Kubernetes deployments, it can also [load them directly from a ConfigMap](https://doc.log10x.com/config/k8s/), picking up edits without a pod restart.

To edit modules files using the [github.dev](https://github.dev){:target="_blank"} online editor:

1. Select a module to edit and click its `Edit Online` button. For example, click the button below to edit the Datadog output config:

    <div class="edit-options">
        <a class="md-button tenx-edit-online-button" data-tooltip="Edit Datadog output config on github.dev" href="https://github.com/log-10x/config/tree/main/pipelines/run/output/metric/datadog/config.yaml">
            <span class="twemoji" style="margin-right: 0.3rem;">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
                    <path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path>
                </svg>
            </span> Edit Online
        </a>
    </div>


2. Edit the file on vscode.dev and press Save (Ctrl+S), which saves locally in the browser.

3. Open the Source Control panel (Ctrl+Shift+G), stage changes, and click Commit.

    <figure markdown="span">
      ![Image title](https://doc.log10x.com/assets/commit.png){ style="float: left; margin-right: 1rem;"; width=50%; height=50% }
    </figure>

4. When promoted: “You don’t have write access. Fork this repository.”, click “Fork this repository,” to create a fork.
   To learn more see [Source Control](https://docs.github.com/en/codespaces/the-githubdev-web-based-editor#using-source-control){:target="_blank"}.

5. Configure the 10x Engine to [pull](https://doc.log10x.com/config/github/) the forked branch at run time.

### :material-wrench-outline: Edit Locally

Click the `Edit Locally` button to open an embedded VS Code-style editor with YAML syntax highlighting and schema-based tooltips.

Use the toolbar buttons to:

- **Save** - View config file locations on disk and download the edited file
- **Copy** - Copy the config to clipboard
- **Fullscreen** - Expand the editor to full screen

<figure markdown="span">
  ![Image title](../assets/edit_locally_dialog.png){ style="float: left; margin-right: 1rem;"; width=90%; height=90% }
  <figcaption>The Edit Locally dialog with embedded YAML editor and schema-based tooltips</figcaption>
</figure>

### :simple-yaml: Structured Editing

Each config file is defined by a matching [schema.json](https://json-schema.org/){:target="_blank"} file which enables structured editing and rich tooltips within local/online IDEs.

<figure markdown="span">
  ![Image title](https://doc.log10x.com/assets/vscode_tooltip.png){ style="float: left; margin-right: 1rem;"; width=90%; height=90% }
  <figcaption>JSON schemas enable rich tooltips when editing yaml config files.</figcaption>
</figure>

!!! tenx-vscode "VSCode Support"

    To enable structured editing in VSCode or github.dev, install the [YAML language](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml){:target="_blank"} extension.

