{"action":"created","issue":{"url":"https://api.github.com/repos/sensu/sensu/issues/868","labels_url":"https://api.github.com/repos/sensu/sensu/issues/868/labels{/name}","comments_url":"https://api.github.com/repos/sensu/sensu/issues/868/comments","events_url":"https://api.github.com/repos/sensu/sensu/issues/868/events","html_url":"https://github.com/sensu/sensu/issues/868","id":58506476,"number":868,"title":"sensu using local ruby for handlers when EMBEDDED_RUBY=true","user":{"login":"mateodelnorte","id":554847,"avatar_url":"https://avatars.githubusercontent.com/u/554847?v=3","gravatar_id":"","url":"https://api.github.com/users/mateodelnorte","html_url":"https://github.com/mateodelnorte","followers_url":"https://api.github.com/users/mateodelnorte/followers","following_url":"https://api.github.com/users/mateodelnorte/following{/other_user}","gists_url":"https://api.github.com/users/mateodelnorte/gists{/gist_id}","starred_url":"https://api.github.com/users/mateodelnorte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateodelnorte/subscriptions","organizations_url":"https://api.github.com/users/mateodelnorte/orgs","repos_url":"https://api.github.com/users/mateodelnorte/repos","events_url":"https://api.github.com/users/mateodelnorte/events{/privacy}","received_events_url":"https://api.github.com/users/mateodelnorte/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-22T15:37:39Z","updated_at":"2015-05-22T21:47:51Z","closed_at":null,"body":"I've got datacenter with 19 clients that was working perfectly for some time. I've specified `EMBEDDED_RUBY=true` and had all plugins and handlers that I've used work great. At some point the sensu-service restarted and still uses embedded ruby for plugins, but not for handlers - causing all handlers to fail: \r\n```\r\n{\"timestamp\":\"2015-02-21T03:15:47.819211-0500\",\"level\":\"info\",\"message\":\"publishing check request\",\"payload\":{\"name\":\"proc-status-metrics-market-config-svc\",\"issued\":1424506547,\"command\":\"/etc/sensu/plugins/proc-status-metrics.rb -p market-config-svc -u electronifie \"},\"subscribers\":[\"app\"]}\r\n{\"timestamp\":\"2015-02-21T03:15:48.024302-0500\",\"level\":\"info\",\"message\":\"handling event\",\"event\":{\"id\":\"7798492c-6515-4c11-816e-d90fc7052bb2\",\"client\":{\"name\":\"nj1sapp02\",\"address\":\"10.2.4.12\",\"subscriptions\":[\"all\",\"app\"],\"version\":\"0.16.0\",\"timestamp\":1424506537},\"check\":{\"handlers\":[\"slack\"],\"command\":\"/etc/sensu/plugins/check-procs.rb -p market-svc-worker -C 16 \",\"interval\":15,\"subscribers\":[\"app\"],\"name\":\"check-procs-market-svc-worker\",\"issued\":1424506547,\"executed\":1424506547,\"duration\":0.197,\"output\":\"CheckProcs CRITICAL: Found 0 matching processes; cmd /market-svc-worker/\\n\",\"status\":2,\"history\":[\"2\",\"2\",\"2\",\"2\",\"2\",\"2\",\"2\",\"2\",\"2\",\"2\",\"2\",\"2\",\"2\",\"2\",\"2\",\"2\",\"2\",\"2\",\"2\",\"2\",\"2\"]},\"occurrences\":14993,\"action\":\"create\"},\"handler\":{\"type\":\"pipe\",\"command\":\"/etc/sensu/handlers/slack.rb\",\"name\":\"slack\"}}\r\n{\"timestamp\":\"2015-02-21T03:15:48.031381-0500\",\"level\":\"info\",\"message\":\"handler output\",\"handler\":{\"type\":\"pipe\",\"command\":\"/etc/sensu/handlers/slack.rb\",\"name\":\"slack\"},\"output\":\"/usr/bin/env: ruby: No such file or directory\\n\"}\r\n{\"timestamp\":\"2015-02-21T03:15:48.037309-0500\",\"level\":\"info\",\"message\":\"handler output\",\"handler\":{\"type\":\"pipe\",\"command\":\"/etc/sensu/handlers/influxdb-metrics.rb\",\"name\":\"influxdb\"},\"output\":\"/usr/bin/env: ruby: No such file or directory\\n\"}\r\n```\r\nHere is /etc/default/sensu on the above machine:\r\n```\r\ncat /etc/default/sensu\r\nEMBEDDED_RUBY=true\r\n```\r\nEmbedded ruby seems to be used correctly on all machines except the datacenter machine, where sensu-server is running. \r\n\r\nsymlink'ing /usr/bin/ruby to embedded ruby fixes the problem, but is obviously not something I want to do in the long run. \r\n\r\nAny ideas what could be happening?\r\n\r\nThx"},"comment":{"url":"https://api.github.com/repos/sensu/sensu/issues/comments/104783796","html_url":"https://github.com/sensu/sensu/issues/868#issuecomment-104783796","issue_url":"https://api.github.com/repos/sensu/sensu/issues/868","id":104783796,"user":{"login":"juniorplenty","id":941119,"avatar_url":"https://avatars.githubusercontent.com/u/941119?v=3","gravatar_id":"","url":"https://api.github.com/users/juniorplenty","html_url":"https://github.com/juniorplenty","followers_url":"https://api.github.com/users/juniorplenty/followers","following_url":"https://api.github.com/users/juniorplenty/following{/other_user}","gists_url":"https://api.github.com/users/juniorplenty/gists{/gist_id}","starred_url":"https://api.github.com/users/juniorplenty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juniorplenty/subscriptions","organizations_url":"https://api.github.com/users/juniorplenty/orgs","repos_url":"https://api.github.com/users/juniorplenty/repos","events_url":"https://api.github.com/users/juniorplenty/events{/privacy}","received_events_url":"https://api.github.com/users/juniorplenty/received_events","type":"User","site_admin":false},"created_at":"2015-05-22T21:47:51Z","updated_at":"2015-05-22T21:47:51Z","body":"This was fixed when I removed the `x` to re-enable this check:\r\n\r\nhttps://github.com/sensu/sensu-build/blob/master/sensu_configs/init.d/sensu-service#L166\r\n\r\n"}}