# Sh: check-http.rb: command not found

**URL:** <https://discourse.sensu.io/t/sh-check-http-rb-command-not-found/2534>\
**Category:** Sensu Plugins\
**Created:** [April 9, 2021, 6:32pm UTC](https://discourse.sensu.io/t/sh-check-http-rb-command-not-found/2534 "2021-04-09T18:32:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbs](https://avatars.discourse-cdn.com/v4/letter/j/5fc32e/32.png) [@jbs](https://discourse.sensu.io/u/jbs)\
**Post date:** [April 9, 2021, 6:32pm UTC](https://discourse.sensu.io/t/sh-check-http-rb-command-not-found/2534/1 "2021-04-09T18:32:10Z")

</div>

**1. What have you already tried? Please include links to gists and/or code blocks (if relatively small)**

Hi, I am attempting to monitor external websites and began by following the instructions: [Monitor external resources with proxy requests and entities - Sensu Docs](https://docs.sensu.io/sensu-go/5.21/guides/monitor-external-resources/#use-a-proxy-entity-to-monitor-a-website)

I registered the assets:

```auto
$ sensuctl asset list
         Name URL Hash
 ──────────────────── ────────────────────────────────────────────────────────────────────────────────────────────── ─────────
  sensu-plugins-http //assets.bonsai.sensu.io/.../sensu-plugins-http_5.1.1_alpine_linux_amd64.tar.gz 1277b1d
  sensu-plugins-http //assets.bonsai.sensu.io/.../sensu-plugins-http_5.1.1_centos_linux_amd64.tar.gz 642643d
  sensu-plugins-http //assets.bonsai.sensu.io/.../sensu-plugins-http_5.1.1_debian_linux_amd64.tar.gz 33a9f42
  sensu-ruby-runtime //assets.bonsai.sensu.io/.../sensu-ruby-runtime_0.0.10_ruby-2.4.4_alpine_linux_amd64.tar.gz 8d768d1
  sensu-ruby-runtime //assets.bonsai.sensu.io/.../sensu-ruby-runtime_0.0.10_ruby-2.4.4_centos6_linux_amd64.tar.gz cbee191
  sensu-ruby-runtime //assets.bonsai.sensu.io/.../sensu-ruby-runtime_0.0.10_ruby-2.4.4_debian_linux_amd64.tar.gz a28952f
  sensu-ruby-runtime //assets.bonsai.sensu.io/.../sensu-ruby-runtime_0.0.10_ruby-2.4.4_centos_linux_amd64.tar.gz 338b88b

```

I created the check:

```auto
$ sensuctl check list
        Name Command Interval Cron Timeout TTL Subscriptions Handlers Assets Hooks Publish? Stdin? Metric Format Metric Handlers
 ────────────────── ─────────────────────────────────── ────────── ────── ───────── ───── ─────────────── ────────── ─────────────────────────────────────── ─────── ────────── ──────── ─────────────── ─────────────────
  check-sensu-site check-http.rb -u https://sensu.io 60 0 0 proxy sensu-plugins-http,sensu-ruby-runtime true false

```

I added the proxy subscription to the agent.yml file and restarted the agent.

I validated the check:

```auto
$ sensuctl entity list
               ID Class OS Subscriptions Last Seen
 ─────────────────────────────── ─────── ─────── ──────────────────────────────────────────── ───────────────────────────────
  ip-#-#-#-#.ec2.internal agent linux proxy,entity:ip-#-#-#-#.ec2.internal 2021-04-09 17:52:08 +0000 UTC
  sensu-site proxy entity:sensu-site N/A

```

I then inquire if Sensu is monitoring with the check, but get the error in the Output field:

```auto
sensuctl event info sensu-site check-sensu-site
=== sensu-site - check-sensu-site
Entity: sensu-site
Check: check-sensu-site
Output: sh: check-http.rb: command not found
Status: 127
History: 127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127
Silenced: false
Timestamp: 2021-04-09 17:32:41 +0000 UTC
UUID: 0ccd9eed-019b-4d57-a7b4-46f903935779

```

I also find the following in the system logs, but not sure what it means:

```auto
Apr 9 16:55:39 ip-#-#-#-# sensu-agent: {"asset":"sensu-ruby-runtime","component":"asset-manager","entity":"ip-#-#-#-#.ec2.internal","filter":["entity.system.os == 'linux'","entity.system.arch == 'amd64'","entity.system.platform_family == 'rhel'","parseInt(entity.system.platform_version.split('.')[0]) == 6"],"level":"debug","msg":"entity not filtered, not installing asset build","time":"2021-04-09T16:55:39Z"}

```

I searched through the forum and found related issues, but nothing that helped.

What am I missing?

**2. Tell us about your setup, this should include OS, version of Sensu, version of Sensu components (redis, rabbitmq), plugin versions (if applicable), anything special about your setup such as an airgapped network or strict ACLs**

sensu backed (Docker) in K8s: 5.21.5  
sensuctl (CentOS 7.9): 5.21.5  
sensu agent (CentOS 7.9): 5.21.5

**3. Is there a Github issue related to your issue?**

No

**4. Is there anything else that can help us effectively help you?**

No

---

<div class="post-metadata">

**Author:** ![jspaleta](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/jspaleta/32/141_2.png) [@jspaleta](https://discourse.sensu.io/u/jspaleta)\
**Post date:** [April 13, 2021, 6:36pm UTC](https://discourse.sensu.io/t/sh-check-http-rb-command-not-found/2534/2 "2021-04-13T18:36:40Z")

</div>

Hey,  
update your sensu-plugins-http asset definition with the newer version. The 5.1.1 release didn’t have explicit support for centos just rhel in the filtering rules.

````auto
sensuctl asset add sensu-plugins/sensu-plugins-http:6.0.0 -r sensu-plugins-http --namespace default```
````

---

<div class="post-metadata">

**Author:** ![jbs](https://avatars.discourse-cdn.com/v4/letter/j/5fc32e/32.png) [@jbs](https://discourse.sensu.io/u/jbs)\
**Post date:** [April 16, 2021, 4:49pm UTC](https://discourse.sensu.io/t/sh-check-http-rb-command-not-found/2534/3 "2021-04-16T16:49:50Z")

</div>

Thank you @jspaleta. This fixed the issue on our centos and rhel agents.
