Skip to content

Authentication

To authenticate with the Mimir and Loki APIs, you can either use a SysEleven IAM Service Account or a Service Account Credentials with applicable observability permissions, granting either read-only, write-only or read/write access to the Mimir and Loki APIs.

Mimir

Grafana Mimir is a long-term storage system (time-series database) for metrics. SysEleven hosts Mimir at https://metrics.syseleven.services/<org-id>/<project-id>. Append /prometheus to the base URL to access the Prometheus-compatible API (e.g., https://metrics.syseleven.services/4e8ba78f-918a-4c94-9be6-9ee5c5748b21/45c1abc103cd49dc9b8d7f9f16bc9362/prometheus).

Please refer to the official Mimir API documentation to learn how to use the Mimir API.

Note

You must append your org-id and project-id to the base URL (e.g., https://metrics.syseleven.services/4e8ba78f-918a-4c94-9be6-9ee5c5748b21/45c1abc103cd49dc9b8d7f9f16bc9362/prometheus).

Loki

Grafana Loki is a long-term storage system for logs. SysEleven hosts Loki at https://logs.syseleven.services/<org-id>/<project-id>.

Please refer to the official Loki API documentation to learn how to use the Loki API.

Note

As with Mimir, you need to append your org-id and project-id to the base URL (e.g., https://logs.syseleven.services/4e8ba78f-918a-4c94-9be6-9ee5c5748b21/45c1abc103cd49dc9b8d7f9f16bc9362).

We recommend the following setup for ingesting logs and metrics from your SysEleven OpenStack Cloud resources:

Grafana Alloy Architecture

  • Grafana Alloy as a central collector service.
  • Mimir as a long-term storage for metrics.
  • Loki as a long-term storage for logs.

For instance, in order to scrape a local log file, you can use the following configuration:

# Configure file matcher (all log files in `/var/log/`)
local.file_match "local_files" {
    path_targets = [{"__path__" = "/var/log/*.log"}]
    sync_period = "5s"
}

# Configure scraping of the `local_files` components
loki.source.file "log_scrape" {
  targets    = local.file_match.local_files.targets
  forward_to = [loki.process.filter_logs.receiver]
  tail_from_end = true
}

and then configure Alloy to remote-write the logs to Loki.

loki.write "grafana_loki" {
  endpoint {
    url = "https://logs.syseleven.services/<org-id>/<project-id>/loki/api/v1/push"
    bearer_token = "s11_prak_<uuid>_<secret>"
  }
}

Integrate Observability with Grafana

You can easily integrate SysEleven Observability Mimir/Loki tenants with Grafana, as separate data sources. Programatically, you can use the following configuration in your Grafana datasources.yaml file to set up the data sources for Mimir and Loki:

datasources:
  datasources.yaml:
    apiVersion: 1
    datasources:
      - name: Alertmanager
        type: alertmanager
        url: https://metrics.syseleven.services/<org_id>/<project_id>
        access: proxy
        editable: false
        jsonData:
          httpHeaderName1: Authorization
        secureJsonData:
          httpHeaderValue1: "Bearer s11_prak_<uuid>_<secret>"
      - name: Prometheus
        type: prometheus
        url: https://metrics.syseleven.services/<org_id>/<project_id>/prometheus
        access: proxy
        isDefault: true
        editable: false
        jsonData:
          prometheusType: Mimir
          httpHeaderName1: Authorization
        secureJsonData:
          httpHeaderValue1: "Bearer s11_prak_<uuid>_<secret>"
      - name: Loki
        type: loki
        url: https://logs.syseleven.services/<org_id>/<project_id>
        access: proxy
        editable: false
        jsonData:
          httpHeaderName1: Authorization
        secureJsonData:
          httpHeaderValue1: "Bearer s11_prak_<uuid>_<secret>"

Configuration via GUI

You can also configure the data sources via the Grafana GUI. From Grafana, head to Data sources and add a new data source for Alertmanager, Mimir and Loki. Use the configuration provided above as a reference to fill in the required values in the GUI.

Remember to replace the placeholder values with the correct data.

Using Grafana Alloy

We highly recommend taking a look at the alloy-scenarios repository, which contains various Alloy scenarios that can be used as a starting point for your own Alloy configuration.