> ## Documentation Index
> Fetch the complete documentation index at: https://gcore-doc-1894.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure logging and view logs

Managed Logging collects logs from infrastructure components, delivers them to Kafka topics, and makes them searchable in OpenSearch Dashboards.

<Steps>
  <Step title="Select the region">
    Select the region where logs will be stored.

    <Note>Logging may be unavailable in some regions. Select the region that is geographically closest to the equipment.</Note>
  </Step>

  <Step title="Create a namespace">
    In the **Cloud** menu, navigate to **Managed Logging** and click **Set up Managed Logging**. A "Create namespace" dialog appears.

    <Accordion title="What is a namespace">
      A *namespace* is a prefix applied to all topic names in the region. Previously, Managed Logging automatically generated a non-human-readable namespace string (e.g., `cbc25c71af8d4f7ca6cbbcdc5a4d68fe`). Human-readable namespaces are now supported (e.g., `namespace123`), which produces topic names in the format `namespace123.topic-name`.

      <Note>A human-readable namespace can only be created for a new project that does not already have a default namespace assigned. Once created, the namespace name cannot be changed.</Note>
    </Accordion>

    Enter the namespace name according to the following restrictions:

    * Lowercase Latin letters and digits can be used
    * Underscores and spaces are prohibited
    * Length is between 2–32 characters
    * The name must be unique for the destination region. If it is already used, the system will suggest a different name.

    Click **Create**.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1894/c8S2MVWl4Jaf8jd3/images/docs/cloud/logging-as-a-service/configure-logging-and-view-your-logs/configure-logging-and-view-your-logs-image1.png?fit=max&auto=format&n=c8S2MVWl4Jaf8jd3&q=85&s=4769205645870c6f03482006a31af3ec" alt="Create namespace dialog" width="1400" height="900" data-path="images/docs/cloud/logging-as-a-service/configure-logging-and-view-your-logs/configure-logging-and-view-your-logs-image1.png" />
    </Frame>
  </Step>

  <Step title="Create a topic">
    In the **Topics** section, click **Create topic**, enter a name, set the retention period, and click **Save**. Gcore automatically creates an index pattern for the topic in OpenSearch Dashboards using "@timestamp" as the time field.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1894/c8S2MVWl4Jaf8jd3/images/docs/cloud/logging-as-a-service/configure-logging-and-view-your-logs/configure-logging-and-view-your-logs-image2.png?fit=max&auto=format&n=c8S2MVWl4Jaf8jd3&q=85&s=c3431e4377bde300b0f6560b03806bd9" alt="Logging page showing the Topics section with a created topic" width="1400" height="900" data-path="images/docs/cloud/logging-as-a-service/configure-logging-and-view-your-logs/configure-logging-and-view-your-logs-image2.png" />
    </Frame>
  </Step>

  <Step title="Generate credentials">
    Click **Generate credentials** in the upper-right corner. A warning dialog appears — click **Confirm** to proceed. A "Credentials" dialog shows a login (the namespace name) and password for the storage. Save the credentials immediately — they cannot be retrieved after closing the window.

    Use these credentials to authenticate log shippers that send logs to Managed Logging.

    If the credentials are lost, click **Generate credentials** again to generate a new pair. The previous credentials are deactivated automatically. Update the credentials in the settings of the installed log shippers.

    If Managed Logging is used in multiple regions, each region has separate storage and requires its own credentials.
  </Step>

  <Step title="Configure a log shipper">
    Select a log shipper (e.g. [Fluent Bit](/cloud/logging-as-a-service/install-a-log-shipper/install-and-configure-fluent-bit), [Filebeat](/cloud/logging-as-a-service/install-a-log-shipper/install-and-configure-filebeat), or [Logstash](/cloud/logging-as-a-service/install-a-log-shipper/install-and-configure-logstash)) that supports Kafka output.

    Configure the log shipper with the Kafka endpoint, credentials generated in step 4, and target topic name `<namespace>.<topic>`. To find the Kafka endpoint, navigate to the Logging page and open the **Kafka endpoint** tab in the **How to use Managed Logging** section.

    <Note>Log message size is max 1 MB in text/JSON format, limited to 225 fields. After the log shipper is configured, logs flow automatically from the device to the Kafka topic, and then to OpenSearch for indexing.</Note>

    The pre-created index pattern uses "@timestamp" as the time field. If the log shipper sends a field named `@timestamp` in each log record — which most shippers do by default — no additional configuration is required in OpenSearch. If the logs use a different field name for the timestamp, a custom index pattern must be created after signing in to OpenSearch Dashboards.
  </Step>

  <Step title="Open OpenSearch Dashboards">
    Navigate to OpenSearch Dashboards using the URL from the **Dashboards** field under the **OpenSearch endpoints** tab on the Logging page.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1894/c8S2MVWl4Jaf8jd3/images/docs/cloud/logging-as-a-service/configure-logging-and-view-your-logs/configure-logging-and-view-your-logs-image3.png?fit=max&auto=format&n=c8S2MVWl4Jaf8jd3&q=85&s=95a2e37255d85300489917dd643e10af" alt="Logging page showing OpenSearch endpoints tab with the Dashboards URL" width="1400" height="900" data-path="images/docs/cloud/logging-as-a-service/configure-logging-and-view-your-logs/configure-logging-and-view-your-logs-image3.png" />
    </Frame>

    Log in using the credentials generated in step 4.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1894/c8S2MVWl4Jaf8jd3/images/docs/cloud/logging-as-a-service/configure-logging-and-view-your-logs/configure-logging-and-view-your-logs-image4.png?fit=max&auto=format&n=c8S2MVWl4Jaf8jd3&q=85&s=dcb402508f25643352811d4844ac2adb" alt="OpenSearch Dashboards login page" width="1400" height="900" data-path="images/docs/cloud/logging-as-a-service/configure-logging-and-view-your-logs/configure-logging-and-view-your-logs-image4.png" />
    </Frame>

    <Note>On first login, a dialog prompting tenant selection appears. Select **Private** and click **Confirm** to proceed.</Note>

    OpenSearch Dashboards uses index patterns to determine which indices to display in Discover. Gcore automatically creates an index pattern for each topic using "@timestamp" as the time field. If that matches the timestamp field in the logs, the setup is complete — proceed to step 7.

    If the logs use a different timestamp field, create a custom index pattern before viewing logs.

    <Accordion title="Create a custom index pattern">
      **Navigate to Index patterns.** Click **Manage** in the upper-right corner of the home page, then select **Index patterns** from the left menu.

      <Frame>
        <img src="https://mintcdn.com/gcore-doc-1894/c8S2MVWl4Jaf8jd3/images/docs/cloud/logging-as-a-service/configure-logging-and-view-your-logs/configure-logging-and-view-your-logs-image5.png?fit=max&auto=format&n=c8S2MVWl4Jaf8jd3&q=85&s=c01af30ea5bd96599589092197cdff66" alt="OpenSearch Dashboards home page with Manage link in the upper-right corner" width="1400" height="900" data-path="images/docs/cloud/logging-as-a-service/configure-logging-and-view-your-logs/configure-logging-and-view-your-logs-image5.png" />
      </Frame>

      **Delete the pre-created pattern.** Click the existing pattern name in the list to open it, then click the delete icon in the upper-right corner and confirm.

      **Open the creation form.** Click **+ Create index pattern** in the upper-right corner.

      <Frame>
        <img src="https://mintcdn.com/gcore-doc-1894/c8S2MVWl4Jaf8jd3/images/docs/cloud/logging-as-a-service/configure-logging-and-view-your-logs/configure-logging-and-view-your-logs-image6.png?fit=max&auto=format&n=c8S2MVWl4Jaf8jd3&q=85&s=6f7f12248c884060b835bb39e52fd053" alt="Index patterns management page with Create index pattern button" width="1400" height="900" data-path="images/docs/cloud/logging-as-a-service/configure-logging-and-view-your-logs/configure-logging-and-view-your-logs-image6.png" />
      </Frame>

      Logs are stored in an index that shares the name of the topic. The index pattern is a filter that tells OpenSearch Dashboards which index to display in Discover.

      **Enter the pattern name.** In the **Index pattern name** field, enter the namespace created in step 2, followed by a dot (.) and the topic name from step 3, followed by an asterisk (\*). If the namespace is `mylogging1` and the topic is `my-app-logs-1`, enter `mylogging1.my-app-logs-1*`. Click **Next step** to proceed.

      <Frame>
        <img src="https://mintcdn.com/gcore-doc-1894/c8S2MVWl4Jaf8jd3/images/docs/cloud/logging-as-a-service/configure-logging-and-view-your-logs/configure-logging-and-view-your-logs-image7.png?fit=max&auto=format&n=c8S2MVWl4Jaf8jd3&q=85&s=cf70ac4b186f89a4fe064c563608e03d" alt="Create index pattern form with the pattern entered" width="1400" height="900" data-path="images/docs/cloud/logging-as-a-service/configure-logging-and-view-your-logs/configure-logging-and-view-your-logs-image7.png" />
      </Frame>

      **Select the timestamp field.** Select the timestamp field from the dropdown list, and click **Create index pattern**.
    </Accordion>
  </Step>

  <Step title="View logs">
    To view logs, navigate to the main menu and select **Discover**.
  </Step>
</Steps>
