Solved

Strange character in dowtime comment

  • 15 February 2022
  • 5 replies
  • 97 views

Userlevel 1
Badge +2

Hello,

One of my user put a downtime with a comment and the character “<br>” have been added and made a strange behavior in the database

En attente du retour de Pierre Damien pour faire le point. <br>(apparemment, il avait déjà du mettre un downtime vendredi 04/02) <br>

When I look in the DB i found this :

MariaDB [centreon_storage]> select * from downtimes where fixed=0 and comment_data like "%<br>%";
+-------------+------------+---------+------------+--------+-----------+-----------------------------------------------------------------------------------------------------------------------------------------+---------------+----------+------------+-------+-------------+-------------+------------+-------------------+-----------------+---------+--------------+------+
| downtime_id | entry_time | host_id | service_id | author | cancelled | comment_data | deletion_time | duration | end_time | fixed | instance_id | internal_id | start_time | actual_start_time | actual_end_time | started | triggered_by | type |
+-------------+------------+---------+------------+--------+-----------+-----------------------------------------------------------------------------------------------------------------------------------------+---------------+----------+------------+-------+-------------+-------------+------------+-------------------+-----------------+---------+--------------+------+
<br> | 1644683217 | 259200 | 1649411280 | 0 | 8 | 8512 | 1644306480 | 1644306676 | 1644683217 | 1 | NULL | 1 |
<br> | 1644683214 | 259200 | 1649411280 | 0 | 4 | 7780 | 1644306480 | 1644306676 | 1644683214 | 1 | NULL | 1 |
<br> | 1644683216 | 259200 | 1649411280 | 0 | 7 | 14044 | 1644306480 | 1644306676 | 1644683216 | 1 | NULL | 1 |
<br>(Acknowledge fonctionne pas) | NULL | 864000 | 1645732320 | 0 | 10 | 191 | 1644864720 | 1644864828 | NULL | 1 | NULL | 2 |
<br>(Acknowledge fonctionne pas) | NULL | 864000 | 1645732320 | 0 | 10 | 192 | 1644864720 | 1644864828 | NULL | 1 | NULL | 1 |
<br>(Acknowledge fonctionne pas) | NULL | 864000 | 1645732320 | 0 | 10 | 193 | 1644864720 | 1644864828 | NULL | 1 | NULL | 1 |
<br>(Acknowledge fonctionne pas) | NULL | 864000 | 1645732320 | 0 | 10 | 194 | 1644864720 | 1644864828 | NULL | 1 | NULL | 1 |
+-------------+------------+---------+------------+--------+-----------+-----------------------------------------------------------------------------------------------------------------------------------------+---------------+----------+------------+-------+-------------+-------------+------------+-------------------+-----------------+---------+--------------+------+

Everything have shift caused by the <br> string, now I cannot cancel the downtime.

How can I clean up this ? I am not sure that the downtime will disapear after the end time.

icon

Best answer by mullergg 17 February 2022, 10:52

View original

5 replies

Userlevel 1
Badge +2

I exported my select into a file and I found the caracter causing the strange behavior:

95113   1644306674      1204    23823   admin   0       En attente du retour de xxx pour faire le point.^M<br>(apparemment, il avait déjà du mettre un downtime vendredi 04/02)^M<br> 1644683217      259200  1649411280      0       8       8512    1644306480      1644306676      1644683217      1       \N      1
95114 1644306674 1202 23770 admin 0 En attente du retour de xxx pour faire le point.^M<br>(apparemment, il avait déjà du mettre un downtime vendredi 04/02)^M<br> 1644683214 259200 1649411280 0 4 7780 1644306480 1644306676 1644683214 1 \N 1
95115 1644306674 1203 23797 admin 0 En attente du retour de xxx pour faire le point.^M<br>(apparemment, il avait déjà du mettre un downtime vendredi 04/02)^M<br> 1644683216 259200 1649411280 0 7 14044 1644306480 1644306676 1644683216 1 \N 1

Now I have the ID I will try an update of the comment.

Userlevel 1
Badge +2

I update the comment and then I updated the end time, because I couldn’t cancel the downtime because for centreon and the poller the service wasn’t in downtime.

Userlevel 3
Badge +9

Hello @mullergg,

 

So did you solve your problem ?

 

Regards.

Userlevel 1
Badge +2

Yes I solved it.

Userlevel 3
Badge +9

Just FYI, I did not reproduce this problem on a 21.04 plateform. I added downtimes with the same comment and I was able to cancel them. This problem seems to be fixed in the latest Centreon versions.

 

Regards

Reply