Skip to main content
The Cortex YAML linter validates your cortex.yaml files against both general YAML syntax and Cortex-specific schema requirements, catching invalid or incomplete entity definitions before they reach the platform. This page covers the built-in tool available in the Cortex UI under Tools > YAML Linter. A separate linter is also built into the Cortex GitHub app, which runs checks on pull requests when you use GitHub in a GitOps workflow.

Using the YAML linter

Validating a YAML file in the Cortex UI

  1. From the main sidebar, expand Tools, then select YAML linter.
    The YAML linter tool displayed in the Cortex UI.
  2. Paste your YAML into the text editor, then click Validate YAML.
  3. A status banner appears at the bottom of the page:
    • If the format is valid, a success message is displayed:
      YAML success message and icon.
    • If the format is incorrect:
      • For issues with the format of a Cortex-specific block, a warning banner appears:
        The linter warning banner indicates that x-cortex-apm has an empty value in the YAML file.
      • For errors that cause the YAML to fail the linter check (such as missing a title or x-cortex-tag), a failure banner that includes the error message and which line is affected appears:
        YAML fail message and icon.

Validation scope

The linter checks for valid YAML structure and ensures required Cortex fields (like openapi version, x-cortex-tag, etc.) are present. If a required field is not present, this results in an error and the YAML does not pass the linter check. The linter also validates the format of Cortex-specific blocks (e.g., x-cortex-groups, x-cortex-firehydrant) but does not verify the correctness of referenced data (such as whether a group or monitor ID actually exists). If there is an issue for a Cortex block, such as a block that doesn’t contain a value, you will see a warning; however, the YAML will still pass the linter check. If you submit a file with templating syntax (e.g., Jinja or cookiecutter variables like {{ variable }}), the linter will fail because these are not valid YAML until rendered. Only fully rendered YAML files will pass validation. If the YAML is invalid or missing required fields, the linter will return errors indicating the line and nature of the problem.

GitOps settings for the linter tool

If you are using GitHub in a GitOps workflow, you can adjust settings related to the linter. See GitOps Settings for more information.
Last modified on September 21, 2026