Hi everyone,
Sorry this is my first time posting here and I'm not a native english speaker. So if I miss some required info or grammar problems please point it out.
Eversince we've updated our database to MariaDB 10.2 from 5.5 I've been having this issue where when I click on a graph the monthly, daily, weekly etc data are not shown. Only the latest data is drawn instead. Although clicking on zoom would display the right time range. RRD data is ok and is still updated. Cacti source code not changed. I've tried repairing the database and rebuilding poller cache. Also tried restoring the db from the last backup before we upgraded to 10.2. Recreating the database on MariaDB 10.1 on a test vm and pointing the cacti installation to it seems to solve the problem. But we can't just downgrade since nothing is majorly broken but only how we view our graphs and we are more interested in making this work.
So with this I'd like to ask here what should I check else to fix this issue? My guess would be something on the database was messed up when we did the upgrade but I'm not sure where to look.
More info:
Cacti 0.8.8h (CMD poller)
Debian Jessie
PHP 5.6 FPM
Cacti pointed to external Maria DB 10.2 on Ubuntu 14.04
Thank you.
problem in viewing graphs
Moderators: Developers, Moderators
problem in viewing graphs
- Attachments
-
- Screen Shot 2017-06-08 at 15.50.48.png (54.95 KiB) Viewed 1730 times
Re: problem in viewing graphs
It's look like You see zoomed graph, 1 polling cycle.
Re: problem in viewing graphs
I have traced the issue and found that Mariadb 10.2 is treating differently the "rows" keyword used by a column in the "rra" table. Doing any operation (create or select from my test) would fail but enclosing it within `` will be ok. I've edited the lib/rrd.php in my installation as a workaround and the graphs are displaying properly now.
Somewhere inside the lib/rrd.php file I changed the select statement and enclosed the rows keyword inside `` on the select statement.
Thank you.
Code: Select all
e
MariaDB [test]> create table test (rows int);
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MariaDB server version for the right
syntax to use near 'rows int)' at line 1
Code: Select all
MariaDB [test]> create table test (`rows` int);
Query OK, 0 rows affected (0.02 sec)
Code: Select all
}else{
$rra = db_fetch_row("select timespan,`rows`,steps from rra where id=$rra_id");
}
Who is online
Users browsing this forum: No registered users and 2 guests