[Bug 536475] New: nagios-plugins-zypper: check_zypper triggers "warning" when there are no updates available.
http://bugzilla.novell.com/show_bug.cgi?id=536475 Summary: nagios-plugins-zypper: check_zypper triggers "warning" when there are no updates available. Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: x86-64 OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Update Problems AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: admin@eregion.de QAContact: jsrain@novell.com Found By: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.2) Gecko/20090730 SUSE/3.5.2-2.1 Firefox/3.5.2 I'm monitoring a openSUSE 11.1 with nagios, and when i try to use the zypper plugin i get WARNING every time a check returns with "OK: no updates available". That can't be the intended result ;) Reproducible: Always Steps to Reproduce: 1. install nagios + the zypper plugin 2. run the check_zypper script 3. enable the nagios check Actual Results: nagios reports a WARNING every time the check returns OK: No updates available Expected Results: nagios should report nothing in that case. output of the check_zypper plugin with DEBUG=1: rtm04:/usr/lib/nagios/plugins # ./check_zypper -v INFO: openSUSE,11.1,0 INFO: Trying unset LANG; /usr/bin/zypper sl 2>/dev/null 1>&2 INFO: Trying unset LANG; /usr/bin/zypper --xmlout list-updates -t package -t patch LINE: <?xml version='1.0'?> LINE: <stream> LINE: <message type="info">Loading repository data...</message> LINE: <message type="info">Reading installed packages...</message> LINE: <update-status version="0.6"> LINE: <update-list> LINE: </update-list> LINE: </update-status> LINE: </stream> INFO: Packages (paccount): 0 INFO: Optional (optcount): 0 INFO: Recommended (reccount): 0 INFO: Security (seccount): 0 $VAR1 = {}; Updates OK: no updates available | security=0;;;; recommended=0;;;; optional=0;;;; packages=0;;;; INFO: Exit-Code: 0 -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=536475
Mathias Homann
http://bugzilla.novell.com/show_bug.cgi?id=536475
zhu rensheng
http://bugzilla.novell.com/show_bug.cgi?id=536475
Christian Schneemann
http://bugzilla.novell.com/show_bug.cgi?id=536475
User lrupp@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=536475#c1
Lars Vogdt
http://bugzilla.novell.com/show_bug.cgi?id=536475
User admin@eregion.de added comment
http://bugzilla.novell.com/show_bug.cgi?id=536475#c2
--- Comment #2 from Mathias Homann
http://bugzilla.novell.com/show_bug.cgi?id=536475
User admin@eregion.de added comment
http://bugzilla.novell.com/show_bug.cgi?id=536475#c3
Mathias Homann
http://bugzilla.novell.com/show_bug.cgi?id=536475
User admin@eregion.de added comment
http://bugzilla.novell.com/show_bug.cgi?id=536475#c4
--- Comment #4 from Mathias Homann
http://bugzilla.novell.com/show_bug.cgi?id=536475
User lrupp@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=536475#c5
Lars Vogdt
http://bugzilla.novell.com/show_bug.cgi?id=536475
User admin@eregion.de added comment
http://bugzilla.novell.com/show_bug.cgi?id=536475#c6
Mathias Homann
http://bugzilla.novell.com/show_bug.cgi?id=536475
User lrupp@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=536475#c7
Lars Vogdt
http://bugzilla.novell.com/show_bug.cgi?id=536475
User admin@eregion.de added comment
http://bugzilla.novell.com/show_bug.cgi?id=536475#c8
Mathias Homann
http://bugzilla.novell.com/show_bug.cgi?id=536475
User lrupp@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=536475#c9
Lars Vogdt
http://bugzilla.novell.com/show_bug.cgi?id=536475
User admin@eregion.de added comment
http://bugzilla.novell.com/show_bug.cgi?id=536475#c10
Mathias Homann
http://bugzilla.novell.com/show_bug.cgi?id=536475
User lrupp@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=536475#c11
Lars Vogdt
I think i found the problem...
check_zypper needs to be run as root through sudo, othwerwise it can't refresh the repo metadata...
This is not needed if you just run /usr/bin/zypper sl or /usr/bin/zypper --xmlout list-updates -t package -t patch (and this is what the current command check_zypper does) On 11.1 this is even not needed if you use option "-r" as check_zypper uses /usr/sbin/zypp-refresh-wrapper which can be invoked by every user. So no, this is not the problem. Again, please answer my questions from comment #9. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=536475
User lrupp@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=536475#c12
--- Comment #12 from Lars Vogdt
http://bugzilla.novell.com/show_bug.cgi?id=536475
User admin@eregion.de added comment
http://bugzilla.novell.com/show_bug.cgi?id=536475#c13
--- Comment #13 from Mathias Homann
http://bugzilla.novell.com/show_bug.cgi?id=536475
User lrupp@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=536475#c14
--- Comment #14 from Lars Vogdt
I had activated the sudo wrapping in nrpe.cfg and that made it go away...
now i switched that back to normal and the timeout to 180.
lets see what happens.
sudo isn't needed since 11.0 - so I'll be very surprised if you need it on your 11.1 system. But thanks for increasing the timeout value, hopefully this already fixes the problem.
and btw if i do "zypper -r ref" as a normal user i get lots of messages saying "the repository ... is outdated, you can refresh it by running zypper as root."
Here's an example how the plugin output should look like in such a case (System is openSUSE 11.0 x86_64, check_zypper is Version 1.21): nagios@testing:~ /usr/lib/nagios/plugins/check_zypper Updates CRITICAL : At least one of your Repositories is out of date. Please run "zypper refresh" as root to update it. 8 package update(s); | security=0;;;; recommended=0;;;; optional=0;;;; packages=8;;;; But maybe the outdated repos are a good hint for the problem. As far as I see from comment #8, you've just the official Update repository and the Packman repository enabled on your system, right? 1) Can you please print the output of "zypper sl -u" on your system 2) What if you enable a "full repository" like openSUSE-11.1 OSS and run check_zypper again? -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=536475
User admin@eregion.de added comment
http://bugzilla.novell.com/show_bug.cgi?id=536475#c15
Mathias Homann
http://bugzilla.novell.com/show_bug.cgi?id=536475
User admin@eregion.de added comment
http://bugzilla.novell.com/show_bug.cgi?id=536475#c16
--- Comment #16 from Mathias Homann
http://bugzilla.novell.com/show_bug.cgi?id=536475
http://bugzilla.novell.com/show_bug.cgi?id=536475#c17
Lars Vogdt
http://bugzilla.novell.com/show_bug.cgi?id=536475
http://bugzilla.novell.com/show_bug.cgi?id=536475#c18
--- Comment #18 from Mathias Homann
http://bugzilla.novell.com/show_bug.cgi?id=536475
http://bugzilla.novell.com/show_bug.cgi?id=536475#c19
--- Comment #19 from Lars Vogdt
http://bugzilla.novell.com/show_bug.cgi?id=536475
http://bugzilla.novell.com/show_bug.cgi?id=536475#c20
Mathias Homann
http://bugzilla.novell.com/show_bug.cgi?id=536475
http://bugzilla.novell.com/show_bug.cgi?id=536475#c21
Lars Vogdt
http://bugzilla.novell.com/show_bug.cgi?id=536475
http://bugzilla.novell.com/show_bug.cgi?id=536475#c22
Swamp Workflow Management
http://bugzilla.novell.com/show_bug.cgi?id=536475
http://bugzilla.novell.com/show_bug.cgi?id=536475#c24
Lars Vogdt
http://bugzilla.novell.com/show_bug.cgi?id=536475
http://bugzilla.novell.com/show_bug.cgi?id=536475#c25
--- Comment #25 from Christian Dengler
http://bugzilla.novell.com/show_bug.cgi?id=536475
http://bugzilla.novell.com/show_bug.cgi?id=536475#c
Swamp Workflow Management
http://bugzilla.novell.com/show_bug.cgi?id=536475
http://bugzilla.novell.com/show_bug.cgi?id=536475#c26
Swamp Workflow Management
participants (1)
-
bugzilla_noreply@novell.com