Linux Command Output as a Nagios Maco
Posted: Fri Nov 02, 2018 11:08 am
Hello everyone,
I am trying to assist my colleague who is an Oracle DBA with monitoring the mounts which the database relies on. We have multiple database servers with different SIDs but the general location follows this syntax. (/oracle/SID/oraarch) We have wrote a check command which utilizes check_nrpe with the check_disk command as $ARG1$ and the location (/oracle/SID/oraarch) as $ARG2$. We are stuck on trying to parameterize this check so we don't have to create X copies of the different check for different Database SIDs.
Is it possible to take the output of a linux command such as:
cat /etc/oratab | grep -v '^#' | awk -F: '{print $1}'
and pass the result through Nagios as $ARG3$ to substitute the SID_Variable in the location (/oracle/SID_Variable/oraarch) for the SID that is found by querying the /etc/oratab file? Thanks again for you help.
I am trying to assist my colleague who is an Oracle DBA with monitoring the mounts which the database relies on. We have multiple database servers with different SIDs but the general location follows this syntax. (/oracle/SID/oraarch) We have wrote a check command which utilizes check_nrpe with the check_disk command as $ARG1$ and the location (/oracle/SID/oraarch) as $ARG2$. We are stuck on trying to parameterize this check so we don't have to create X copies of the different check for different Database SIDs.
Is it possible to take the output of a linux command such as:
cat /etc/oratab | grep -v '^#' | awk -F: '{print $1}'
and pass the result through Nagios as $ARG3$ to substitute the SID_Variable in the location (/oracle/SID_Variable/oraarch) for the SID that is found by querying the /etc/oratab file? Thanks again for you help.