Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.65k stars 406 forks source link

No graph after update 0.8.8 > 1.0.0 > 1.0.1 #273

Closed Philippe-M closed 7 years ago

Philippe-M commented 7 years ago

Hello,

After the cacti update the graphics are not displayed. I have copied them well into the rra/

image

# ll -d sw02*
-rw-r--r-- 1 apache webauthor 47992 févr.  6 15:30 sw02_snmp_oid_606.rrd
-rw-r--r-- 1 apache webauthor 94816 févr.  3 11:49 sw02_traffic_in_12.rrd
-rw-r--r-- 1 apache webauthor 94816 févr.  3 11:49 sw02_traffic_in_241.rrd
-rw-r--r-- 1 apache webauthor 94816 févr.  3 11:49 sw02_traffic_in_312.rrd
-rw-r--r-- 1 apache webauthor 94816 févr.  6 15:30 sw02_traffic_in_373.rrd
-rw-r--r-- 1 apache webauthor 94816 févr.  6 15:30 sw02_traffic_in_374.rrd
-rw-r--r-- 1 apache webauthor 94816 févr.  6 15:30 sw02_traffic_in_375.rrd

In the logs I have no errors.

mysql -v

Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 123 Server version: 5.7.17 MySQL Community Server (GPL)

php -v

PHP 5.6.30 (cli) (built: Jan 19 2017 08:18:25) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

httpd -v

Server version: Apache/2.2.3 Server built: Jul 18 2014 04:46:39

DavidLiedke commented 7 years ago

Look into the databse table "poller_item". There you find the "rrd_path". Ist this the correct path to your rrd files ?

Philippe-M commented 7 years ago

The access path is the right one

cigamit commented 7 years ago

Please goto Console -> Graphs edit the Graph in question. Then turn on 'Debug' mode. Past the output you receive from Debug mode. Also, please goto /etc/php.ini and edit the php.ini. Set error_log = /tmp/php_errors.txt and restart apache so we can catch things. They will be in your Cacti log in this release, but the error_log will be easier to search.

Philippe-M commented 7 years ago

Debug mode :

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start='-180000' \
--end='-300' \
--pango-markup  \
--title='sw02 - Traffic - 5 --> sw09 - 9' \
--vertical-label='bits per second' \
--slope-mode \
--base=1000 \
--height=120 \
--width=500 \
--tabwidth '30' \
--rigid \
--alt-autoscale-max \
--lower-limit='0' \
--slope-mode \
--watermark 'Copyright (C) 2004-2017 The Cacti Group' \
DEF:a='/www/prod/admin/html/cacti/rra/sw02_traffic_in_374.rrd':'traffic_in':AVERAGE \
DEF:b='/www/prod/admin/html/cacti/rra/sw02_traffic_in_374.rrd':'traffic_out':AVERAGE \
CDEF:cdefa='a,8,*' \
CDEF:cdeff='b,8,*' \
AREA:cdefa#00CF00FF:"Inbound "  \
GPRINT:cdefa:LAST:'Current\:%8.2lf %s'  \
GPRINT:cdefa:AVERAGE:'Average\:%8.2lf %s'  \
GPRINT:cdefa:MAX:'Maximum\:%8.2lf %s'  \
COMMENT:'Total In\:  25.76 MB\n'  \
LINE1:cdeff#002A97FF:'Outbound'  \
GPRINT:cdeff:LAST:'Current\:%8.2lf %s'  \
GPRINT:cdeff:AVERAGE:'Average\:%8.2lf %s'  \
GPRINT:cdeff:MAX:'Maximum\:%8.2lf %s'  \
COMMENT:'Total Out\: 548.34 KB' 

Retour de RRDTool :

ERROR: unknown option '--pango-markup'

I think the error does not come from the path but from the error rrdtool : ERROR: unknown option '--pango-markup'

# rrdtool -v
RRDtool 1.2.27  Copyright 1997-2008 by Tobias Oetiker <tobi@oetiker.ch>
               Compiled Jun  7 2013 10:32:25
cigamit commented 7 years ago

This issue is resolved now. You might want to consider upgrading RRDtool as I suspect many Graph Templates will start to incorporate --pango-markup attributes. For example, the Thold HRULES already do.

browniebraun commented 7 years ago

Jimmy, I was just writing my answer. ;)

browniebraun commented 7 years ago

Please take care of updating your RRDtool version under "Console->Configuration->Settings->Tab:General" appropriate to that new version you are going to install. (1.3.x or 1.4.x or 1.5.x or 1.6.x)

Philippe-M commented 7 years ago

image

But on my server i've :

# rrdtool -v
RRDtool 1.2.27  Copyright 1997-2008 by Tobias Oetiker <tobi@oetiker.ch>

With the old version of cacti it's ok.

browniebraun commented 7 years ago

Well, but if you are running into trouble again you should definitely take an upgrade into account as Cacti officially no longer supports that 9 year old version of RRDtool.

Regards -Andi

cigamit commented 7 years ago

The reason you still have this error is that you are using RRDtool 1.27, and you have selected from the GUI, that you are using RRDtool 1.3.x. It's an obvious mistake. Make the GUI change, and you are back in business.

Philippe-M commented 7 years ago

@cigamit : ok but the gui does not offer an older version of rrdtool that is why I left the oldest version available in the gui.

@browniebraun : ok, that's what I started doing, I'll have to migrate from rhel 5 to rhel 7. it was scheduled but not so soon. It would be necessary to change the documentation, in the prerequisites it is written that rrdtool 1.2.x is supported: http://docs.cacti.net/manual:088:1_installation#requirements

cigamit commented 7 years ago

Okay, I've added RRDtool 1.2.x back. Take a fresh pull from git, and you should be able to select it.

Philippe-M commented 7 years ago

it's ok in graph setting image

not in graph tab image

cigamit commented 7 years ago

On the graph tab, you will have to use either the browsers debug tools, or install something like firebug on Firefox. From either of these tools, find the Network panel, and inspect the reponse for the graph_json.php? call to the web server. Open it up, and see if there are any cacti errors in that output. Post what you find. Screen shot or otherwise.

DavidLiedke commented 7 years ago

I had the same issue with some graphs.

Google Chrome Developer Tools:

1

2

Preview Tab: preview-tab.txt

Response Tab: response-tab.txt

3

4

Is this that what you need ?

cigamit commented 7 years ago

Yea, that was enough. Can you do the same viewing of graphs, but this time keep the console tab open in the debug window and see if you are getting errors as the 'response.txt' is formatted correctly and includes and image. Also, let me know your browser and version and os and version of your browser.

Philippe-M commented 7 years ago

response.txt

Fedora 25, firefox 51.0.1 (64bits)

image

cigamit commented 7 years ago

The team had a discussion on this and the solution was to remove RRDtool 1.2 support. The graphing on the Graphs page is dependent on RRDtool 1.3+ features. So, we don't have much of a choice.