Hello,
I recently notices that all our graphs do only show total bandwith for one direction (see screenshot).
After a bit of debugging I discovered the reason:
rrdtool (1.2.11-0.5) does not print the comment when it contains "\n" (new line).
When I run rrdtool manually obmitting the \n the comments gets printed correctly (withut new line, of course).
Is this a known issue?
What can be done?
Cacti is configured for rrdtool 1.2 .
Total Bandwith broken?
Moderators: Developers, Moderators
Total Bandwith broken?
- Attachments
-
- graph_image.png (32.83 KiB) Viewed 1478 times
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Total Bandwith broken?
Hmm ... And Settings->Paths is set correctly? Would bet this is a version issue if you had not already verified this. Please click on the wrench next to the graph and post the whole rrdtool graph statementfgk wrote:rrdtool (1.2.11-0.5) does not print the comment when it contains "\n" (new line).
...
Cacti is configured for rrdtool 1.2 .
Reinhard
Thanks for your reply.
It's a rrdtools issue, I tested it manually on the command line.
rrdtool cuts the comment if it contains \n .
The following graph has been creating with this command line:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="3com5 - Traffic - RMON Port 08 on/108" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
DEF:a="/usr/share/cacti/site/rra/3com5_traffic_in_288.rrd":traffic_in:AVERAGE \
DEF:b="/usr/share/cacti/site/rra/3com5_traffic_in_288.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdeff=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" \
COMMENT:"Total In\: 576.23 MB\n" \
LINE1:cdeff#002A97:"Outbound" \
GPRINT:cdeff:LAST:"Current\:%8.2lf %s" \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total Out\: 547.38 MB"
http://traffic.velia.net/test.png
When I obmit the \n, everything works fine:
/usr/bin/rrdtool graph - --imgformat=PNG --start=-86400 --end=-300 --title="3com5 - Traffic - RMON Port 08 on/108" --rigid --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit=0 --vertical-label="bits per second" --slope-mode DEF:a="/usr/share/cacti/site/rra/3com5_traffic_in_288.rrd":traffic_in:AVERAGE DEF:b="/usr/share/cacti/site/rra/3com5_traffic_in_288.rrd":traffic_out:AVERAGE CDEF:cdefa=a,8,* CDEF:cdeff=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" COMMENT:"Total In\: 576.23 MB" LINE1:cdeff#002A97:"Outbound" GPRINT:cdeff:LAST:"Current\:%8.2lf %s" GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s" GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s" COMMENT:"Total Out\: 547.38 MB" > /var/www/traffic.velia.net/test2.png
http://traffic.velia.net/test2.png
It's a rrdtools issue, I tested it manually on the command line.
rrdtool cuts the comment if it contains \n .
The following graph has been creating with this command line:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="3com5 - Traffic - RMON Port 08 on/108" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
DEF:a="/usr/share/cacti/site/rra/3com5_traffic_in_288.rrd":traffic_in:AVERAGE \
DEF:b="/usr/share/cacti/site/rra/3com5_traffic_in_288.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdeff=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" \
COMMENT:"Total In\: 576.23 MB\n" \
LINE1:cdeff#002A97:"Outbound" \
GPRINT:cdeff:LAST:"Current\:%8.2lf %s" \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total Out\: 547.38 MB"
http://traffic.velia.net/test.png
When I obmit the \n, everything works fine:
/usr/bin/rrdtool graph - --imgformat=PNG --start=-86400 --end=-300 --title="3com5 - Traffic - RMON Port 08 on/108" --rigid --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit=0 --vertical-label="bits per second" --slope-mode DEF:a="/usr/share/cacti/site/rra/3com5_traffic_in_288.rrd":traffic_in:AVERAGE DEF:b="/usr/share/cacti/site/rra/3com5_traffic_in_288.rrd":traffic_out:AVERAGE CDEF:cdefa=a,8,* CDEF:cdeff=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" COMMENT:"Total In\: 576.23 MB" LINE1:cdeff#002A97:"Outbound" GPRINT:cdeff:LAST:"Current\:%8.2lf %s" GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s" GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s" COMMENT:"Total Out\: 547.38 MB" > /var/www/traffic.velia.net/test2.png
http://traffic.velia.net/test2.png
I've seen this on a few of my graphs too. Decreasing the font size or increasing the graph width so all the text shows is another option.
Probably a rrdtool bug.
Probably a rrdtool bug.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
I believe so since when you manually tested the graph command outside cacti w/o the \n, it worked. With the \n the graph is broken, right? Sounds like a bug to me. Post the bug details on the rrdtool tracker.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Who is online
Users browsing this forum: No registered users and 1 guest