problem with graph

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

Moderators: Developers, Moderators

Post Reply
Solegane
Posts: 7
Joined: Mon Apr 16, 2012 3:47 am

problem with graph

Post by Solegane »

Hi everybody,

i have a problem with the creation of my graph on cacti :
RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='Switch 3550 - Traffic - Gi0/2' \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label='bits per second' \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a="/var/www/cacti/rra/switch_3550_traffic_in_24.rrd":"traffic_in":AVERAGE \
DEF:b="/var/www/cacti/rra/switch_3550_traffic_in_24.rrd":"traffic_out":AVERAGE \
CDEF:cdefa='a,8,*' \
CDEF:cdefe='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\n" \
LINE1:cdefe#002A97FF:"Outbound" \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n"

RRDTool Says:

ERROR: opening '/var/www/cacti/rra/switch_3550_traffic_in_24.rrd': No such file or directory

i had the same problem yesterday, but I have resolved them by changing the rrdtool version in 1.2.x and make apache the owner of /var/www/cacti/rra, anyone has an idea?
thank you to help me and sorry for my bad english.

Edit : On Console -> Utilities -> clear poller cache i have this
Switch 3550 - Traffic - Gi0/2 SNMP Version: 2, Community: public, OID: X
RRD: /var/www/cacti/rra/switch_3550_traffic_in_24.rrd
Switch 3550 - Traffic - Gi0/2 SNMP Version: 2, Community: public, OID: X
RRD: /var/www/cacti/rra/switch_3550_traffic_in_24.rrd
Switch 3550 - Traffic - Gi0/3 SNMP Version: 2, Community: public, OID: X
RRD: /var/www/cacti/rra/switch_3550_traffic_in_25.rrd
Switch 3550 - Traffic - Gi0/3 SNMP Version: 2, Community: public, OID: X
RRD: /var/www/cacti/rra/switch_3550_traffic_in_25.rrd
The files are created 2 times, it's normal?
Last edited by Solegane on Thu Apr 19, 2012 3:10 am, edited 1 time in total.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: problem with graph

Post by gandalf »

Please see installation guide at 1st link of my sig to find the permissions required for ./rra directory and all files
R.
Solegane
Posts: 7
Joined: Mon Apr 16, 2012 3:47 am

Re: problem with graph

Post by Solegane »

I have already read it, but i don't understand this step :
shell> chown -R cactiuser rra/ log/
We have never created a user for cacti before.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: problem with graph

Post by gandalf »

In case you used rpm/yum/apt-get to install, they did it (should have done it) for you.
cactiuser is the user running the poller.php from crontab. This user will create (and update) all rrd files. So it needs appropriate permissions
R.
Solegane
Posts: 7
Joined: Mon Apr 16, 2012 3:47 am

Re: problem with graph

Post by Solegane »

I have resolved the problem with apache in user of chown.
I have install by yum but i haven't got any cactiuser, cactiuser is just in mysql.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: problem with graph

Post by gandalf »

Find the userid in the crontab which runs the cacti poller. Thismay be any of
- /etc/crontab
- /etc/cron.d/<something>
- user crontab
(see e.g. /var/log/cron.log to find out)
R.
Solegane
Posts: 7
Joined: Mon Apr 16, 2012 3:47 am

Re: problem with graph

Post by Solegane »

the cacti poller is run by root
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: problem with graph

Post by gandalf »

Solegane wrote:the cacti poller is run by root
This is NOT recommended!
For our case, this tells us that file permissions should not be an issue. So we have to turn to "downed device detection". See 2nd link of my sig for this
R.
Solegane
Posts: 7
Joined: Mon Apr 16, 2012 3:47 am

Re: problem with graph

Post by Solegane »

For the moment, I use cacti on a test computer,so I will change when i will install cacti on the server.
Normally a cacti user will be created at the installation of cacti? Can i work with the user apache for cron?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: problem with graph

Post by gandalf »

The recommended way of doing things (from our point of view) is described by the installation guide at 1st link of my sig. We know and are aware of the fact, that different distributions have their own understanding. E.g. debian type distros love using the web server's user. This may involve more changes than described in our installation guide and are beyond our scope.
At a minimum requirement, do NOT use root!
R.
Solegane
Posts: 7
Joined: Mon Apr 16, 2012 3:47 am

Re: problem with graph

Post by Solegane »

okay, thank you a lot to help me, for information the distribution here is FAN.

EDIT: all of my problems are resolved : I have made a yum remove cacti, and i have deleted /var/www/cacti
after that I have reinstalled cacti and now i have an user : cacti.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: problem with graph

Post by gandalf »

I'm happy that you're back to the game now :wink:
R.
cacitee
Posts: 1
Joined: Wed Jan 22, 2014 3:11 am

Re: problem with graph

Post by cacitee »

i meet the same problem recently and i can't solve it. thanks a lot. so happy you are back to game.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests