First being using subdirectories after $USER1$
The second being creating new nagios user macros.
We are trying to migrate a group of oracle checks for application specific issues, and trying to keep them consolidated in one folder rather than in the libexec.
Attempt 1
Command was defined as:
Code: Select all
$user1$/oracle11/check_oracle_by_jdbc -H $HOSTADDRESS$ -x `XXXXXXXX` -f '$USER1$/sql/$ARG2$.sql' -w $ARG3$ -c $ARG4$ -r $ARG5$ -L $ARG6$Check output is as follows:
Code: Select all
[STDERR][EC 127]/bin/sh: /usr/local/nagios/libexec/check_oracle_by_jdbc: No such file or directoryAttempt 2
Assuming that we were simply not able to use subdirectories of a check, we tried creating a new USER macro for the oracle11 directory.
We have added the following to resources.cfg on the parent and all children.
Code: Select all
$USER10$=/usr/local/nagios/libexec/oracle11the check command has been defined as
Code: Select all
$user10$/check_oracle_by_jdbc -H $HOSTADDRESS$ -x `XXXXXXXX` -f '$USER1$/sql/$ARG2$.sql' -w $ARG3$ -c $ARG4$ -r $ARG5$ -L $ARG6$The service has been defined with the appropriate arguments, and applied.
If we run it manually on any host (parent or children) all is well.
When the check runs, we just get:
Code: Select all
[STDERR][EC 127]/bin/sh: /usr/local/nagios/libexec/check_oracle_by_jdbc: No such file or directoryIt appears that nagios does not catch the user10 macro we created, and defaults to user1.
I've dug through documentation, but could not find anything specific to creating USERn macros, just utilizing them.
Can someone kick me in the right direction, or explain what I'm doing wrong in these two scenarios?