Uptime graph shows broken link image, other graphs are fine

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

Moderators: Developers, Moderators

Post Reply
sarakline
Posts: 9
Joined: Tue Jul 12, 2011 6:21 pm

Uptime graph shows broken link image, other graphs are fine

Post by sarakline »

We are running Cacti .8.7e and all of our graphs look great except for the uptime graph. It displays a broken image tile instead of a graph. Any thoughts? has anyone else ran into this? We are running CentOS 5.2.
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Uptime graph shows broken link image, other graphs are f

Post by noname »

1) What graph template are you using for the uptime graph?
2) What OID is specified in the data template? Please perform snmpget with that OID to target host.
sarakline
Posts: 9
Joined: Tue Jul 12, 2011 6:21 pm

Re: Uptime graph shows broken link image, other graphs are f

Post by sarakline »

1. ucd15 uptime
2. .1.3.6.1.2.1.25.1.1.0, when we performed snmpget on the host we got a correct return of 24 days, 5 hrs and 10 minutes.
Thanks for helping!
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Uptime graph shows broken link image, other graphs are f

Post by noname »

>> ucd15 uptime

Is this?
- http://forums.cacti.net/viewtopic.php?f=12&t=11634

What do you see when you did as follows?

a) Graph Management -> "xxxx - Uptime" -> "*Turn On Graph Debug Mode."
b) Data Sources -> "xxxx - ucd_hrSystemUptime" -> "*Turn On Data Source Debug Mode."
sarakline
Posts: 9
Joined: Tue Jul 12, 2011 6:21 pm

Re: Uptime graph shows broken link image, other graphs are f

Post by sarakline »

We get a) ERROR: the RRD does not contain an RRA matching the chosen CF

b) Did not return an error, just this:
/usr/bin/rrdtool create \
/var/www/cacti/rra/SYSNAME_ucd_hrsystemuptime_1727.rrd \
--step 300 \
DS:ucd_hrSystemUptime:GAUGE:600:0:U \
RRA:AVERAGE:0.5:1:500 \
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:500 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Uptime graph shows broken link image, other graphs are f

Post by noname »

sarakline wrote:We get a) ERROR: the RRD does not contain an RRA matching the chosen CF
Post whole output, please.
sarakline
Posts: 9
Joined: Tue Jul 12, 2011 6:21 pm

Re: Uptime graph shows broken link image, other graphs are f

Post by sarakline »

Here is the whole output:
RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="coast - Uptime" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Days" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/coast_ucd_hrsystemuptime_1727.rrd":ucd_hrSystemUptime:LAST \
CDEF:cdefa=a,DUP,8640000,%,-,8640000,/ \
CDEF:cdefc=a,8640000,%,DUP,360000,%,-,360000,/ \
CDEF:cdefd=a,360000,%,DUP,6000,%,-,6000,/ \
AREA:cdefa#4668E4FF:"Uptime" \
GPRINT:cdefa:LAST:"Days \:%3.0lf" \
GPRINT:cdefc:LAST:"Hours \:%2.0lf" \
GPRINT:cdefd:LAST:"Minutes\:%2.0lf"
RRDTool Says:

ERROR: the RRD does not contain an RRA matching the chosen CF
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Uptime graph shows broken link image, other graphs are f

Post by noname »

This datasource was created as follows. It contains "AVERAGE" and "MAX" CF.
sarakline wrote: /usr/bin/rrdtool create \
/var/www/cacti/rra/SYSNAME_ucd_hrsystemuptime_1727.rrd \
--step 300 \
DS:ucd_hrSystemUptime:GAUGE:600:0:U \
RRA:AVERAGE:0.5:1:500 \
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:500 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
..but graph template requires "LAST" CF for drawing graph.
sarakline wrote:/usr/bin/rrdtool graph - \
...
DEF:a="/var/www/cacti/rra/SYSNAME_ucd_hrsystemuptime_1727.rrd":ucd_hrSystemUptime:LAST \
...
GPRINT:cdefa:LAST:"Days \:%3.0lf" \
GPRINT:cdefc:LAST:"Hours \:%2.0lf" \
GPRINT:cdefd:LAST:"Minutes\:%2.0lf"

RRDTool Says:

ERROR: the RRD does not contain an RRA matching the chosen CF
You can add that CF manually.
(See also: http://forums.cacti.net/viewtopic.php?p=201196#p201196)

1) Data Sources -> RRAs
2) Add "LAST" CF for each RRAs
Image

3) On server, delete the RRD file of this issue if existed (SYSNAME_ucd_hrsystemuptime_1727.rrd)
4) Wait until next polling, then check whether if RRD file with same name have been created
5) If ok, wait for 1-2 polling (5-10 minutes) further, then check graph

NOTICE:
After adding new CF...
  • It affects datasources (RRD files) newly created from this time
  • It doesn't affect existing datasources
  • New RRD file is about 50 percent larger than the former one in size (2 CFs -> 3 CFs)
EDIT: supplemented descriptions (in purple color)
Last edited by noname on Wed Jul 27, 2011 11:16 am, edited 1 time in total.
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Uptime graph shows broken link image, other graphs are f

Post by noname »

BTW,

this template "UNIX Template Set for Cacti: HP-UX, Solaris, Linux" will replace some existing graph templates & data queries.
  • Graph Templates
  • "Interface - Traffic (bits/sec)" -> "ucd 00 Lan"
  • "Host MIB - Available Disk Space" -> "ucd 90 Filesystems"
  • Data Queries
  • "SNMP - Interface Statistics" -> "ucd 00 Lan"
  • "SNMP - Get Mounted Partitions" -> "ucd 10 fs"
It uses the same hash code as existing one -- probably created by modifying default template.
Please use with attention (especially when you want to delete that template).
sarakline
Posts: 9
Joined: Tue Jul 12, 2011 6:21 pm

Re: Uptime graph shows broken link image, other graphs are f

Post by sarakline »

Where would the rrd file be stored at? I am seeing where I can delete the data source but I don't think that is what you are wanting me to do. Everything would have been installed with defaults so the path should be default. Do I delete the rrd file within the software or out at the terminal? If so what is the path?
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Uptime graph shows broken link image, other graphs are f

Post by noname »

Ah, sorry. I supplemented some descriptions to the above post.

You should delete "/var/www/cacti/rra/SYSNAME_ucd_hrsystemuptime_1727.rrd" if it existed.
Alternatively, delete the existing graph settings (broken) and datasource settings (RRD file isn't created actually) in Cacti GUI, then re-create it.
sarakline
Posts: 9
Joined: Tue Jul 12, 2011 6:21 pm

Re: Uptime graph shows broken link image, other graphs are f

Post by sarakline »

That has fixed 4 of the five. The four that are fixed are the ones where I just removed the rrd file. The one that is not working is from earlier troubleshooting efforts. The data source was deleted then recreated. I have removed its rrd files but the graph will still not come up. Did something possibly get messed up when the data source was deleted?
sarakline
Posts: 9
Joined: Tue Jul 12, 2011 6:21 pm

Re: Uptime graph shows broken link image, other graphs are f

Post by sarakline »

I figured out what happened. When the data source was recreated, it was no longer linked to the template as the old one had been. All I had to do was add it back in and everything is working great. Thank you so much for your help!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests