Graph templates for Squid

Templates, scripts for templates, scripts and requests for templates.

Moderators: Moderators, Developers

Post Reply
Author
Message
ccoager
Posts: 11
Joined: Tue May 01, 2007 9:56 am

#46 Post by ccoager » Wed May 09, 2007 3:07 pm

@cosming

I tried your suggestion but it didn't help.

churchi
Posts: 46
Joined: Tue Oct 26, 2004 2:08 am

#47 Post by churchi » Wed May 16, 2007 6:51 am

davidred wrote:Hi All,

I get the following error with the HTTP DATA template from rrdtool and I'm a bit stumped. I tried to hunt through and find what could be causing the problem but I am a bit lacking in knowledge with rrdtool.

Any suggestions out there?

Thanks,
David
/usr/local/rrdtool-1.2.15/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="au-bne-squid - HTTP Data" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes per second" \
--slope-mode \
DEF:a="/var/www/html/cacti-0.8.6j/rra/aubnesquid_http_data_received_881.rrd":http_data_received:AVERAGE \
DEF:b="/var/www/html/cacti-0.8.6j/rra/aubnesquid_http_data_sent_883.rrd":http_data_sent:AVERAGE \
DEF:c="/var/www/html/cacti-0.8.6j/rra/aubnesquid_http_data_saved_882.rrd":http_data_saved:AVERAGE \
CDEF:cdefa=a,1024,* \
CDEF:cdefe=b,1024,* \
CDEF:cdefi=cdefa,0,EQ,0,cdefb,100,*,cdefa,/,1024,/,IF,0,110,LIMIT,TIME,1175219125,GT,a,a,UN,0,a,IF,IF,TIME,1175219125,GT,b,b,UN,0,b,IF,IF,TIME,1175219125,GT,c,c,UN,0,c,IF,IF,TIME,1175219125,GT,c,c,UN,0,c,IF,IF,+,+,+,*,1024,* \
AREA:cdefa#00CF00:"Received" \
GPRINT:cdefa:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Max\:%8.2lf %s\n" \
LINE1:cdefe#002A97:"Sent" \
GPRINT:cdefe:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Max\:%8.2lf %s\n" \
LINE1:cdefi#FF0000:"Saved" \
GPRINT:cdefi:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefi:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefi:MAX:"Max\:%8.2lf %s\n" \
LINE1:c#000000:"Saved %" \
GPRINT:c:LAST:" Current\:%8.2lf %s" \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:c:MAX:"Max\:%8.2lf %s"
RRDTool Says:

ERROR: invalid rpn expression in: cdefa,0,EQ,0,cdefb,100,*,cdefa,/,1024,/,IF,0,110,LIMIT,TIME,1175219125,GT,a,a,UN,0,a,IF,IF,TIME,1175219125,GT,b,b,UN,0,b,IF,IF,TIME,1175219125,GT,c,c,UN,0,c,IF,IF,TIME,1175219125,GT,c,c,UN,0,c,IF,IF,+,+,+,*,1024,*

hey all,

well i have just setup these graphs and i have a similar problem to the one i have quoted here.

Basically i think the CDEF string got toasted when i imported the xml file and any other re-imports of the file seem to not fix the problem. i have since just chosen the "Normal" CDEF and its graphing, however its not the correct values for the saved cache.

Can someone please screen shot or tell me how to manually setup this CDEF so i can do it on my system and apply it to the graph.
If a someone could screen shot this string/setup or write some instructions to get this CDEF working that would be fantastic.

Hope to hear from someone soon,

cheers

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

#48 Post by gandalf » Wed May 16, 2007 4:25 pm

Please try attached Host Template. Requires at least cacti-0.8.6i
Reinhard
Attachments
cacti_host_template_webcache_squid_server_snmp.xml
Import this Host Template.
If you're using non-standard RRA Definitions, please make a screenshot of them first and re-install after import
(178.03 KiB) Downloaded 3990 times

churchi
Posts: 46
Joined: Tue Oct 26, 2004 2:08 am

#49 Post by churchi » Thu May 17, 2007 12:42 am

gandalf wrote:Please try attached Host Template. Requires at least cacti-0.8.6i
Reinhard
Hi gandalf,

thank you for posting this template. at first it didn't work since it was for another squid setup. however i have found the other squid thread and it worked perfectly with the xml queries uploaded to my server.

for anyone else who wants to use the other script (which works straight out of the box) then head on over to:
http://forums.cacti.net/viewtopic.php?t=20151&view=next

That script in the link above works really well when you tunnel the squid snmp port to the normal snmp port so you can add the graphs to an existing host.

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

#50 Post by gandalf » Thu May 17, 2007 12:12 pm

churchi wrote:That script in the link above works really well when you tunnel the squid snmp port to the normal snmp port so you can add the graphs to an existing host.
Yep, you're quite right. That's exactly what we're doing here
Reinhard

ccoager
Posts: 11
Joined: Tue May 01, 2007 9:56 am

#51 Post by ccoager » Mon May 21, 2007 1:11 pm

I stumbled across SquidStats a few weeks ago and it works great. I'm going to abandon this particular graph that seems to be broken.

Solace
Posts: 1
Joined: Mon Aug 06, 2007 9:08 am

Getting it working!

#52 Post by Solace » Mon Aug 06, 2007 9:11 am

Hi,

In order to get this working remember to add the subtree to your access list. THE PROXY TO SQUID WILL NOT RETURN RESULTS WITHOUT THIS!

Thus:

view systemview included .1.3.6.1.4.1.3495.1

and

proxy -v 1 -c public x.x.x.x:3401 .1.3.6.1.4.1.3495.1

Worked for me.

scubabri
Posts: 32
Joined: Thu Jul 13, 2006 3:11 pm

request values look incorrect

#53 Post by scubabri » Tue Aug 21, 2007 8:20 am

My graphed request values look incorrect or at least a decimal place off

snmpwalk -c public -v 1 atl-proxy1:161 1.3.6.1.4.1.3495.1.3.2.1.1
SNMPv2-SMI::enterprises.3495.1.3.2.1.1.0 = Counter32: 837694
SNMPv2-SMI::enterprises.3495.1.3.2.1.1.0 = Counter32: 838145

shows 451 requests in a minute, yet my graphs show 8 - 10 requests and a max of 10 requests in a minute

any ideas why?
Attachments
graph_image.php.png
graph_image.php.png (20.1 KiB) Viewed 17961 times

scubabri
Posts: 32
Joined: Thu Jul 13, 2006 3:11 pm

#54 Post by scubabri » Tue Aug 21, 2007 9:14 am

Oh.. it looks like these are "requests per second" not per minute. Is that correct?

cbbn_net
Posts: 1
Joined: Sat Oct 08, 2005 2:29 am

#55 Post by cbbn_net » Mon Sep 10, 2007 12:51 am

gandalf wrote:Please try attached Host Template. Requires at least cacti-0.8.6i
Reinhard
Could not locate XML file. webcache_squid_median.xml and webcache_squid_core.xml

hassan1
Posts: 15
Joined: Mon Feb 12, 2007 11:55 am

#56 Post by hassan1 » Fri Nov 16, 2007 7:40 am

Thanks for writing a Squid template, I got the Graphs plotted apart from HTTP Traffic (kilobytes per second) using cacti_graph_template_squid_http_data.xml

my snmpwalk responded with
snmpwalk -v 1 -c public 160.70.x.x:3401 .1.3.6.1.4.1.3495.1.3.2.1.4

SNMPv2-SMI::enterprises.3495.1.3.2.1.4.0 = Counter32: 35596

When I turn on Cacti debug I got the following

RRDTool Command:
/usr/local/groundwork/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Rocky squid webcache - HTTP Data" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--y-grid=KB/s \
--vertical-label="bytes per second" \
--slope-mode \
DEF:a="/usr/local/groundwork/cacti/rra/rocky_squid_webcache_http_data_received_1717.rrd":http_data_received:AVERAGE \
DEF:b="/usr/local/groundwork/cacti/rra/rocky_squid_webcache_http_data_sent_1718.rrd":http_data_sent:AVERAGE \
CDEF:cdefa=a,1024,* \
CDEF:cdefe=b,1024,* \
AREA:cdefa#00FF00:"Received" \
GPRINT:cdefa:LAST:"Current%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum%8.2lf %s\n" \
LINE1:cdefe#0000FF:"Sent" \
GPRINT:cdefe:LAST:" Current%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum%8.2lf %s"

RRDTool Says:
ERROR: invalid y-grid format

I am running cacti version 0.8.6j on Suse Linux enterprise 10


Can you help? Please

hassan1
Posts: 15
Joined: Mon Feb 12, 2007 11:55 am

#57 Post by hassan1 » Fri Nov 16, 2007 5:26 pm

problem has been fixed,

the problem was fixed by

Go to "Graph templates" -> "Squid - HTTP Data " and clear the "Unit Grid Value".

bantutin2004
Posts: 2
Joined: Wed Nov 21, 2007 11:22 pm

http_data graph problem

#58 Post by bantutin2004 » Wed Nov 21, 2007 11:28 pm

good day to all, I need help rrdtool is giving me invalid rpm expression, i think it is because of the CDEF:cdefi= field, but i dont where and how to correct it. the rest of the templates works fine.

/usr/local/rrdtool-1.2.25/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Squid Proxy Server - HTTP Data" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes per second" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti-0.8.7/rra/squid_proxy_server_http_data_received_40.rrd":http_data_received:AVERAGE \
DEF:b="/var/www/cacti-0.8.7/rra/squid_proxy_server_http_data_sent_42.rrd":http_data_sent:AVERAGE \
DEF:c="/var/www/cacti-0.8.7/rra/squid_proxy_server_http_data_saved_41.rrd":http_data_saved:AVERAGE \
CDEF:cdefa=a,1024,* \
CDEF:cdefe=b,1024,* \
CDEF:cdefi=,TIME,1195705355,GT,a,a,UN,0,a,IF,IF,TIME,1195705355,GT,b,b,UN,0,b,IF,IF,TIME,1195705355,GT,c,c,UN,0,c,IF,IF,TIME,1195705355,GT,c,c,UN,0,c,IF,IF,+,+,+,*,1024,* \
AREA:cdefa#00CF00:"Received" \
GPRINT:cdefa:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Max\:%8.2lf %s\n" \
LINE1:cdefe#002A97:"Sent" \
GPRINT:cdefe:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Max\:%8.2lf %s\n" \
LINE1:cdefi#FF0000:"Saved" \
GPRINT:cdefi:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefi:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefi:MAX:"Max\:%8.2lf %s\n" \
LINE1:c#000000:"Saved %" \
GPRINT:c:LAST:" Current\:%8.2lf %s" \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:c:MAX:"Max\:%8.2lf %s"
RRDTool Says:

ERROR: invalid rpn expression in: ,TIME,1195705355,GT,a,a,UN,0,a,IF,IF,TIME,1195705355,GT,b,b,UN,0,b,IF,IF,TIME,1195705355,GT,c,c,UN,0,c,IF,IF,TIME,1195705355,GT,c,c,UN,0,c,IF,IF,+,+,+,*,1024,*

Lalsacien
Posts: 10
Joined: Tue Nov 06, 2007 3:09 am
Location: Strasbourg (France)

#59 Post by Lalsacien » Thu Nov 22, 2007 4:44 am

Hello ;)

I have also a problem with my Squid Http-Data template :(

I someone would help a little...

Many Thanks and Best Regards
Lal :)

Here is the debug :

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="mysquid - HTTP Data" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes per second" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/cacti-0.8.7a/rra/stg-srv-squid01_http_data_received_477.rrd":http_data_received:AVERAGE \
DEF:b="/var/cacti-0.8.7a/rra/stg-srv-squid01_http_data_received_477.rrd":http_data_received:MAX \
DEF:c="/var/cacti-0.8.7a/rra/stg-srv-squid01_http_data_sent_479.rrd":http_data_sent:AVERAGE \
DEF:d="/var/cacti-0.8.7a/rra/stg-srv-squid01_http_data_sent_479.rrd":http_data_sent:MAX \
DEF:e="/var/cacti-0.8.7a/rra/stg-srv-squid01_http_data_saved_478.rrd":http_data_saved:AVERAGE \
DEF:f="/var/cacti-0.8.7a/rra/stg-srv-squid01_http_data_saved_478.rrd":http_data_saved:MAX \
CDEF:cdefa=a,1024,* \
CDEF:cdefd=b,1024,* \
CDEF:cdefe=c,1024,* \
CDEF:cdefh=d,1024,* \
CDEF:cdefi=cdefb,0,EQ,0,cdefa,1024,*,cdefb,/,IF,0,1000000,LIMIT,TIME,1195723626,GT,a,a,UN,0,a,IF,IF,TIME,1195723626,GT,c,c,UN,0,c,IF,IF,TIME,1195723626,GT,e,e,UN,0,e,IF,IF,TIME,1195723626,GT,e,e,UN,0,e,IF,IF,+,+,+,*,1024,* \
CDEF:cdefbb=cdefb,0,EQ,0,cdefa,1024,*,cdefb,/,IF,0,1000000,LIMIT,TIME,1195723626,GT,b,b,UN,0,b,IF,IF,TIME,1195723626,GT,d,d,UN,0,d,IF,IF,TIME,1195723626,GT,f,f,UN,0,f,IF,IF,TIME,1195723626,GT,f,f,UN,0,f,IF,IF,+,+,+,*,1024,* \
CDEF:cdefbc=cdefa,0,EQ,0,cdefe,100,*,cdefa,/,1024,/,IF,0,110,LIMIT \
AREA:cdefa#00CF00FF:"Received" \
GPRINT:cdefa:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefd:MAX:"Max\:%8.2lf %s\n" \
LINE1:cdefe#002A97FF:"Sent" \
GPRINT:cdefe:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefh:MAX:"Max\:%8.2lf %s\n" \
LINE1:cdefi#FF0000FF:"Saved" \
GPRINT:cdefi:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefi:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefbb:MAX:"Max\:%8.2lf %s\n" \
LINE1:cdefbc#000000FF:"Saved %" \
GPRINT:e:LAST:" Current\:%8.2lf %s" \
GPRINT:e:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:f:MAX:"Max\:%8.2lf %s"
RRDTool Says:

ERROR: invalid rpn expression in: cdefb,0,EQ,0,cdefa,1024,*,cdefb,/,IF,0,1000000,LIMIT,TIME,1195723626,GT,a,a,UN,0,a,IF,IF,TIME,1195723626,GT,c,c,UN,0,c,IF,IF,TIME,1195723626,GT,e,e,UN,0,e,IF,IF,TIME,1195723626,GT,e,e,UN,0,e,IF,IF,+,+,+,*,1024,*

bantutin2004
Posts: 2
Joined: Wed Nov 21, 2007 11:22 pm

for those having trouble with HTTP-DATA w/ save templates

#60 Post by bantutin2004 » Fri Dec 14, 2007 2:52 am

for those having the following error
ERROR: invalid rpn expression in

try this method it works for me.
1.go to Graph management CDEFs, open each CDEFs related to squid templates as if you will be editing, but dont change anything just hit the save button.
2.go to Graph managemtn Gprint presets, open each GpRint preset then hit the save button.
3. then go to Graph template and open squid - http data then, same as above open each graph items then hit save
wait for the next polling, you should be getting a graph by then. i hope this helps.

Post Reply