Skip to content

spacelift-solutions/plugin-loki

Repository files navigation

Plugin Loki

This module adds the loki plugin to your Spacelift account. It will send logs, with information about the run, to Loki.

Note: There is currently a limitation in the Spacelift API that prevents sending the actual log output to Loki. This means that you will only see metadata about the run, such as the run ID, the stack ID, the status of the run, etc. You will not see the actual logs of a run.

Usage

  1. Spin up the module (see examples below)
  2. Add the plugin_loki label to any stack.

The labeled stacks will automatically send logs to Loki.

SS2.png

SS1.png

Example

module "plugin_loki" {
  source = "spacelift.io/spacelift-solutions/plugin-loki/spacelift"

  # Required Variables
  loki_endpoint = "https://loki.example.com/loki/api/v1/push"
  space_id      = "root"

  # Optional Variables
  name_suffix    = "loki"
  policy_labels  = ["production"]
  webhook_labels = ["production"]
}

Inputs

Name Description Type Default Required
loki_endpoint The endpoint of the Loki instance to send logs to.
Example: https://{your-publicly-facing-loki-endpoint}/loki/api/v1/push
string n/a yes
name_suffix Suffix to append to the name of the resources string "" no
policy_labels Labels to apply to the policy list(string) [] no
space_id The ID of the Space to create the resources in string n/a yes
webhook_labels Labels to apply to the webhook list(string) [] no

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors