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
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
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 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