RRA ok but no graphs

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
farpost
Posts: 6
Joined: Mon Jan 16, 2006 3:24 am

RRA ok but no graphs

Post by farpost »

My cacti graphs stopped to work (no images at all). Polling is ok, and rrd files are up-to-date, but graphs are not showing.

When I turn on Graph Debug Mode there is nothing in debug, just 'RRDToll says' and no image.

When I go to 'Graphs', choose some graph on the tree and click on 'graph/source properties', I see this output:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Probe Switch - Traffic - Fa0/1 " \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
DEF:a="/var/www/html/cacti/rra/probe_switch_traffic_in_80.rrd":traffic_in:AVERAGE \
DEF:b="/var/www/html/cacti/rra/probe_switch_traffic_in_80.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefe=b,8,* \
AREA:cdefa#00CF00:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefe#002A97:"Outbound" \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n" \
COMMENT:"\n" \
HRULE:0#FF0000:"95th Percentile" \
COMMENT:"(0 mbit in+out)"



If I run this command in console and send output to PNG 'command > graph1.png' - it's working, the graph is created and I can access it.


Also I tried:
- increase php memory limit (it's 256M now);
- truncate poller_output table;
- reindex graphs data sources.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Did you upgrade rrdtool and forget to alter the cacti rrdtool setting?

Double check the rrdtool version that you are running matches the version cacti is configured to use.

This rrdtool setting appeared in cacti 0.8.6f, if I recall correctly.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
farpost
Posts: 6
Joined: Mon Jan 16, 2006 3:24 am

Post by farpost »

rony wrote:Did you upgrade rrdtool and forget to alter the cacti rrdtool setting?

Double check the rrdtool version that you are running matches the version cacti is configured to use.

This rrdtool setting appeared in cacti 0.8.6f, if I recall correctly.
rrdtool-1.0.50-2.1.fc3.rf
cacti-0.8.6g-1

Cacti is configured to use RRDTool 1.0.x
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Move back to 1.0.49 of rrdtool, let me what the result is.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Also, are you running apache in a chroot?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
farpost
Posts: 6
Joined: Mon Jan 16, 2006 3:24 am

Post by farpost »

rony wrote:Also, are you running apache in a chroot?
Thanks for your reply, rony - no, it's no chroot. Running under 'apache' user, and nothing was changed in apache.
farpost
Posts: 6
Joined: Mon Jan 16, 2006 3:24 am

Post by farpost »

Just found in /var/log/messages:

Jan 18 21:12:25 localhost kernel: audit(1137647545.994:0): avc: denied { read } for pid=4092 exe=/usr/sbin/httpd
Jan 18 21:12:26 localhost kernel: audit(1137647546.130:0): avc: denied { read } for pid=4093 exe=/usr/sbin/httpd
Jan 18 21:12:26 localhost kernel:


It occurs every time when I open any page with graphs on it.
farpost
Posts: 6
Joined: Mon Jan 16, 2006 3:24 am

Post by farpost »

Solved that by turning SELinux off.
The system is being updated automatically with yum and I guess the policy was changed in some update...
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Doh....

SELinux once again cause some unneeded pain.

Honestly, I haven't had time to write up a policy so that cacti will work with SELinux. Until then I suggest you disable it or figure out what items you need to add/alter to make it work.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
Burke
Posts: 42
Joined: Tue Nov 05, 2002 7:22 am
Location: Virginia, USA
Contact:

Post by Burke »

That SELinux nailed me too :( Not only are my graphs screwed right now, but my AWStats wasn't displaying the web interface properly. I was able to take care of the AWStats by running:

Code: Select all

chcon -R -h -t httpd_sys_content_t /path/to/my/files
However, that doesn't appear to help my cacti graphs.
Burke - MCP+I, MCSE, MCSD, CNE, CCA, CCNA, LPIC-1
[url=http://www.technicalvalues.com]My Website[/url] ::[url=http://www.technicalvalues.net]Domain Registrations, SSL Certs, and Hosting[/url]
farpost
Posts: 6
Joined: Mon Jan 16, 2006 3:24 am

Post by farpost »

Burke wrote:That SELinux nailed me too :( Not only are my graphs screwed right now, but my AWStats wasn't displaying the web interface properly. I was able to take care of the AWStats by running:

Code: Select all

chcon -R -h -t httpd_sys_content_t /path/to/my/files
However, that doesn't appear to help my cacti graphs.
you can turn off selinux at all (/etc/selinux/config), or check server log for objects these selinux blocking from cacti access. It would be great if someone post here selinux policy for cacti.
User avatar
Burke
Posts: 42
Joined: Tue Nov 05, 2002 7:22 am
Location: Virginia, USA
Contact:

Post by Burke »

farpost wrote:
Burke wrote:That SELinux nailed me too :( Not only are my graphs screwed right now, but my AWStats wasn't displaying the web interface properly. I was able to take care of the AWStats by running:

Code: Select all

chcon -R -h -t httpd_sys_content_t /path/to/my/files
However, that doesn't appear to help my cacti graphs.
you can turn off selinux at all (/etc/selinux/config), or check server log for objects these selinux blocking from cacti access. It would be great if someone post here selinux policy for cacti.
I just followed the steps from mshook in this post:http://forums.cacti.net/viewtopic.php?t=7759

I now have my AWstats and Cacti working just fine without disabling SELinux ;)
Burke - MCP+I, MCSE, MCSD, CNE, CCA, CCNA, LPIC-1
[url=http://www.technicalvalues.com]My Website[/url] ::[url=http://www.technicalvalues.net]Domain Registrations, SSL Certs, and Hosting[/url]
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Yep, it can be done.. :)
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests