Skip to content

slok/sloth-common-sli-plugins

Repository files navigation

Sloth common sli plugins

CI Go Report Card Apache 2 licensed

Introduction

A collection of common Sloth sli plugins ready to be used on Sloth manifests, or used as examples to create your own.

Getting started

One of the Sloth features are the SLI plugins. These can be loaded dynamically when Sloth is executed and the SLO manifests can reference these plugins and pass some options to set an SLI, instead of writing the SLI query.

To use these plugins you could do:

# Get the plugins.
git clone https://github.com/slok/sloth-common-sli-plugins.git

# Load the plugins and use them (Sloth can load plugins from multiple dirs).
sloth generate -p ./sloth-common-sli-plugins -i {MY_SLO_MANIFEST}

Plugins

Contributing

You can contribute with new plugins the same way the ones in plugins, the process would be this:

  • Create a directory (or/and subdirectories) group in plugins, only if the group would have more than one SLI plugin (e.g app-x, protocol-y, library-z...).
  • Create a directory for each plugin: (e.g availability, latency...).
  • Create a plugin.go file with the plugin and a plugin_test.go for the unit tests.
  • Create an sloth manifest in test/integration to test that sloth can load and use this plugin correctly.
  • Add a README.md on the group and/or the plugin dir and reference the plugin in this readme in plugins section. the readme should have for each plugin at least (example):
    • Introduction.
    • Options.
    • Metric requirements.
    • Usage examples.

You can execute these to test it while developing:

  • make check
  • make test
  • make integration-test

About

Sloth common SLI plugins collection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •