Graph templates for Squid

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

Moderators: Developers, Moderators

Post Reply
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

Twin. I'm using Reinhard's template now.

Alexus, I'm not sure - what problems are you getting? Is it the same host, as the Squid proxy?
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
twin
Posts: 9
Joined: Thu Oct 15, 2009 6:09 am

Post by twin »

argon0 wrote:Twin. I'm using Reinhard's template now.

Yes, but i meant that i'm using only one device polling the host on Port 161 for CPU and Interface AND polling the same host on Port 3401 for Squid.
At the moment i'm still using the template of the thread starter.
So i was not sure if this works with reinhards Host-Template, too. But it should, i think.
alexus
Posts: 40
Joined: Fri Feb 04, 2005 8:38 pm
Location: Brooklyn, New York
Contact:

Post by alexus »

argon0 wrote:Twin. I'm using Reinhard's template now.

Alexus, I'm not sure - what problems are you getting? Is it the same host, as the Squid proxy?
after importing this template my HTTP - DATA isn't showing anymore

RRDTool Command:
/usr/local/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="lama - 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 \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/usr/local/apache2/htdocs/cacti-0.8.7e/rra/lama_http_data_received_89.rrd":http_data_received:AVERAGE \
DEF:b="/usr/local/apache2/htdocs/cacti-0.8.7e/rra/lama_http_data_sent_90.rrd":http_data_sent:AVERAGE \
CDEF:cdefa=a,1024,* \
CDEF:cdefe=b,1024,* \
AREA:cdefa#00FF00FF:"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#0000FFFF:"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
[url]http://alexus.org/[/url] - [url]http://alexus.biz/[/url] - [url]http://alexus.fm/[/url] - [url]http://lexus.gs/[/url]
twin
Posts: 9
Joined: Thu Oct 15, 2009 6:09 am

Post by twin »

alexus,
i had the same problem and just deleted the "KB/s" in y-grid field. That worked for me. Don't know why this is a problem.
alexus
Posts: 40
Joined: Fri Feb 04, 2005 8:38 pm
Location: Brooklyn, New York
Contact:

Post by alexus »

twin wrote:alexus,
i had the same problem and just deleted the "KB/s" in y-grid field. That worked for me. Don't know why this is a problem.
can you tell me where exactly? i'm not savvy with cacti :(
[url]http://alexus.org/[/url] - [url]http://alexus.biz/[/url] - [url]http://alexus.fm/[/url] - [url]http://lexus.gs/[/url]
twin
Posts: 9
Joined: Thu Oct 15, 2009 6:09 am

Post by twin »

alexus wrote:
twin wrote:alexus,
i had the same problem and just deleted the "KB/s" in y-grid field. That worked for me. Don't know why this is a problem.
can you tell me where exactly? i'm not savvy with cacti :(

Not in Office anymore, but i try. You have to edit the data template. To do so, goto Graph Edit/choose your Graph and in the upper right the Edit data template. There you find the y-grid Option. Delete "KB/s" there and save.

Hope this was the correct way.


EDIT: Forget the above. You have to edit it directly in the Graph Template.
sterpstra
Posts: 45
Joined: Tue May 27, 2008 11:48 pm
Location: So Cal
Contact:

Same problem

Post by sterpstra »

I'm getting this error when running Verbose:
+ Running data query [17].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/webcache_squid_core.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.3495.1.3.2.1.11'
+ No SNMP data returned
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/webcache_squid_core.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/webcache_squid_core.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/webcache_squid_core.xml'

I can run all of the OID's in the XML file no problem both with SNMP v1 and v2... What am I missing? Other than the answer ;)
blueman176
Posts: 19
Joined: Fri Mar 05, 2010 8:18 am

Post by blueman176 »

Are these plugins compatible with Squid3?
Graphs are built but there is nothing.
sterpstra
Posts: 45
Joined: Tue May 27, 2008 11:48 pm
Location: So Cal
Contact:

Post by sterpstra »

blueman176 wrote:Are these plugins compatible with Squid3?
Graphs are built but there is nothing.
I'm seeing the same issue on my cluster of Squid servers, all V3 now..
Devroush
Posts: 27
Joined: Sun Jan 22, 2006 7:35 am

Re: Graph templates for Squid

Post by Devroush »

Bumping this to affirm that this still works with Cacti 0.8.7g and Squid 2.6 (haven't tried out Squid 3). Here's what I did:

1) You need the snmp queries from Squidstats-0.1.zip, these can be found here (yes the zip in the original post is still usable): http://forums.cacti.net/about3158.html. Download and put webcache_squid_core.xml and webcache_squid_median.xml in the resource/snmp_queries folder.

2) The graphs that bshoebottom made looked really nice in my opinion. His templates can be found at page 3 (3rd post are the templates, a little further down are some screenshots)
The graphs all work except for HTTP Data. Debugging gives the following error:

Code: Select all

ERROR: invalid rpn expression in: cdefb,0,EQ,0,cdefa,1024,*,cdefb,/,IF,0,1000000,LIMIT,TIME,1295231273,GT,a,a,UN,0,a,IF,IF,TIME,1295231273,GT,b,b,UN,0,b,IF,IF,TIME,1295231273,GT,c,c,UN,0,c,IF,IF,+,+,*,1024,*
It seems a lot of people in this thread got such an error but I haven't found a solution for it.

3) gandalf made a host template with his own graph templates. This can be found somewhere in the middle of page 4. I imported the template but didn't use it, because I liked the bshoebottom graphs better. Maybe because I imported his template, it conflicted with the HTTP Data graph of bshoebottom? Don't know :).

Hopefully somebody finds this post useful!

edit: Found out what the problem was with the HTTP Data graph! I have an Apache template that has a CDEF function "Apache - Calculate Bytes/Request". A CDEF used by the HTTP Data graph is "squid bandwidth". For some reason, it references the Apache CDEF. You have to edit this CDEF: change the reference "Apache - Calculate Bytes/request" to "Divide by -10".
eviltrooper
Posts: 13
Joined: Fri Mar 11, 2011 7:22 am

Re: Graph templates for Squid

Post by eviltrooper »

Hello i still have problems mit HTTP Data

Under "Graph Management " the Debug modes says:

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='Proxy01 - 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/rra/proxy01_http_data_received_14685.rrd":http_data_received:AVERAGE \
DEF:b="/var/www/cacti/rra/proxy01_http_data_sent_14687.rrd":http_data_sent:AVERAGE \
DEF:c="/var/www/cacti/rra/proxy01_http_data_saved_14686.rrd":http_data_saved:AVERAGE \
CDEF:cdefa=a,1024,* \
CDEF:cdefe=b,1024,* \
CDEF:cdefi= \
AREA:cdefa#00CF00FF:"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#002A97FF:"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#FF0000FF:"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#000000FF:"Saved %"  \
GPRINT:c:LAST:" Current\:%8.2lf %s"  \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:c:MAX:"Max\:%8.2lf %s" 

RRDTool Says:
i dont know whats wrong :(

cacti Version is 0.8.7g

i used the Template from "bshoebottom"
hplc
Posts: 6
Joined: Mon Jun 13, 2011 3:29 pm

Re: Graph templates for Squid

Post by hplc »

Cant get it to work either, cacti 0.8.7g, squid 3.1.11. Is there any new template out thats proven to work out of the box without "fixes" and "fixing"?, thanks in advance
TrilceAC
Posts: 9
Joined: Thu Apr 10, 2008 2:50 am
Location: Valencia (Spain)

Re: Graph templates for Squid

Post by TrilceAC »

Using cacti v0.8.7b

I was having some problems with this templates, because I received SNMP error in the device page, as shown in http://forums.cacti.net/viewtopic.php?p=28801#p28801. However I was able to snmpwalk the OIDs using a terminal. Unfortunately, cacti didn't generate rra files for our squid device.

Some people have suggested to proxy port 161 to 3401: http://forums.cacti.net/viewtopic.php?p=28811#p28811 I haven't check this solution because I don't have permissions on our squid server and I haven't talked with my boss yet. But I have tried another thing from cacti that seems to work. By default, cacti checks availability / reachability of devices using snmp, and it seems to me that cacti doesn't care if one has changed the port of snmp for a device. This is the case of squid, hence cacti asks to port 161 for reachability and no answer is received. If a host isn't reachable, then cacti doesn't ask anything else.

I simply have deactivated Downed Device Detection (I have set it to None) on the squid device page. Now cacti doesn't check if squid server is available before performing the data queries defined for it. This is the way I got it to work properly.

Hope this helps somebody,
Carlos
TrilceAC
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Graph templates for Squid

Post by gandalf »

Please see 2nd link of my sig to learn how to debug and get more information about the exact error
R.
achoopani
Posts: 2
Joined: Sun Nov 28, 2010 8:14 am

Re: HTTP _ Data Not Work :(

Post by achoopani »

Makenshi wrote:Forgot to log in. Added the templates to this post.

Hii Dear Friends

Im Install Ubuntu Server 11.04 and Cacti Version 0.8.7g with apt-get install

after import all Templates and Installing snmp and squid starting graph ....

The Graph For HTTP_Data Not Work :cry: :cry: :cry: :cry:

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='ZACH - 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 \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/lib/cacti/rra/zach_http_data_received_70.rrd":http_data_received:AVERAGE \
DEF:b="/var/lib/cacti/rra/zach_http_data_sent_72.rrd":http_data_sent:AVERAGE \
DEF:c="/var/lib/cacti/rra/zach_http_data_saved_71.rrd":http_data_saved:AVERAGE \
CDEF:cdefa=a,1024,* \
CDEF:cdefe=b,1024,* \
CDEF:cdefi=d,50,GT,d,95,GT,UNKN,INF,IF,UNKN,IF,TIME,1325413875,GT,a,a,UN,0,a,IF,IF,TIME,1325413875,GT,b,b,UN,0,b,IF,IF,TIME,1325413875,GT,c,c,UN,0,c,IF,IF,+,+,*,1024,* \
AREA:cdefa#00FF00FF:"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#0000FFFF:"Sent"  \
GPRINT:cdefe:LAST:"    Current%8.2lf%s"  \
GPRINT:cdefe:AVERAGE:"Average%8.2lf%s"  \
GPRINT:cdefe:MAX:"Maximum%8.2lf%s"  \
LINE1:cdefi#FF0000FF:"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#000000FF:"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 y-grid format

help me please
Attachments
Squid Graph not work
Squid Graph not work
http_data.jpg (217.89 KiB) Viewed 5221 times
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests