License
MIT License
The sensu-grafana-mutator is a Sensu Mutator that parse a label as grafana loki explore url and add to event as grafana_loki_url annotation.
Sensu grafana mutator add grafana_url annotation
Usage:
sensu-grafana-mutator [flags]
sensu-grafana-mutator [command]
Available Commands:
help Help about any command
version Print the version number of this plugin
Flags:
-p, --grafana-loki-explorer-pipeline string From Sensu Events, choose one label to be parse here. e. {app=eventrouter} |= k8s_id then use -p k8s_id
-r, --grafana-loki-explorer-range int Time range in seconds to create grafana explorer URL (default 300)
-l, --grafana-loki-explorer-stream-label string From Grafana Loki streams use label. e. {app=eventrouter} then '-l app' (default "app")
-s, --grafana-loki-explorer-stream-selector string From Grafana Loki streams use label. e. {app=eventrouter} then '-s eventrouter' (default "eventrouter")
-g, --grafana-url string An grafana complete URL. e. https://grafana.com/?orgId=1
-h, --help help for sensu-grafana-mutator
Use "sensu-grafana-mutator [command] --help" for more information about a command.
Using Grafana Explore tab and Grafana Loki as datasource:
{app="eventrouter"}|= "164c27e81b96bdc8"
where "164c27e81b96bdc8" cames from the value from sensu event.label["io.kubernetes.event.id"].Then sensu-grafana-mutator should be:
./sensu-grafana-mutator -g https://grafana.example.com/?orgId=1 -p io.kubernetes.event.id
Sensu Assets are the best way to make use of this plugin. If you're not using an asset, please
consider doing so! If you're using sensuctl 5.13 with Sensu Backend 5.13 or later, you can use the
following command to add the asset:
sensuctl asset add betorvs/sensu-grafana-mutator
If you're using an earlier version of sensuctl, you can find the asset on the [Bonsai Asset Index][https://bonsai.sensu.io/assets/betorvs/sensu-grafana-mutator].
---
type: Mutator
api_version: core/v2
metadata:
name: sensu-grafana-mutator
namespace: default
spec:
command: sensu-grafana-mutator -g https://grafana.example.com/?orgId=1 -p io.kubernetes.event.id
runtime_assets:
- betorvs/sensu-grafana-mutator
The preferred way of installing and deploying this plugin is to use it as an Asset. If you would
like to compile and install the plugin from source or contribute to it, download the latest version
or create an executable script from this source.
From the local path of the sensu-grafana-mutator repository:
go build
For more information about contributing to this plugin, see Contributing.
Please describe the reason for reporting this asset. Our moderators will be notified and will disable the asset if it is found to be inappropriate.
×