Bug #3306

genEscalations.php stopping after generating first escalation

Added by Guillaume Chanaud almost 3 years ago. Updated about 2 years ago.

Status:ClosedStart date:05/07/2012
Priority:HighDue date:
Assignee:-% Done:


Category:Centreon - ConfigurationEstimated time:0.00 hour
Target version:Centreon-2.4.1


I tried to generate multiple escalations rules in centreon, but it always generate the first rule and nothing after.
The bug is located in centreon/www/include/configuration/configGenerate/genEscalations.php at line 262. The DBRESULT is freed at the end of the while loop, so it stop there because no more iteration can be done after this freeing.

To be more clear :
while ($escalation = $DBRESULT->fetchRow()){

So on second iteration, the $escalation = $DBRESULT->fetchRow() return null because $DBRESULT as been freed at the end of first iteration...
The solution is to move the $DBRESULT->free(); just after the loop...

while ($escalation = $DBRESULT->fetchRow()){

I join a simple patch to this issue.

For now, without fixing this issue, Centreon escalations are unusable...That's why i put a High Priority.

And thanks for the work !

patchGenEscalations.patch Magnifier (709 Bytes) Guillaume Chanaud, 05/07/2012 01:17 pm

Associated revisions

Revision c049b831
Added by Sylvestre Ho about 2 years ago

fix #3306; fix hostgroup escalation generation


#1 Updated by Anonymous over 2 years ago

  • Target version set to Centreon-2.5

#2 Updated by John Alberts - about 2 years ago

WOW! I can't believe this wasn't included immediately in the next release. This completely breaks notification escalations and I just spent the past 6 hours troubleshooting alerts only to find out the problem was due to this bug. The solution provided by the author of this issue (a one line change) works perfect and fixed my problem.
The priority of this issue should be considered immediate since it completely (and silently) breaks notification escalations.

#3 Updated by Sylvestre Ho about 2 years ago

  • Status changed from New to Solved
  • % Done changed from 0 to 100

#4 Updated by Sylvestre Ho about 2 years ago

  • Target version changed from Centreon-2.5 to Centreon-2.4.1
  • Resolution set to fixed

Thanks for bringing that up John and Guillaume. We had overlooked this ticket...

#5 Updated by Kevin Duret about 2 years ago

  • Status changed from Solved to Closed

Also available in: Atom PDF