Page 1 of 1
"Test Check Command" User
Posted: Wed Nov 20, 2013 3:07 pm
by snapon_admin
When adding a new service, if I use the "test check command" button, what user does that run the command as? I'm using a plugin currently that creates a file in a tmp directory the first time the plugin is run. Currently, if I use this button to test the service before adding it, I have to then go to that tmp directory and delete the file it creates because if I don't, the command will return a "no write permission" error when user 'nagios' tries to run it. Is there a way to change the "test check command" button to use user 'nagios' instead of whatever user it's currently running the command as?
Re: "Test Check Command" User
Posted: Wed Nov 20, 2013 3:25 pm
by sreinhardt
test check command is run via apache, and specifically via a php wrapper script, which might add to some escaping issues that are not normally needed for nagios checks. At this point, I do not know of a way to alter the user that runs it.
Re: "Test Check Command" User
Posted: Wed Nov 20, 2013 3:30 pm
by snapon_admin
Hmm, bummer. Well I guess we'll just be extra careful with our syntax when we add new service checks.
Re: "Test Check Command" User
Posted: Wed Nov 20, 2013 3:36 pm
by slansing
This is usually only an issue when you add checks that require characters such as slashes "mssql, windows perf counters, etc.." You can of course always test the command once you have applied configuration through Home > Services, though that is not as convenient.