Cacti not showing images from RRD - PHP fault?

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
int3
Posts: 1
Joined: Fri Mar 11, 2016 7:00 am

Cacti not showing images from RRD - PHP fault?

Post by int3 »

Hello,

Since yesterday I have been troubleshooting why in my server X is not showing up on cacti but in my remote Y is.
It differs X from being ubuntu server 15.10 and the other Y being 14.04.
Here is the list what I know:
  • Permissions are cacti:www-data in /usr/share/cacti/
  • Graphics debug does not show up any image but If I run the RRDtool on bash and redirect the output to any somefile.png I can view the graphic with data.
  • If I try to open ONLY the image from URL in cacti it says:"can't display the image (...) because it has errors" or similar message.
  • I have downgraded the cacti version 0.8.8g (on X) to 0.8.8b (same version on Y server).
  • I have been upgrading and downgrading versions and still nothing.
  • Poller.php seams to be ok in /etc/cron.d/cacti
On my X server:

Code: Select all

# ls -l
total 16
drwxr-xr-x  2 cacti www-data 4096 Mar 11 10:30 cli
drwxr-xr-x  2 cacti www-data 4096 Mar 11 10:30 conf_templates
drwxr-xr-x  5 cacti www-data 4096 Mar 11 10:30 resource
drwxr-xr-x 12 cacti www-data 4096 Mar 11 12:03 site
# pwd
/usr/share/cacti
But on first place and installation didn't create a rra folder under root of the site. On a CentOS VM it did create and is the same version. On server X and Y there ISN'T any RRA folder but It works don't know how.

Code: Select all

# su www-data
$ cd
$ pwd
/var/www
$ php --define suhosin.memory_limit=512M /usr/share/cacti/site/poller.php 2>&1 >/dev/null | if [ -f /usr/bin/ts ] ; then ts ; else tee ; fi
$ whoami
www-data
$ php /usr/share/cacti/site/poller.php
PHP Strict Standards:  Only variables should be passed by reference in /usr/share/cacti/site/lib/ping.php on line 382
PHP Strict Standards:  Only variables should be passed by reference in /usr/share/cacti/site/lib/ping.php on line 382
PHP Strict Standards:  Only variables should be passed by reference in /usr/share/cacti/site/lib/ping.php on line 382
OK u:0,00 s:0,00 r:0,00
OK u:0,00 s:0,00 r:0,00
OK u:0,00 s:0,00 r:0,00
OK u:0,00 s:0,00 r:0,03
PHP Strict Standards:  Only variables should be passed by reference in /usr/share/cacti/site/lib/ping.php on line 382
OK u:0,00 s:0,00 r:0,05
PHP Strict Standards:  Only variables should be passed by reference in /usr/share/cacti/site/lib/ping.php on line 382
PHP Strict Standards:  Only variables should be passed by reference in /usr/share/cacti/site/lib/ping.php on line 382
OK u:0,00 s:0,00 r:0,06
OK u:0,00 s:0,00 r:0,06
OK u:0,00 s:0,00 r:0,06
OK u:0,00 s:0,00 r:0,06
OK u:0,00 s:0,00 r:0,06
OK u:0,00 s:0,00 r:0,06
OK u:0,00 s:0,00 r:0,07
OK u:0,00 s:0,00 r:0,07
OK u:0,00 s:0,00 r:0,07
OK u:0,00 s:0,00 r:0,07
OK u:0,00 s:0,00 r:0,07
OK u:0,00 s:0,00 r:0,07
OK u:0,00 s:0,00 r:0,07
OK u:0,00 s:0,00 r:0,08
OK u:0,00 s:0,00 r:0,08
OK u:0,00 s:0,00 r:0,08
OK u:0,00 s:0,00 r:0,08
OK u:0,00 s:0,00 r:0,08
OK u:0,00 s:0,00 r:0,08
OK u:0,00 s:0,00 r:0,08
OK u:0,00 s:0,00 r:0,08
OK u:0,00 s:0,00 r:0,09
OK u:0,00 s:0,00 r:0,09
OK u:0,00 s:0,00 r:0,09
OK u:0,00 s:0,00 r:0,09
OK u:0,00 s:0,00 r:0,09
OK u:0,00 s:0,00 r:0,09
OK u:0,00 s:0,00 r:0,09
OK u:0,00 s:0,00 r:0,09
OK u:0,00 s:0,00 r:0,09
OK u:0,00 s:0,00 r:0,09
OK u:0,00 s:0,00 r:0,09
OK u:0,00 s:0,00 r:0,09
OK u:0,00 s:0,00 r:0,10
OK u:0,00 s:0,00 r:0,10
OK u:0,00 s:0,00 r:0,10
OK u:0,00 s:0,00 r:0,10
OK u:0,00 s:0,00 r:0,10
OK u:0,00 s:0,00 r:0,10
OK u:0,00 s:0,00 r:0,10
OK u:0,00 s:0,00 r:0,10
OK u:0,00 s:0,00 r:0,10
OK u:0,00 s:0,00 r:0,11
OK u:0,00 s:0,00 r:0,11
OK u:0,00 s:0,00 r:0,11
OK u:0,00 s:0,00 r:0,11
03/11/2016 01:43:53 PM - SYSTEM STATS: Time:0.2406 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:51 RRDsProcessed:51
I have put all permissions right (cacti as user and www-data as group) in pretty much everything I could find.
I can create graphics witch user shell:

Code: Select all

$ /usr/bin/rrdtool graph - --imgformat=PNG --start=-86400 --end=-300 --title='Squid - DNS Statistics' --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit='0' --vertical-label='' --slope-mode --font TITLE:10: --font AXIS:7: --font LEGEND:8: --font UNIT:7: DEF:a='/usr/share/cacti/site/rra/proxier_health_status_dnsrequests_28.rrd':'DnsRequests':AVERAGE DEF:b='/usr/share/cacti/site/rra/proxier_health_status_dnsreplies_27.rrd':'DnsReplies':AVERAGE COMMENT:'Requests'  GPRINT:a:LAST:'Current\:%8.2lf %s'  GPRINT:a:AVERAGE:'Average\:%8.2lf %s'  GPRINT:a:MAX:'Maximum\:%8.2lf %s\n'  COMMENT:'Replies'  GPRINT:b:LAST:'Current\:%8.2lf %s'  GPRINT:b:AVERAGE:'Average\:%8.2lf %s'  GPRINT:b:MAX:'Maximum\:%8.2lf %s\n' > ~/site/test.png
$ file ~/site/test.png
/usr/share/cacti/site/test.png: PNG image data, 581 x 210, 8-bit/color RGB, non-interlaced
Somebody can enlighten me?
User avatar
micke2k
Cacti User
Posts: 261
Joined: Wed Feb 03, 2016 3:38 pm

Re: Cacti not showing images from RRD - PHP fault?

Post by micke2k »

Run the poller with higher log settings. Debug/high.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests