loki-cf-logdrain

command module
v0.5.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2023 License: MIT Imports: 19 Imported by: 0

README

loki-cf-logdrain

loki-cf-logdrain.excalidraw.svg

User deployable service which implements a pipeline consisting of a small Go app and a promtail sidecar process. It presents a CF compatible logdrainer endpoint which accepts RFC5424 messages, forwards them to the promtail sidecar process, which in turn forwards the log messages to Loki , done.

Usage

Deployment should be performed using the bundled Terraform module. It injects the proper promtail config for you.

module "loki_logdrain" {
  source = "./modules/loki-cf-logdrain"
  name_postfix           = var.postfix
  cf_domain              = var.cf_domain
  cf_space_id            = var.cf_space_id
  
  loki_username = "loki"
  loki_password = "some-secret-password"
  
  loki_push_endpoint = "https://loki.some-fiesta-cluster.terrakube.com/loki/api/v1/push"
}

resource "cloudfoundry_user_provided_service" "loki_logdrain" {
  name  = "tf-loki-logdrain-${var.postfix}"
  space = var.cf_space_id
  syslog_drain_url = module.loki_logdrain.logdrain_url
}
Binding

You can bind CF apps to the above created draining service to start delivery of logs to your Loki instance.

License

License is MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL