A collection of common Sloth sli plugins ready to be used on Sloth manifests, or used as examples to create your own.
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}
You can contribute with new plugins the same way the ones in plugins, the process would be this:
app-x
, protocol-y
, library-z
...).availability
, latency
...).plugin.go
file with the plugin and a plugin_test.go
for the unit tests.test/integration
to test that sloth can load and use this plugin correctly.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):
You can execute these to test it while developing:
make check
make test
make integration-test