+++ This bug was initially created as a clone of Bug #1752219 +++ Description of problem: There is extraneous output produced, making the check's output unable to be read on one line. Version-Release number of selected component (if applicable): nagios-plugins-disk-2.2.1-17.20190829gitfb792ff.el7.x86_64 How reproducible: Always Steps to Reproduce: 1. Upgrade from nagios-plugins-disk-2.2.1-16.20180725git3429dad.el7.x86_64 to nagios-plugins-disk-2.2.1-17.20190829gitfb792ff.el7.x86_64 2. Run check_disk with any appropriate options (e.g. check_disk -w 20 -c 10) 3. Actual results: dfree_units 0 0 disk_result is 0dfree_units 0 0 disk_result is 0dfree_units 0 2 disk_result is 2dfree_units 0 0 disk_result is 0dfree_units 0 0 disk_result is 0DISK CRITICAL - free space: <SNIP> Expected results: DISK CRITICAL - free space: <SNIP> Additional info: I have reported an Issue and submitted a Pull Request upstream: https://github.com/nagios-plugins/nagios-plugins/issues/472 I used a higher severity since I have encountered monitoring solutions that used a regex against the output rather than relying on the exit code. This would break that methodology of checking the check's result, with this extra output "^DISK OK" would now be a failure. --- Additional comment from Stephen John Smoogen on 2019-09-16 15:12:17 UTC --- --- Additional comment from Alexander Kohr on 2019-09-16 15:50:15 UTC --- Will be adding this to https://github.com/nagios-plugins/nagios-plugins/issues/472 as well. However I would also like to point out that this extraneous dfree_units lines and the 0 just before the status type also occur for an OK check, however if you do a more verbose check the extraneous 0 in the line starting with DISK looses the 0 before the status. /usr/lib64/nagios/plugins/check_disk -w 10% -c 5% -p /boot I am returned dfree_units 0 0 disk_result is 0DISK OK - free space: /boot 315 MiB (63.43% inode=100%);| /boot=181MiB;446;471;0;496 I would expect to see DISK OK - free space: /boot 315 MiB (63.43% inode=100%);| /boot=181MiB;446;471;0;496 When using the -vvv (note that between DISK and OK the extraneous 0 has disappeared and the last line is like what I would expect on a normal run. /usr/lib64/nagios/plugins/check_disk -vvv -w 10% -c 5% -p /boot calling stat on /boot Thresholds(pct) for /boot warn: 10.000000 crit 5.000000 calling stat on /boot For /boot, used_pct=36.57 free_pct=63.43 used_units=181 free_units=315 total_units=496 used_inodes_pct=0.07 free_inodes_pct=99.93 fsp.fsu_blocksize=4096 mult=1048576 Freespace_units result=0 Freespace% result=0 dfree_units 0 0 disk_result is 0Usedspace_units result=0 Usedspace_percent result=0 Usedinodes_percent result=0 Freeinodes_percent result=0 DISK OK - free space: /boot 315 MiB (63.43% inode=100%);| /boot=181MiB;446;471;0;496 --- Additional comment from Lee Clemens on 2019-09-16 17:06:40 UTC --- (In reply to Alexander Kohr from comment #2) > [SNIP] > When using the -vvv (note that between DISK and OK the extraneous 0 has > disappeared and the last line is like what I would expect on a normal run. > [SNIP] > dfree_units 0 0 > disk_result is 0Usedspace_units result=0 > Usedinodes_percent result=0 > Freeinodes_percent result=0 > DISK OK - free space: /boot 315 MiB (63.43% inode=100%);| > /boot=181MiB;446;471;0;496 The second extraneous printf does not include a trailing newline, which is why you see it on the same line as "Usedspace_units" in the -vvv output. The verbose Freeinodes statement has a newline and is printed afterwards (correctly) giving you a newline before "DISK OK". --- Additional comment from Alexander Kohr on 2019-09-16 18:06:28 UTC --- Thank you. I had posted this prior to trying to review the code in github. In my github post (To the link above.) I suggested that the line I think is responsible for that needed a line break after it, if the line is going to be maintained as a verbose output. -Alex --- Additional comment from Lee Clemens on 2019-09-17 01:41:34 UTC --- For reference, the Pull Request has been merged: https://github.com/nagios-plugins/nagios-plugins/pull/473 --- Additional comment from Wesley on 2019-09-20 16:45:15 UTC --- This is also a issue on EL6 not only on EL7 > [root@webXXXXXX ~]# /usr/lib64/nagios/plugins/check_disk -w 10% -c 5% -W 10% -K 5% -p / > dfree_units 0 0 > disk_result is 0DISK OK - free space: / 4737 MiB (64.48% inode=79%);| /=2608MiB;6971;7358;0;7746 > > nagios-plugins-disk-2.2.1-17.20190829gitfb792ff.el6.x86_64 --- Additional comment from Rick Dicaire on 2019-09-21 14:46:31 UTC --- Nor is there a yum downgrade option. I see https://github.com/nagios-plugins/nagios-plugins/pull/473 was merged 5 days ago, but I don't see an updated pkg in yum check-update for centos 7. --- Additional comment from Stephen John Smoogen on 2019-09-21 16:37:02 UTC --- I do this in what spare time I have which is not a lot. You get 4 hours a weekend if I am lucky. If that is not enough, then there are several probably better resourced alternatives that you can use or pay for. --- Additional comment from Stephen John Smoogen on 2019-09-21 17:15:52 UTC --- And that comment was crap on my part. I am updating the spec file and trying to get builds out as we speak. --- Additional comment from Todd Zullinger on 2019-09-21 17:49:03 UTC --- (In reply to Stephen John Smoogen from comment #9) > And that comment was crap on my part. I am updating the spec file and trying > to get builds out as we speak. Hi Smooge, I don't know if this will save you any time now that you've started to work on it, but I worked on updating all the git branches and ran scratch builds last night. Scratch builds: rawhide: http://koji.fedoraproject.org/koji/taskinfo?taskID=37767647 f31: http://koji.fedoraproject.org/koji/taskinfo?taskID=37767607 f30: http://koji.fedoraproject.org/koji/taskinfo?taskID=37767614 f29: http://koji.fedoraproject.org/koji/taskinfo?taskID=37767621 epel8: http://koji.fedoraproject.org/koji/taskinfo?taskID=37771425 epel7: http://koji.fedoraproject.org/koji/taskinfo?taskID=37771431 el6: http://koji.fedoraproject.org/koji/taskinfo?taskID=37771435 Git repo: https://src.fedoraproject.org/fork/tmz/rpms/nagios-plugins If that looks decent and you think it'll save you any time or effort, I can file PR's for each branch. Thanks for all the effort you put in on this and everything else in Fedora/EPEL. Sorry I couldn't get these builds/PR's up sooner. :)
FEDORA-2019-0179ba8205 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-0179ba8205
Thanks Todd. That explains why the source code I was downloading was not able to upload. I have started working on making builds
FEDORA-2019-2fd0e71822 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-2fd0e71822
FEDORA-2019-8259c96a3d has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-8259c96a3d
nagios-plugins-2.2.2-1.20190919git00cff01.fc30 has been pushed to the Fedora 30 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-2019-2fd0e71822
nagios-plugins-2.2.2-1.20190919git00cff01.fc31 has been pushed to the Fedora 31 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-2019-0179ba8205
nagios-plugins-2.2.2-1.20190919git00cff01.fc29 has been pushed to the Fedora 29 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-2019-8259c96a3d
FEDORA-2019-363ede8e0e has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-363ede8e0e
nagios-plugins-2.2.2-2.20190926git1b8ad57.fc31 has been pushed to the Fedora 31 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-2019-363ede8e0e
nagios-plugins-2.2.2-1.20190919git00cff01.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
nagios-plugins-2.2.2-1.20190919git00cff01.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.
nagios-plugins-2.2.2-2.20190926git1b8ad57.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.
It seems the epel packages where not updated as part of this effort - what can I do to include the epel package maintainer in the conversation? I haven't found a separate bug for that, and am not sure it is useful to open a new one?
Did you check epel-testing? Packages in epel-testing stay there for a long time until someone gives them karma that they work. [I am currently the maintainer all across the board.]
The check_disk in RHEL 7 epel testing is working as expected, and I don't appear to be having trouble with the other 10 plugins I am using in rhel 7. I do not have epel-testing set up in any RHEL 6 boxes. -Alex
Can confirm, the package in epel-testing works as expected and doesn't provide the extraneous output. (I'm currently looking into how to provide karma for that package)
Not sure if that is the right place to give karma - I did it here https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-d5a42a332c after testing the update. Please suggest correction if wrong.
That is the correct place.
What is the solution for nagios console to only show "dfree_units 0 0" in service status, instead of the disk info. I've tried -vvv /usr/lib64/nagios/plugins/check_disk -vvv -w 10% -c 5% -p /boot But nagios is still showing "dfree_units 0 0" in service status
@yongs123456 please ask at the nagios plugin github https://github.com/nagios-plugins/nagios-plugins . This isn't really something we can answer here. [I just compile the stuff.. ]