Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

genEscalations.php generates service escalations only for the last Escalation when multiple Escalation are related to only one service group #681

Closed
centreon opened this issue Apr 5, 2010 · 4 comments

Comments

@centreon
Copy link
Collaborator

centreon commented Apr 5, 2010


Author Name: massimo mongardini (massimo mongardini)
Original Redmine Issue: 1682, https://forge.centreon.com/issues/1682
Original Date: 2010-04-05
Original Assignee: Sylvestre Ho


Hi,

I tried to re-open the bug 1660 but I couldn't find how...

I have the same problem here.

Centreon 2.1.5

if you set a Service Group in "Servicegroups Escalations" for each notification period (quite handy if you want new services to go into the escalations routines without having to add the services for each escalation...) the result file shows only the last escalation period.


mysql> select * from escalation;
+--------+----------+-----------+--------------------+-------------------+-----------------------+-------------------+---------------------+---------------------+-------------+ | esc_id | esc_name | esc_alias | first_notification | last_notification | notification_interval | escalation_period | escalation_options1 | escalation_options2 | esc_comment |
+--------+----------+-----------+--------------------+-------------------+-----------------------+-------------------+---------------------+---------------------+-------------+ | 1 | Test1 | Test1 | 1 | 2 | 1 | 1 | d,r | w,u,c,r | test1 | | 2 | Test2 | Test2 | 2 | 4 | 1 | 1 | d,r | w,u,c,r | test2 | 
+--------+----------+-----------+--------------------+-------------------+-----------------------+-------------------+---------------------+---------------------+-------------+
2 rows in set (0.00 sec)

mysql> select * from escalation_servicegroup_relation;
+---------+-------------------+--------------------+ | esgr_id | escalation_esc_id | servicegroup_sg_id |
+---------+-------------------+--------------------+ | 1 | 1 | 1 | | 4 | 2 | 1 | 
+---------+-------------------+--------------------+
2 rows in set (0.00 sec)

mysql> select * from servicegroup;
+-------+-------------+----------+------------+-------------+ | sg_id | sg_name | sg_alias | sg_comment | sg_activate |
+-------+-------------+----------+------------+-------------+ | 1 | GServices | GServ | NULL | 1 | 
+-------+-------------+----------+------------+-------------+
1 row in set (0.00 sec) 4250
egrep first escalations.cfg | uniq
first_notification 2
egrep last escalations.cfg | uniq
last_notification 4

grep serviceescalation escalations.cfg | wc -lmysql> select * from servicegroup_relation LIMIT 3;
+--------+--------------+-----------------+--------------------+--------------------+ | sgr_id | host_host_id | hostgroup_hg_id | service_service_id | servicegroup_sg_id |
+--------+--------------+-----------------+--------------------+--------------------+ | 92 | NULL | 59 | 41 | 1 | | 93 | NULL | 59 | 43 | 1 | | 94 | NULL | 59 | 44 | 1 | 
+--------+--------------+-----------------+--------------------+--------------------+
3 rows in set (0.00 sec)

mysql> select * from escalation_service_relation;
Empty set (0.00 sec)

mysql> select * from escalation_hostgroup_relation;
Empty set (0.01 sec)

mysql> select * from escalation_host_relation;
Empty set (0.00 sec)


Without having done any debug here it seems like the script either overwrites a variable with the last value or it doesn't do an append on file write on the last step.

Thanks,
Macs

@centreon
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Sylvestre Ho (Sylvestre Ho)
Original Date: 2010-04-19T12:11:43Z


I will look into it, thanks for the report

@centreon
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Sylvestre Ho (Sylvestre Ho)
Original Date: 2010-04-19T13:40:35Z


Hi,

Is your GMT option activated?

@centreon
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Sylvestre Ho (Sylvestre Ho)
Original Date: 2010-04-19T14:41:34Z


Hi,

I managed to produce your bug with GMT activated.

fixed in changeset r10357

@centreon
Copy link
Collaborator Author

centreon commented May 5, 2010


Original Redmine Comment
Author Name: chris waters (chris waters)
Original Date: 2010-05-05T23:54:29Z


This also seems to be the case for hostgroup escalations as well. (don't know if your fix applied to hostgroups as well). Disabling GMT seems to help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants