Forge Home

loki

Like Prometheus, but for logs

2,487 downloads

1,096 latest version

5.0 quality score

Version information

  • 1.0.0 (latest)
  • 0.1.0
released Aug 31st 2021
This version is compatible with:
  • Puppet Enterprise 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x
  • Puppet >= 6.1.0 < 8.0.0
  • , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'attachmentgenie-loki', '1.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add attachmentgenie-loki
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install attachmentgenie-loki --version 1.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

attachmentgenie/loki — version 1.0.0 Aug 31st 2021

attachmentgenie-loki

Spec Tests License

Deploy and configure loki on a node.

Description

Loki

It primarily:

  1. Discovers targets
  2. Attaches labels to log streams
  3. Pushes them to the Loki instance.

Currently, Loki can tail logs from two sources: local log files and the systemd journal (on AMD64 machines only).

Usage

All options and configuration can be done through interacting with the parameters on the main loki class. These are now documented via Puppet Strings

You can view example usage in REFERENCE.

Minimal example

the following code creates a standalone loki instance (not desinged for production):


class{ 'loki':
  auth_enabled                => false,
  schema_config_hash          => {'schema_config' => {'configs' => [{'from' => '2020-05-15', 'store' => 'boltdb', 'object_store' => 'filesystem', 'schema' => 'v11', 'index' =>{'prefix' => 'index_', 'period' => '168h'}}]}},
  storage_config_hash         => {'storage_config' => { 'boltdb' => { 'directory' => '/var/lib/loki/index',}, 'filesystem' => {'directory' => '/var/lib/loki/chunks',},},},
  server_config_hash          => {'server' => {'http_listen_port' => 3100, 'http_listen_address' => $facts['networking']['ip']},},
  ingester_client_config_hash => {'ingester' => { 'lifecycler' => {'interface_names' => [$facts['networking']['primary']], 'address' => '127.0.0.1', 'ring' =>{'kvstore' =>{'store' => 'inmemory'}, 'replication_factor' => 1}}}},
}

Reference

See REFERENCE.

Limitations

This is where you list OS compatibility, version compatibility, etc.

Development

Running tests

This project contains tests for both rspec-puppet and litmus to verify functionality. For detailed information on using these tools, please see their respective documentation.

Testing quickstart:

pdk bundle install
pdk bundle exec rake 'litmus:provision_list[puppet6]'
pdk bundle exec rake 'litmus:install_agent[puppet6]'
pdk bundle exec rake litmus:install_module
pdk bundle exec rake litmus:acceptance:parallel
pdk bundle exec rake litmus:tear_down