I've got Nagios and Oracle sqlplus client installed on my server. Sqlplus needs few environment variables for its run, so I added exports to /etc/profile
.
Login as root sets variables right, login as user nagios sets is also OK but when I run some checks from nagios web interface (these checks are written in bash), they end with an error Error: Empty result from sqlplus. Check plugin settings and Oracle status.
When I run these checks from terminal as root or as nagios user, everything is OK, that's how I found out that problem is in env variables.
I will be glad for any suggestions.