Nagios XI Mod_gearman don't interpret $USER1$ and or $ARG1$
Posted: Thu Nov 18, 2021 12:07 pm
On the Nagios XI side I define a new commande like this.
and test also
I activate the tracing on mod_gearman worker side and I saw this for the new service check definition.
I compare it with a service check that running for long time and the working one interpret $USER1$ and $ARG1$ with the right information.
I also validated the /usr/local/nagios/etc/resource.cfg
Any idea ? Thx in advance!!
Code: Select all
/usr/bin/env ORACLE_HOME=/oracle/product/instantclient_21_4 PATH=$PATH:/oracle/instantclient_21_4 TNS_ADMIN=/oracle/product/instantclient_21_4 LD_LIBRARY_PATH=/oracle/product/instantclient_21_4:/usr/local/lib:/lib:/usr/lib $USER1$/check_oracle_health $ARG1$
Code: Select all
/usr/bin/env ORACLE_HOME=/oracle/product/instantclient_21_4 PATH=$PATH:/oracle/instantclient_21_4 TNS_ADMIN=/oracle/product/instantclient_21_4 LD_LIBRARY_PATH=/oracle/product/instantclient_21_4:/usr/local/lib:/lib:/usr/lib /usr/local/nagios/libexec/check_oracle_health $ARG1$
Code: Select all
command_line=/usr/bin/env ORACLE_HOME=/oracle/product/instantclient_21_4 PATH=$PATH:/oracle/instantclient_21_4 TNS_ADMIN=/oracle/product/instantclient_21_4 LD_LIBRARY_PATH=/oracle/product/instantclient_21_4:/usr/local/lib:/lib:/usr/lib /usr/local/nagios/libexec/check_oracle_health $ARG1$
<---
[2021-11-18 11:46:46][15878][TRACE] do_exec_job()
[2021-11-18 11:46:46][15878][DEBUG] got service job: sldgbd0326 - Oracle Connected Users - xcenterd
[2021-11-18 11:46:46][15878][TRACE] timeout: 60, core latency: 0
[2021-11-18 11:46:46][15878][TRACE] command: /usr/bin/env ORACLE_HOME=/oracle/product/instantclient_21_4 PATH=$PATH:/oracle/instantclient_21_4 TNS_ADMIN=/oracle/product/instantclient_21_4 LD_LIBRARY_PATH=/oracle/product/instantclient_21_4:/usr/local/lib:/lib:/usr/lib /usr/local/nagios/libexec/check_oracle_healt
h $ARG1$
[2021-11-18 11:46:46][15878][TRACE] execute_safe_command(60, /usr/bin/env ORACLE_HOME=/oracle/product/instantclient_21_4 PATH=$PATH:/oracle/instantclient_21_4 TNS_ADMIN=/oracle/product/instantclient_21_4 LD_LIBRARY_PATH=/oracle/product/instantclient_21_4:/usr/local/lib:/lib:/usr/lib /usr/local/nagios/libexec/ch
eck_oracle_health $ARG1$)
I also validated the /usr/local/nagios/etc/resource.cfg
Code: Select all
# Path to the plugins
$USER1$=/usr/local/nagios/libexec
# Path to event handlers
#$USER2$=/usr/local/nagios/libexec/eventhandlers
# Port for NSClient++
$USER7$=12489
# Password for NSClient++
$USER8$=secret