"Test Check Command" User
- snapon_admin
- Posts: 952
- Joined: Mon Jun 10, 2013 10:39 am
- Location: Kenosha, WI
- Contact:
"Test Check Command" User
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?
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: "Test Check Command" User
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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
- snapon_admin
- Posts: 952
- Joined: Mon Jun 10, 2013 10:39 am
- Location: Kenosha, WI
- Contact:
Re: "Test Check Command" User
Hmm, bummer. Well I guess we'll just be extra careful with our syntax when we add new service checks.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: "Test Check Command" User
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.