Sensu plugins http_check.rb is not working

#1

I’ve install sensu go and seems working fine.

I am trying to monitor my external resources and I am following this guide, https://docs.sensu.io/sensu-go/5.7/guides/monitor-external-resources/#using-a-proxy-entity-to-monitor-a-website

I’ve added ruby run time asset and sensu http plugin asset. I can see my asset using command sensuctl asset list.

But I am getting error in http check event like, /usr/bin/env: ‘ruby’: No such file or directory

But ruby is already installed in my system, Below ruby command is working fine for me

/docker/sensu# ruby --version
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]

:/var/log/sensu# /usr/bin/env ruby --version
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]

Sensu go version is 5.7 using on Ubuntu 18.04.1 LTS

let me know what I am doing wrong here.

#2

Hello,
which platform are you using for the runtime?

Alpine, Debian or Centos?

#3

Checking really quick… most likely what is happening is the filter definition in the asset config provided by Bonsai is too tight and the asset is not matching the filtering rules.

It’s definitely a good idea to visually inspect the asset configuration you download from Bonsai and make sure the filtering rules are correct for your intended use. The default filtering rules are a best effort. In this case they are probably overly tight. I’ve filed an issue in github to address it. Hopefully the next release of the asset will include default filters that work for Ubuntu without having to be adjusted.

Here’s the new issue for reference:

#4

Yes I’ve change filter to entity.system.platform_family == ‘debian’ and it is working fine now.

Thanks for your help