Skip to main content

External documentation

Cortex is your source of truth to external documentation. Instead of digging through wikis and other resources, you can aggregate documentation on the relevant entities in Cortex in the following ways:

  • Adding links to an entity
  • Displaying Swagger, OpenAPI, or AsyncAPI specs on an entity
  • Embedding git-driven markdown
  • Embedding dashboards

On entities, you can add links to docs, runbooks, tech specs, dashboards, and more. Links appear on an entity details page under the Links section.

In the entity descriptor, add a list of link objects:

x-cortex-link:
- name: Human Readable Name
type: runbook
url: https://cortex.io
description: Optional Description

name, type, and url are required. The value of type can be defined based on your organization's preferences. Common examples include dashboard, documentation, healthcheck, logs, metrics, and runbook.

tip

You can look up links easily using our Slackbot!

Add API documentation

There are several options for embedding API documentation. Cortex supports displaying Swagger/OpenAPI or AsyncAPI specs for each entity in the "API Explorer" tab of an entity. You can also authorize your API and run queries directly in the API explorer.

Swagger/OpenAPI documentation

You can use your entity descriptor file as an OpenAPI spec file. As mentioned in the documentation on entities, the entity descriptor file extends the OpenAPI spec, so you can implement the spec directly in this file.

AsyncAPI documentation

If you have existing or external specs you want to display in the API explorer (e.g. from GitHub Raw URL, etc), add a URL to the spec file (JSON or YAML) as an x-cortex-link, with type async_api. The spec will then automatically show up in the API Explorer.

Git-driven markdown docs

Cortex automatically embeds markdown files from the docs folder of your repo or from the root directory. If Cortex detects relevant files, these docs show up under the Integrations > Documents tab on the entity details page.

Cortex uses the React markdown library for rendering the documents.

Embed dashboards

Cortex supports embedding charts directly into the Catalog for quick access, making the Catalog a single pane of glass for your architecture.

x-cortex-dashboards:
embeds:
- type: datadog | grafana | newrelic (optional)
url: https://example.com
  • The type field is an optional enum of three types.
  • The url field is the src value for the iframe embed generated by your dashboard tool.
    • You must use your tool's embed URL for individual charts.

The type field is used when generating screenshots for certain Slack integration points. If you do not plan to use this feature, leave the type field blank and only add the URL, as it's ignored entirely when embedding in the catalog.

tip

Note that you can only embed charts, not dashboards.

If you're using Grafana and seeing errors in your Grafana embeds, make sure your Grafana instance has embeds enabled.