Bits In/Out not generating graphs other data queries work

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

Moderators: Developers, Moderators

Post Reply
incudie
Posts: 21
Joined: Thu Mar 06, 2008 12:03 pm

Bits In/Out not generating graphs other data queries work

Post by incudie »

Hello All,

I (believe) I did something to break my Cacti box but I'm not sure what.

When adding new devices and setting of graphs for "SNMP - Interface Statistics - Bits Per Second In/Out" graphs are not being created, however using something like Bytes Per Second In/Out works just fine.

Looking at the Cacti Log I see,

Code: Select all

03/21/2008 08:17:19 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select thold_data.cdef, thold_data.rra_id, thold_data.data_id, thold_data.lastread, thold_data.oldvalue, data_template_rrd.data_source_name as name, data_template_rrd.data_source_type_id from thold_data LEFT JOIN data_template_rrd on (data_template_rrd.id = thold_data.data_id) WHERE data_template_rrd.data_source_name != '' AND "
I have been following NaNs guide but am not sure where to check at this point if the SQL query is failing.

Any guesses where I could check next?

Thanks,


Copying and pasting the query into the mysql manager will not let me execute the command.

Code: Select all

mysql> use cacti
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select thold_data.cdef, thold_data.rra_id, thold_data.data_id, thold_data.lastread, thold_data.oldvalue, data_template_rrd.data_source_name as name, data_template_rrd.data_source_type_id from thold_data LEFT JOIN data_template_rrd on (data_template_rrd.id = thold_data.data_id) WHERE data_template_rrd.data_source_name != '' AND 
    -> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
mysql> select thold_data.cdef, thold_data.rra_id, thold_data.data_id, thold_data.lastread, thold_data.oldvalue, data_template_rrd.data_source_name as name, data_template_rrd.data_source_type_id from thold_data LEFT JOIN data_template_rrd on (data_template_rrd.id = thold_data.data_id) WHERE data_template_rrd.data_source_name != '';
Empty set (0.00 sec)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This is an error with the thold plugin only.
Please report at http://www.cactiusers.org
Reinhard
incudie
Posts: 21
Joined: Thu Mar 06, 2008 12:03 pm

Post by incudie »

Wow I feel silly.

I was messing with thold a while back so I'm sure that was why that error came up... (I am not using it at the moment so I just went a head and disabled it).

I have been trying to get the bits per second to generate graphs but have been unsuccessful. I copied a new "interface.xml" into my snmp_queries folder but that did not fix the problem (after deleting and readding a device). Whats weird is, one device that I added a long time ago, still has current and up to date data for bits per second. It is only new graphs that I am having this probblem with. Bytes per second are also working just fine (with everything).
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

So back to the NaNs Guide. Is the rrd file in place? What does Graph Management show in DEBUG mode and stuff
Reinhard
incudie
Posts: 21
Joined: Thu Mar 06, 2008 12:03 pm

Graph Management

Post by incudie »

So it looks like I am getting an SNMP response but no rrd graph is being generated.

Code: Select all

wnrg@WNRG-MONITOR:/usr/share/cacti$ cat log/cacti.log |grep tims
03/24/2008 08:34:12 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_traffic_in_185.rrd --template traffic_out:traffic_in 1206372851:1290931391:4076319889
03/24/2008 08:34:12 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_traffic_in_187.rrd --template traffic_in:traffic_out 1206372851:3302507937:3969350056
03/24/2008 08:34:13 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_round_trip_184.rrd --template round_trip:packet_loss 1206372851:92.0500:20
I never seen an "rrdtool update" entry.

Code: Select all

-rw-r--r-- 1 www-data www-data  47840 2008-03-21 12:11 tims_download_depot_-_oxnard_-_tz190w_open_files_142.rrd
-rw-r--r-- 1 www-data www-data  47840 2008-03-24 08:43 tims_download_depot_-_oxnard_-_tz190w_open_files_183.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-21 12:13 tims_download_depot_-_oxnard_-_tz190w_round_trip_143.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-24 08:46 tims_download_depot_-_oxnard_-_tz190w_round_trip_184.rrd
-rw-r--r-- 1 www-data www-data  56224 2008-03-21 12:13 tims_download_depot_-_oxnard_-_tz190w_sonicwall_connects_139.rrd
-rw-r--r-- 1 www-data www-data  56224 2008-03-24 08:45 tims_download_depot_-_oxnard_-_tz190w_sonicwall_connects_180.rrd
-rw-r--r-- 1 www-data www-data  56224 2008-03-21 12:09 tims_download_depot_-_oxnard_-_tz190w_sonicwall_cpu_140.rrd
-rw-r--r-- 1 www-data www-data  56224 2008-03-24 08:46 tims_download_depot_-_oxnard_-_tz190w_sonicwall_cpu_181.rrd
-rw-r--r-- 1 www-data www-data  56224 2008-03-21 12:10 tims_download_depot_-_oxnard_-_tz190w_sonicwall_mem_141.rrd
-rw-r--r-- 1 www-data www-data  56224 2008-03-24 08:42 tims_download_depot_-_oxnard_-_tz190w_sonicwall_mem_182.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-21 11:58 tims_download_depot_-_oxnard_-_tz190w_traffic_in_144.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-21 11:58 tims_download_depot_-_oxnard_-_tz190w_traffic_in_146.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-21 11:58 tims_download_depot_-_oxnard_-_tz190w_traffic_in_148.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-21 11:58 tims_download_depot_-_oxnard_-_tz190w_traffic_in_150.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-21 12:13 tims_download_depot_-_oxnard_-_tz190w_traffic_in_152.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-21 12:13 tims_download_depot_-_oxnard_-_tz190w_traffic_in_153.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-21 12:13 tims_download_depot_-_oxnard_-_tz190w_traffic_in_154.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-21 12:13 tims_download_depot_-_oxnard_-_tz190w_traffic_in_155.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-21 11:58 tims_download_depot_-_oxnard_-_tz190w_traffic_in_170.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-21 11:58 tims_download_depot_-_oxnard_-_tz190w_traffic_in_172.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-21 11:58 tims_download_depot_-_oxnard_-_tz190w_traffic_in_174.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-21 11:58 tims_download_depot_-_oxnard_-_tz190w_traffic_in_176.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-21 12:13 tims_download_depot_-_oxnard_-_tz190w_traffic_in_178.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-24 08:47 tims_download_depot_-_oxnard_-_tz190w_traffic_in_185.rrd
-rw-r--r-- 1 www-data www-data 111208 2008-03-24 08:47 tims_download_depot_-_oxnard_-_tz190w_traffic_in_187.rrd
Here is the debug output:

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title="Tims Download Depot - Oxnard - TZ190W - Traffic - 96.229.108.203 (WAN (WAN))" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_traffic_in_185.rrd":traffic_in:AVERAGE \
DEF:b="/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_traffic_in_185.rrd":traffic_in:MAX \
DEF:c="/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_traffic_in_185.rrd":traffic_out:AVERAGE \
DEF:d="/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_traffic_in_185.rrd":traffic_out:MAX \
DEF:e="/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_intmacreceiveerr_186.rrd":AlignmentErrors:AVERAGE \
DEF:f="/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_intmacreceiveerr_186.rrd":CarrierSenseErrors:AVERAGE \
DEF:g="/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_intmacreceiveerr_186.rrd":DeferredTrans:AVERAGE \
DEF:h="/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_intmacreceiveerr_186.rrd":ExcessiveCollision:AVERAGE \
DEF:i="/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_intmacreceiveerr_186.rrd":FCSErrors:AVERAGE \
DEF:j="/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_intmacreceiveerr_186.rrd":FrameTooLongs:AVERAGE \
DEF:ba="/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_intmacreceiveerr_186.rrd":MultipleCollFrames:AVERAGE \
DEF:bb="/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_intmacreceiveerr_186.rrd":SingleCollisionFra:AVERAGE \
DEF:bc="/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_intmacreceiveerr_186.rrd":SQETestErrors:AVERAGE \
DEF:bd="/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_intmacreceiveerr_186.rrd":LateCollisions:AVERAGE \
DEF:be="/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_intmacreceiveerr_186.rrd":IntMacReceiveErr:AVERAGE \
DEF:bf="/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_intmacreceiveerr_186.rrd":IntMacTransmitErr:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefd=b,8,* \
CDEF:cdefe=c,8,* \
CDEF:cdefh=d,8,* \
AREA:cdefa#00CF00FF:"Inbound"  \
GPRINT:cdefa:LAST:"                    Current\:%8.2lf%s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:cdefd: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:cdefh:MAX:"Maximum\:%8.2lf%s"  \
LINE2:e#dd0000FF:"Alignment Errors"  \
GPRINT:e:LAST:"           Current\:%8.2lf%s"  \
GPRINT:e:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:e:MAX:"Maximum\:%8.2lf%s\n"  \
LINE2:f#ffff00FF:"CarrierSenseErrors"  \
GPRINT:f:LAST:"         Current\:%8.2lf%s"  \
GPRINT:f:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:f:MAX:"Maximum\:%8.2lf%s\n"  \
LINE2:g#CDCFC4FF:"Deferred Transmissions"  \
GPRINT:g:LAST:"     Current\:%8.2lf%s"  \
GPRINT:g:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:g:MAX:"Maximum\:%8.2lf%s\n"  \
LINE2:h#000000FF:"Excessive Collisions"  \
GPRINT:h:LAST:"       Current\:%8.2lf%s"  \
GPRINT:h:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:h:MAX:"Maximum\:%8.2lf%s\n"  \
LINE2:i#FF897CFF:"FCS Errors"  \
GPRINT:i:LAST:"                 Current\:%8.2lf%s"  \
GPRINT:i:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:i:MAX:"Maximum\:%8.2lf%s\n"  \
LINE2:j#CCBB00FF:"FrameTooLongs"  \
GPRINT:j:LAST:"              Current\:%8.2lf%s"  \
GPRINT:j:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:j:MAX:"Maximum\:%8.2lf%s\n"  \
LINE2:ba#008A77FF:"Multiple Collision Frames"  \
GPRINT:ba:LAST:"  Current\:%8.2lf%s"  \
GPRINT:ba:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:ba:MAX:"Maximum\:%8.2lf%s\n"  \
LINE2:bb#00A0C1FF:"Single Collision Frames"  \
GPRINT:bb:LAST:"    Current\:%8.2lf%s"  \
GPRINT:bb:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:bb:MAX:"Maximum\:%8.2lf%s\n"  \
LINE2:bc#0000FFFF:"SQE Test Errors"  \
GPRINT:bc:LAST:"            Current\:%8.2lf%s"  \
GPRINT:bc:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:bc:MAX:"Maximum\:%8.2lf%s\n"  \
LINE2:bd#FAFD9EFF:"Late Collisons"  \
GPRINT:bd:LAST:"             Current\:%8.2lf%s"  \
GPRINT:bd:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:bd:MAX:"Maximum\:%8.2lf%s\n"  \
LINE2:be#aaaa00FF:"Internal MACReceive Errors"  \
GPRINT:be:LAST:" Current\:%8.2lf%s"  \
GPRINT:be:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:be:MAX:"Maximum\:%8.2lf%s\n"  \
LINE2:bf#D8ACE0FF:"Internal MACTransmit Errors"  \
GPRINT:bf:LAST:"Current\:%8.2lf%s"  \
GPRINT:bf:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:bf:MAX:"Maximum\:%8.2lf%s\n" 

RRDTool Says:

ERROR: opening '/usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_intmacreceiveerr_186.rrd': No such file or directory

My graph management shows the following:
Attachments
Screenshot2.png
Screenshot2.png (28.82 KiB) Viewed 3110 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Graph Management

Post by gandalf »

incudie wrote:So it looks like I am getting an SNMP response but no rrd graph is being generated.

Code: Select all

wnrg@WNRG-MONITOR:/usr/share/cacti$ cat log/cacti.log |grep tims
03/24/2008 08:34:12 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_traffic_in_185.rrd --template traffic_out:traffic_in 1206372851:1290931391:4076319889
03/24/2008 08:34:12 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_traffic_in_187.rrd --template traffic_in:traffic_out 1206372851:3302507937:3969350056
03/24/2008 08:34:13 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_round_trip_184.rrd --template round_trip:packet_loss 1206372851:92.0500:20
I never seen an "rrdtool update" entry.
But the above IS the requested rrdtool update!
Your next lines show, that only www-data is allowed to update the rrd files. Is this the user than runs the poller from crontab?
Reinhard
incudie
Posts: 21
Joined: Thu Mar 06, 2008 12:03 pm

Post by incudie »

Yes, www-data.

Code: Select all

*/1 * * * * www-data php /usr/share/cacti/poller.php > /dev/null 2>&1
Wow your right, I must just be confusing myself then. (the RRAs being there I mean).

In the RRA folder the last ID I see for traffic is 187. In the debug I see output for it trying to create more RRDs (...tz190s_intmacreceiverr_188.rrd).

Would that mean it is dying right after it creates the 187 graph? (sorry if It sounds like I'm pulling things out of my ass, just trying to understand better).

Thanks[/code]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

incudie wrote:Yes, www-data.

Code: Select all

*/1 * * * * www-data php /usr/share/cacti/poller.php > /dev/null 2>&1
Fine then.
In the RRA folder the last ID I see for traffic is 187. In the debug I see output for it trying to create more RRDs (...tz190s_intmacreceiverr_188.rrd).
That's not part of the log you've posted. Do you find "rrdtool create" in there? If so, please login as www-data and run those create statements manually to see the results
Reinhard
incudie
Posts: 21
Joined: Thu Mar 06, 2008 12:03 pm

Post by incudie »

In the log, I am able to see the rrdtool updates like you said. When running them as www-data I get:

Code: Select all

$ /usr/bin/rrdtool update /usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_traffic_in_185.rrd --template traffic_in:traffic_out 1206459877:2777689429:1729518664
ERROR: illegal attempt to update using time 1206459877 when last update time is 1206459877 (minimum one second step)
$ /usr/bin/rrdtool update /usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_traffic_in_185.rrd --template traffic_in:traffic_out 1206459877:2777689429:1729518664
ERROR: illegal attempt to update using time 1206459877 when last update time is 1206459877 (minimum one second step)
$ /usr/bin/rrdtool update /usr/share/cacti/rra/tims_download_depot_-_oxnard_-_tz190w_sonicwall_connects_180.rrd --template sonicwall_connects 1206459934:485
ERROR: illegal attempt to update using time 1206459934 when last update time is 1206459934 (minimum one second step)
$ 
Same thing when I run as root.

*Edit*
Also just checked the time on my system and it is correct
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

In most cases, this is an example of the "double poller" issue covered in my NaN HowTo (see second link of my sig)
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests