Description of problem: Version-Release number of selected component (if applicable): nagios-plugins-oracle-2.2.1-17.20190829gitfb792ff.el6.x86_64 How reproducible: Attempt to run check_oracle on an el6 system. Steps to Reproduce: 1. Install nagios-plugins-oracle 2. Run Check_oracle against your database: export ORACLE_HOME=/a02/app/oracle/product/12.1.0.2 ; /usr/lib64/nagios/plugins/check_oracle --db <dbname> 3. Actual results: pgrep: invalid option -- 'c' Usage: pgrep [-flvx] [-d DELIM] [-n|-o] [-P PPIDLIST] [-g PGRPLIST] [-s SIDLIST] [-u EUIDLIST] [-U UIDLIST] [-G GIDLIST] [-t TERMLIST] [PATTERN] /usr/lib64/nagios/plugins/check_oracle: line 170: [: : integer expression expected <dbname> Database is DOWN Expected results: <dbname> OK - 1 PMON process(es) running Additional info: Line 169 of the check_oracle script uses the -c flag with pgrep. pgrep shipped with el6 (procps-3.2.8-45.el6_9.3.x86_64) does not have the -c flag.
On el6 line 169 of the check_oracle script reads: pmonchk=$(pgrep -f -c "(asm|ora|xe)_pmon_${2}$") Change it to pmonchk=$(pgrep -f "(asm|ora|xe)_pmon_${2}$" | wc -l) and the script works.
Thanks. I will make a patch and put this out in the next couple of days for an update to 2.2.2 which rolled out while this was in testing.
Thanks Stephen. I have just updated to nagios-plugins-oracle-2.2.2-2.20190926git1b8ad57.el6.x86_64 and the bug is back. I assume my report was too close to the release date for the patch to get in?
Made pull request - https://github.com/nagios-plugins/nagios-plugins/pull/495
pull request accepted
*** Bug 1769834 has been marked as a duplicate of this bug. ***
FEDORA-EPEL-2019-f6182b7356 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-f6182b7356 This build should have the fix for this. It is also a major change so I have made the change need 5 karma to get out of testing.
FEDORA-EPEL-2019-a181371b74 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-a181371b74
nagios-plugins-2.3.1-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-a181371b74
Tested EL6 version. Working good!
nagios-plugins-2.3.1-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
This issue was closed but the issue was created for a bug in EL6. The EL6 version has not been pushed to stable.
What is the fix status for EL6?
FEDORA-EPEL-2020-f97bb3ff1c has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-f97bb3ff1c
nagios-plugins-2.3.1-3.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-f97bb3ff1c
nagios-plugins-2.3.1-3.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.