DEL_ALL_SVC_COMMENTS not always working?
Berning, Joerg
Joerg.Berning at softwareag.com
Thu Mar 2 19:02:24 CET 2006
Your help in troubleshooting the following is really appreciated:
Configuration is as follows:
Nagios 2.0(02/07/2006) under Red Hat ES4(2.6.9-22.0.2.ELsmp).
Trying to reproduce the problem under Nagios 1.2(AIX 5.2) did not work, Nagios worked perfectly, the problem is only reproducible under 2.0, sorry, no testing has been done under 1.3.
To reproduce the problem(via Nagios web-interface):
choose any host via "Service Detail" with at least two services and do the following
select your first choice of service and scroll down to the link saying "Add a new comment" select this link and enter(i.e.) "#1" in the Comment-field, click commit
select your second choice of service(remember, on the same host), scroll down to the add-a-new-comment-link select that and enter(i.e.) "#2" in the Comment-field, click commit
check via "Service Detail" that both services got a comment-bubble(or your var/comments.dat)
now select your !second! choice of service again, scroll down and click on the "Delete all comments"-link, do NOT click on the "Delete this comment"-icon(the trash-icon) select Commit
check via "Service Detail" that the comment is deleted(no comment-bubble visible)
then select your !first! choice of service, scroll down and click on the "Delete all comments"-link, do NOT click on the "Delete this comment"-icon(the trash-icon) select Commit
check via "Service Detail" that the comment was NOT deleted.
I also did the above in a script(via ADD_SVC_COMMENT and DEL_ALL_SVC_COMMENTS), same problem. If I choose the trash-icon aside the comment and the comment-id is used for the deletion, that's working.
When doing a hexedit var/comments.dat the entry for service#2 looks fine, like the one for service#1. The entries in the Event Log also look the same, for both services. After restarting Nagios via "Process Info/Restart the Nagios process" a click on the "Delete all comments"-link works as expected, the comment is removed. I also tried ./configure with --enable-DEBUGALL, but the only messages I'm getting are in the appache error log, saying "malformed header from script.", and apache isn't able to serve the http-pages...
But I think I'm getting closer to the problem.
This night five service checks(under the same host-entry) got processed like this:
The comments got entered in the following sequence(via ADD_SVC_COMMENT):
#1
#2
#3
#4
#5
Until now everything is working fine.
Now the service-checks ended in the following sequence and should have been removed via DEL_ALL_SVC_COMMENTS:
#2
#5
#4
#1
#3
But only the comments for service-checks
#2
#5
got removed(in this sequence).
The comments for
#4
#1
#3
are still in var/comments.dat and are not deletable, neither via DEL_ALL_SVC_COMMENTS nor the webinterface("Delete all comments").
Deleting them via the trashcan-icon(with the comment-id) works.
It looks like some kind of end-of-comment-list-pointer is moved in the list of comments:
Comment #2 gets deleted, the pointer in the list of comments gets moved to entry #2
Comment #5 gets deleted, the pointer in the list of comments gets moved to entry #5, which is the last in the list
Now comment #4 should get deleted, but does not, because the end-of-comment-list-pointer is further down the list, so the comment can't get deleted.
Same with comment #1 and #3, both are above the end-of-comment-list-pointer.
If somebody could confirm the above, please, to make sure it's not my local mistake?
Thank you for your time,
Jörg Berning
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
More information about the Developers
mailing list