Host Urgency Patch

Ton Voon tonvoon at gmail.com
Wed May 11 22:51:08 CEST 2011


On 4 May 2011, at 16:33, Jochen Bern wrote:

> On 05/04/2011 02:18 PM, Jochen Bern wrote:
>> On 05/04/2011 01:17 PM, Ton Voon wrote:
>>> Hi Jochen,
>>> Is it possible if you can create a test case for this? Hit the status.cgi
>>> with this sortoption and then check that the hosts are ordered appropriately?
>>> There are some examples of tests in t/ that do similar tricks.
>> Does a "nagios -v" do the nagios_user:nagios_group set[ug]id() stuff
>> before starting the check? Because I work under a mode-750 /root while
>> t/etc/nagios.cfg specifies nagios:nagios ...
> 
> Apparently it does; moving stuff over to ~nagios fixed "make test-perl"
> at least. ("make test-tap" is lacking an appropriate configuration, but
> it's operating outside the t/ subdir you referred me to, anyway.)
> 
> Additional t/ stuff in the attached tarfile (it's all *new* files, not
> much sense in providing a "diff", is there? ;-), a verbose run gives:
> 
>> [nagios at nagios t]$ prove -v 611cgistatus-hosturgencies.t
>> 611cgistatus-hosturgencies....1..3
>> ok 1 - List of hosts sorted by ascending name
>> ok 2 - List of hosts sorted by ascending status
>> ok 3 - List of hosts sorted by descending urgency
>> ok
>> All tests successful.
>> Files=1, Tests=3,  0 wallclock secs ( 0.06 cusr +  0.01 csys =  0.07 CPU)

Brilliant - the test is great. Thanks.

I've committed this now. I've changed the sort order number from 16834 to 9 - not sure why it needs to be a completely different number.

Ton


------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay




More information about the Developers mailing list