Hey folks,
I’ve been trying to use the https://github.com/sensu-plugins/sensu-plugins-kubernetes plugin as an asset.
I repackaged the source code to make the directory structure fit with the specification at https://docs.sensu.io/sensu-go/5.2/reference/assets/#sharing-an-asset-on-bonsai (ensuring that /bin, /lib, etc are at the root of the tar.gz)
I’ve created my asset YAML which seems to be correctly accepted by sensuctl create, and an associated check. However, when the check is executed, I get the error below:
/var/lib/sensu/5e8ec99e5a13e07891c6426e8be9293036f5fe1075dbc3634ddf670d5e4032295373c11f8b25e8c3af8787c8db9094aba45197645e66571fc9dfd921f3930dcf/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- sensu-plugins-kubernetes/cli (LoadError)
from /var/lib/sensu/5e8ec99e5a13e07891c6426e8be9293036f5fe1075dbc3634ddf670d5e4032295373c11f8b25e8c3af8787c8db9094aba45197645e66571fc9dfd921f3930dcf/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /var/lib/sensu/b50efa3b8c20166aa220b48e4ff11e9d474b2812d5c7e42a58c3cca6ae9cbaf63bd778702e213f15227858ffc40ecaadeb957536e7f430c0c4b3d12db835734c/bin/check-kube-nodes-ready.rb:40:in `<main>'
I’m a beginner, so hopefully someone can tell me what I’m doing wrong!
My asset YAML (I’m hosting it locally for now) looks like this:
---
type: Asset
api_version: core/v2
metadata:
name: sensu-plugins-kubernetes
labels:
spec:
url: https://sensu-assets.elpenguino.net/sensu-plugins-kubernetes-4.0.0.tar.gz
sha512: b50efa3b8c20166aa220b48e4ff11e9d474b2812d5c7e42a58c3cca6ae9cbaf63bd778702e213f15227858ffc40ecaadeb957536e7f430c0c4b3d12db835734c
And my check YAML looks like this:
type: CheckConfig
api_version: core/v2
metadata:
name: check-kube-nodes-ready
namespace: default
spec:
check_hooks: null
command: check-kube-nodes-ready.rb --kube-config=/root/admin.conf
env_vars: null
handlers: []
high_flap_threshold: 0
interval: 60
low_flap_threshold: 0
output_metric_format: ""
output_metric_handlers: null
proxy_entity_name: ""
publish: true
round_robin: false
runtime_assets:
- sensu-ruby-runtime
- sensu-plugins-kubernetes
stdin: false
subdue: null
subscriptions:
- proxy
timeout: 0
ttl: 0
Any suggestions would be appreciated! 
Cheers!
David
