BUG in utils.c - nagios 3.0a4 - processing passive checks

Hendrik Bäcker andurin at process-zero.de
Wed May 30 18:26:05 CEST 2007


Hi Roman,

you are right. There is a small problem when there are more than one
check result in a file.
Another user told me and he tried your changes and seems to be happy
right now.

But I think there is a better way to determine the end of a check
result... I will try to work out another solution and would like to now
if you would give it a chance when I am ready?

But to make it easier to Ethan, here are your changes as a handle patch
file ;)

Kind regards,
Hendrik


Roman Trylski schrieb:
> Hi all,
> 
> There is a bug in Nagios 3.0a4, utils.c, function process_check_result_file.
> 
> It's impossible to process result list having more then one result output.
> eg. submitting many service checks in one moment causes creating temporary 
> file (in /usr/local/nagios/var/spool/checkresults) which contains several 
> records divided by '\n'. Function process_check_result_file which process 
> this file is looking for a '\x0' as a record divider, but there is no such 
> line.
> Result: function process_check_result_file returns only one last record in 
> file.
> 
> Remedy: replace '\x0' for '\n' in:
> 
> /* whitespace indicates end of record */
>   else if(input[0]=='\x0'){
> 
> It should work fine, it's working for me :)
> 
> I'm not familiar with nagios architecture, maybe there is other solution for 
> this problem (putting whitespace between records? maybe?).
> 
> have fun
> Roman Trylski 
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
> 
> 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: utils.c.byroman.patch
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20070530/f142b6cb/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20070530/f142b6cb/attachment.sig>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list