Problems measuring bandwidth/traffic (local osx, remote fc3)

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

Moderators: Developers, Moderators

Post Reply
gnijholt
Posts: 4
Joined: Fri Mar 30, 2007 6:59 am

Problems measuring bandwidth/traffic (local osx, remote fc3)

Post by gnijholt »

Hello,

I've just installed Cacti 0.8.6j on OS X Server 10.4.8 with Apache 2.2 and PHP4.
I want to monitor a remote server running Fedora Core 3. (especially bandwidth usage)

The /etc/snmp/snmpd.conf file in FC3 says:

Code: Select all

syslocation Something
syscontact "root@someone.com"

# auth
rocommunity public

# disk monitoring
disk /
(I wanted to start out with a setup as simple as possible)

In Cacti, I've added the Fedora machine to the machines.
RRDTool on the local machine is set to 1.2.19, NET-SNMP is version 5.

When I add a "Unix - Load Average" template, it works instantly, and the graphs appear in the rra/ directory and also in the Cacti views.

Now in Graph Management, I add a template called "Interface (Traffic - bytes/sec, Total Bandwidth).

I turn on graphics debugmode and get the following:

Code: Select all

RRDTool Command:
/opt/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="xxxxx (xxxxxxxxxxx) - Traffic" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes per second" \
--slope-mode \
AREA:#00CF00:"Inbound"  \
GPRINT::LAST:" Current\:%8.2lf %s"  \
GPRINT::AVERAGE:"Average\:%8.2lf %s"  \
GPRINT::MAX:"Maximum\:%8.2lf %s"  \
COMMENT:"Total In\:  0 bytes\n"  \
LINE1:#002A97:"Outbound"  \
GPRINT::LAST:"Current\:%8.2lf %s"  \
GPRINT::AVERAGE:"Average\:%8.2lf %s"  \
GPRINT::MAX:"Maximum\:%8.2lf %s"  \
COMMENT:"Total Out\: 0 bytes" 
RRDTool Says:
ERROR: parameter '#00CF00' does not represent a number in line AREA:#00CF00:Inbound
Where do I need to look in order to fix this?
Various searches through this forum and Google Groups gave only limited results and so far I'm stuck.

Thanks in advance!

Gijs Nijholt
The Netherlands
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The graph statement is broken because DEF statements are missing. Plese select that Graph from Graph Management and post a screenshot (I suppose, all graph items are set to "NONE")
Reinhard
gnijholt
Posts: 4
Joined: Fri Mar 30, 2007 6:59 am

Post by gnijholt »

Yep, you're right, those are set to None. (i'm definitely a newbie to cacti)

I suppose I left them unselected because they seemed optional and irrelevant to the graph I was planning to generate..

The options are:
Load Average (1 min)
Load Average (5 min)
Load Average (10 min)
Ping Host (Ping)

Nothing about traffic i/o..
Attachments
graph management screenshot
graph management screenshot
cacti_graphmanagement.jpg (214.77 KiB) Viewed 5152 times
gnijholt
Posts: 4
Joined: Fri Mar 30, 2007 6:59 am

Post by gnijholt »

Hmm ok, I did a couple of things wrong..
I get one step closer now, but it gives the following error message upon creation:

RRDTool Command:

Code: Select all

/opt/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Available Disk Space" \
--rigid \
--base=1024 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes" \
--slope-mode \
DEF:a="/usr/local/apache2/htdocs/cacti/rra/hostname_hdd_free_11.rrd":hdd_used:AVERAGE \
DEF:b="/usr/local/apache2/htdocs/cacti/rra/hostname_hdd_free_11.rrd":hdd_free:AVERAGE \
CDEF:cdefa=a,1024,* \
CDEF:cdefe=b,1024,* \
CDEF:cdefi=TIME,1175262371,GT,a,a,UN,0,a,IF,IF,TIME,1175262371,GT,b,b,UN,0,b,IF,IF,+,1024,* \
AREA:cdefa#F51D30:"Used"  \
GPRINT:cdefa:LAST:"     Current\:%8.2lf %s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:cdefe#002A97:"Available":STACK \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n"  \
LINE2:cdefi#000000:"Total"  \
GPRINT:cdefi:LAST:"    Current\:%8.2lf %s"  \
GPRINT:cdefi:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefi:MAX:"Maximum\:%8.2lf %s\n" 
RRDTool Says:

Code: Select all

ERROR: reading the cookie off /usr/local/apache2/htdocs/cacti/rra/hostname_hdd_free_11.rrd faild
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Did you apply correct permissions for rra folder?
Reinhard
gnijholt
Posts: 4
Joined: Fri Mar 30, 2007 6:59 am

Post by gnijholt »

It was indeed a permission issue. Now it's all working perfectly, thanks for the help!
VanDaMe
Posts: 7
Joined: Wed Aug 27, 2008 10:35 pm

Post by VanDaMe »

gnijholt wrote:Hmm ok, I did a couple of things wrong..
I get one step closer now, but it gives the following error message upon creation:

RRDTool Command:

Code: Select all

/opt/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Available Disk Space" \
--rigid \
--base=1024 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes" \
--slope-mode \
DEF:a="/usr/local/apache2/htdocs/cacti/rra/hostname_hdd_free_11.rrd":hdd_used:AVERAGE \
DEF:b="/usr/local/apache2/htdocs/cacti/rra/hostname_hdd_free_11.rrd":hdd_free:AVERAGE \
CDEF:cdefa=a,1024,* \
CDEF:cdefe=b,1024,* \
CDEF:cdefi=TIME,1175262371,GT,a,a,UN,0,a,IF,IF,TIME,1175262371,GT,b,b,UN,0,b,IF,IF,+,1024,* \
AREA:cdefa#F51D30:"Used"  \
GPRINT:cdefa:LAST:"     Current\:%8.2lf %s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:cdefe#002A97:"Available":STACK \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n"  \
LINE2:cdefi#000000:"Total"  \
GPRINT:cdefi:LAST:"    Current\:%8.2lf %s"  \
GPRINT:cdefi:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefi:MAX:"Maximum\:%8.2lf %s\n" 
RRDTool Says:

Code: Select all

ERROR: reading the cookie off /usr/local/apache2/htdocs/cacti/rra/hostname_hdd_free_11.rrd faild
How can you get this closer? Because I have the same problem
kukareki
Posts: 1
Joined: Mon Sep 22, 2008 6:20 pm

Post by kukareki »

I think I've found a solution...

there is an additional slash :lol: :lol: :lol:

1. go to MANAGEMENT - > Data sources
2. choose the data source that is not working
3. Turn ON "Data Source Debug Modе"
4. here is the output of debug mode :

Data Source Debug

/usr/bin/rrdtool create \
/usr/share/cacti/rra/localhost_traffic_in_28.rrd \
--step 300 \
DS:traffic_in:COUNTER:600:0:100000000 \
DS:traffic_out:COUNTER:600:0:100000000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \ <- this is the problem :D



if we paste the output from debug in bash BUT without this backslash
the rrd file will be created and everything will be OK.


This is the big in that version. I don't know where is the "bug list" :) but i hope someone from Cacti's team will see this post and will fix the error.


It somebody has questions I'll try to help :)

Now here is 2:35 AM and i'll go to sleeeeeep.

Sorry for my english :) I'm Bulgarian 8)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Is is already known but not yet considered as a bug. It works on all platforms I know of. Please tell us your system specifics
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest