Skip to content

Multitenant Logging⚓︎

Get acquainted with the multitenant logging components and the project logs location in the Shared cluster.

Logging Components⚓︎

To configure the multitenant logging, it is necessary to deploy the following components:

In Grafana, every tenant represents an organization, i.e. it is necessary to create an organization for every namespace in the cluster. To get more details regarding the architecture of the Logging Operator, please review the Diagram 1.

Logging operator scheme
Logging operator scheme

Note

It is necessary to deploy Loki with the auth_enabled: true flag with the aim to ensure that the logs are separated for each tenant. For the authentication, Loki requires the HTTP header X-Scope-OrgID.

Review Project Logs in Grafana⚓︎

To find the project logs, navigate to Grafana and follow the steps below:

Note

Grafana is a common service for different customers where each customer works in its own separated Grafana Organization and doesn't have any access to another project.

  1. Choose the organization by clicking the Current Organization drop-down list. If a user is assigned to several organizations, switch easily by using the Switch button.

    Current organization
    Current organization

  2. Navigate to the left-side menu and click the Explore button to see the Log Browser:

    Grafana explore
    Grafana explore

  3. Click the Log Browser button to see the labels that can be used to filter logs (e.g., hostname, namespace, application name, pod, etc.):

    Note

    Enable the correct data source, select the relevant logging data from the top left-side corner, and pay attention that the data source name always follows the ‹project_name›-logging pattern.

    Log browser
    Log browser

  4. Filter out logs by clicking the Show logs button or write the query and click the Run query button.

  5. Review the results with the quantity of logs per time, see the example below:

    Logs example
    Logs example

    • Expand the logs to get detailed information about the object entry:

    Expand logs
    Expand logs

    • Use the following buttons to include or remove the labels from the query:

    Addition button
    Addition button

    • See the ad-hoc statistics for a particular label:

    Ad-hoc stat example
    Ad-hoc stat example