Open mathieuchateau opened 5 years ago
The problem is not only known in 19.04.
We have it on different customer installations after upgrading to Centreon 2.8.29 from 2.8.28.
Hi @mathieuchateau and @itsul ,
We're going to try to investigate and reproduce you issue.
But we may need more data.
Could you send us the result of this query : SHOW CREATE TABLE custom_view_default;
And @mathieuchateau -> Please could you send us the /var/log/centreon/sql-error.log
file from last september, 25th ? (should be a compressed file and named like "sql-error.log-201909xx.gz")
Best Regards, sc979
@sc979
MariaDB [centreon]> SHOW CREATE TABLE custom_view_default; +---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | custom_view_default | CREATE TABLE
custom_view_default(
user_idint(11) NOT NULL,
custom_view_idint(11) NOT NULL, KEY
fk_custom_view_default_user_id(
user_id), KEY
fk_custom_view_default_cv_id(
custom_view_id), CONSTRAINT
fk_custom_view_default_cv_idFOREIGN KEY (
custom_view_id) REFERENCES
custom_views(
custom_view_id) ON DELETE CASCADE, CONSTRAINT
fk_custom_view_default_user_idFOREIGN KEY (
user_id) REFERENCES
contact(
contact_id) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 | +---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)
@sc979 All errors in september (gathered all sql errors content from september)
`2019-09-09 15:23|0|0|DB Error: constraint violation QUERY : UPDATE extended_host_information SET ehi_icon_image = 'REP_1', ehi_vrml_image = 'REP_1' WHERE host_host_id = '630'
2019-09-09 15:23|0|0|DB Error: constraint violation QUERY : UPDATE extended_host_information SET ehi_icon_image = 'REP_1', ehi_vrml_image = 'REP_1' WHERE host_host_id = '631'
2019-09-19 12:23|0|0| QUERY : SELECT auth.ar_id, auth.ar_sync_base_date, info.ari_value AS interval FROM auth_ressource auth INNER JOIN auth_ressource_info info ON auth.ar_id = info.ar_id WHERE auth.ar_enable = '1' AND info.ari_name = 'ldap_sync_interval'
2019-09-19 14:25|0|0| QUERY : SELECT auth.ar_id, auth.ar_sync_base_date, info.ari_value AS interval FROM auth_ressource auth INNER JOIN auth_ressource_info info ON auth.ar_id = info.ar_id WHERE auth.ar_enable = '1' AND info.ari_name = 'ldap_sync_interval'
2019-09-20 12:34|0|0| QUERY : SELECT s.state, h.name, s.description, s.last_check, s.next_check, s.last_state_change, s.last_notification, s.last_hard_state_change, s.last_hard_state, s.latency, s.last_time_ok, s.last_time_critical, s.last_time_unknown, s.last_time_warning, s.notification_number, s.scheduled_downtime_depth, s.output, s.notes, ROUND(s.percent_state_change) as percent_state_change, s.notify, s.perfdata, s.state_type, s.execution_time, s.event_handler_enabled, s.icon_image, s.display_name FROM hosts h, services s WHERE s.host_id = h.host_id AND s.host_id = 56 AND service_id = LIMIT 1
2019-09-20 12:34|0|0| QUERY : SELECT s.state, h.name, s.description, s.last_check, s.next_check, s.last_state_change, s.last_notification, s.last_hard_state_change, s.last_hard_state, s.latency, s.last_time_ok, s.last_time_critical, s.last_time_unknown, s.last_time_warning, s.notification_number, s.scheduled_downtime_depth, s.output, s.notes, ROUND(s.percent_state_change) as percent_state_change, s.notify, s.perfdata, s.state_type, s.execution_time, s.event_handler_enabled, s.icon_image, s.display_name FROM hosts h, services s WHERE s.host_id = h.host_id AND s.host_id = 66 AND service_id = LIMIT 1 `
@mathieuchateau, Thanks for these information, this may help. Your "custom_view_default" table is properly set. Let us some time to investigate and try to reproduce it Best Regards, sc979
Hello together,
Attached you'll receive the query output of three different systems (2.8.27, 2.8.29 and 19.04). The 2.8.29/19.04 systems are the "faulty" ones. Actually they are all the same:
19.04
+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| custom_view_default | CREATE TABLE custom_view_default
(
user_id
int(11) NOT NULL,
custom_view_id
int(11) NOT NULL,
KEY fk_custom_view_default_user_id
(user_id
),
KEY fk_custom_view_default_cv_id
(custom_view_id
),
CONSTRAINT fk_custom_view_default_cv_id
FOREIGN KEY (custom_view_id
) REFERENCES custom_views
(custom_view_id
) ON DELETE CASCADE,
CONSTRAINT fk_custom_view_default_user_id
FOREIGN KEY (user_id
) REFERENCES contact
(contact_id
) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2.8.29
+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| custom_view_default | CREATE TABLE custom_view_default
(
user_id
int(11) NOT NULL,
custom_view_id
int(11) NOT NULL,
KEY fk_custom_view_default_user_id
(user_id
),
KEY fk_custom_view_default_cv_id
(custom_view_id
),
CONSTRAINT fk_custom_view_default_cv_id
FOREIGN KEY (custom_view_id
) REFERENCES custom_views
(custom_view_id
) ON DELETE CASCADE,
CONSTRAINT fk_custom_view_default_user_id
FOREIGN KEY (user_id
) REFERENCES contact
(contact_id
) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2.8.27
+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table
+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| custom_view_default | CREATE TABLE custom_view_default
(
user_id
int(11) NOT NULL,
custom_view_id
int(11) NOT NULL,
KEY fk_custom_view_default_user_id
(user_id
),
KEY fk_custom_view_default_cv_id
(custom_view_id
),
CONSTRAINT fk_custom_view_default_cv_id
FOREIGN KEY (custom_view_id
) REFERENCES custom_views
(custom_view_id
) ON DELETE CASCADE,
CONSTRAINT fk_custom_view_default_user_id
FOREIGN KEY (user_id
) REFERENCES contact
(contact_id
) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Greetings,
TM
Hi,
Do you have js error when you go on the custom views page? Have you all edit information for the different views when you go on : /centreon/api/internal.php?object=centreon_home_customview&action=listViews
Regards
Hi,
there are no js errors when I go to the custom view page.
On Centreon 19.04 I opened the link and got this: { "current": 15, "tabs": [ { "default": false, "name": "TestTest", "custom_view_id": "15", "public": "0", "nbCols": "column_1" } ] } which seems fine.
Regards
Me too, calling this web page looks all fine, got a json, but no Current:15 like @itsul
Starting directly with:
{"current":4,"tabs":[{"default":false,"name
Hi, have you test to clean the browser cache or in private navigation? Regards
@loiclau As the creator of views, I was not impacted. Others, who are impacted, tried other browser and in private
It should work if you save the settings (it's a workaround)
@garnier-quentin I tried doing changes on view, but issues stays
The creator is admin ? The shared user is admin ? The view is public ? The view is locked ? How many views are display on the page ?
The creator and the shared user are admins. The view is shared as "unlocked users". If I share it as "locked users" the content of the widget is behaving normal. So it seems to be a problem with "unlocked users". I have only one view in my test environment. But the issue is more about the settings of the widget in the view.
Hey I had the same issue when I upgraded from 19.04.02 to 19.04.10
CREATE TABLE `custom_view_default` (
`user_id` int(11) NOT NULL,
`custom_view_id` int(11) NOT NULL,
KEY `fk_custom_view_default_user_id` (`user_id`),
KEY `fk_custom_view_default_cv_id` (`custom_view_id`),
CONSTRAINT `fk_custom_view_default_cv_id` FOREIGN KEY (`custom_view_id`) REFERENCES
`custom_views` (`custom_view_id`) ON DELETE CASCADE,
CONSTRAINT `fk_custom_view_default_user_id` FOREIGN KEY (`user_id`) REFERENCES `contact` (`contact_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8
Users created after upgrade have a messy shared view. As previous comment, is like widget settings get lost
I got this javascript error for messy views:
Mixed Content: The page at 'https://****************/centreon/main.php?p=103' was loaded over HTTPS, but requested an insecure frame 'http://www.centreon.com/'. This request has been blocked; the content must be served over HTTPS.
@kozfelipe Unfortunately the current behaviour has changed by design from centreon. We opened an issue/call as a centreon partner and got this official answer. The "solution" to get the old behaviour back, is to restore the "www/class/centreonWidget.class.php" file from 2019-12-02 (pull request 7641 - 2.8.x branch can be something else in 18.x or 19.x) or earlier...
We have not tested the new design in detail, if it is possible to archieve an similar "sharing of views" like the old function.
Got it @itsul thank you
Versions
Operating System
CentOS
Browser used
Version: 77.0.3865.90
Additional environment details (AWS, VirtualBox, physical, etc.): Virtual Machine on Premise
Description
Since we upgraded from 2.8 to 19.04, we have impacts on custom views:
Steps to Reproduce
Please describe precisely the steps to reproduce the encountered issue.
Describe the received result
Graphs setting are lost on views, share status too. Try to set again Title, # column, public status, share with users. Not working
Describe the expected result
Views settings kept over upgrade.
Logs
PHP error logs