Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checks intermittently show access denied #19

Open
AirCombat opened this issue Apr 28, 2016 · 4 comments
Open

Checks intermittently show access denied #19

AirCombat opened this issue Apr 28, 2016 · 4 comments

Comments

@AirCombat
Copy link

Checks intermittently show access denied

@bwilder
Copy link

bwilder commented Nov 15, 2016

I'm experiencing this too

@Evesy
Copy link

Evesy commented Jul 15, 2017

@bwilder @AirCombat

Out of interest, what does the check definition command look like on your Sensu server?

If it's something like: "command": "/opt/sensu/embedded/bin/check-windows-disk.rb", could you try changing it to specify the full ruby path too and see if the probem persists?

i.e. "command": "/opt/sensu/embedded/bin/ruby /opt/sensu/embedded/bin/check-windows-disk.rb"

@putthatdown
Copy link

@Evesy

This was a ways back, but I did discover that the easiest resolution is to specify the path to the program to run the script inside:

BAD:

 "check-windows-disk": {
    "command": "/opt/sensu/embedded/bin/check-windows-disk.rb -w 75 -c 85",
    ...
  }

GOOD:

  "check-windows-disk": {
    "command": "/opt/sensu/embedded/bin/ruby /opt/sensu/embedded/bin/check-windows-disk.rb -w 75 -c 85",
    ...
  }

On some Windows nodes, I was able to resolve the issue by making sure the .rb extension was properly associated with a ruby executable, but the easiest/most reliable resolution was to include the path to the executable with the full path to the script to be run.

@majormoses
Copy link
Member

Hm that surprises me especially since windows is unlikely to have any other ruby other than the embedded ruby mucking with its path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants