Graph templates for Squid
Moderators: Developers, Moderators
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Graph templates for Squid
Edit the graph template of the broken graph. As a first step, remove the entry from "--y-grid" and retry
R.
R.
Re: Graph templates for Squid
I've read through the whole thread and haven't found a solution to my problem.
This is the output on the graph:
Now what I have noticed is, I only have:
where others have:
Why would my cacti install not pick up the "MAX" definitions and only the "AVERAGE" definitions unlike those who have the HTTP Data graph working?
My y-grid entry on the graph template is empty.
Thank you in advance.
This is the output on the graph:
Code: Select all
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title='wnls-cache1 - HTTP Data' \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label='bytes per second' \
--slope-mode \
--font TITLE:10: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/wnls-cache1_http_data_received_6348.rrd":http_data_received:AVERAGE \
DEF:b="/var/www/cacti/rra/wnls-cache1_http_data_sent_6352.rrd":http_data_sent:AVERAGE \
DEF:c="/var/www/cacti/rra/wnls-cache1_http_data_saved_6350.rrd":http_data_saved:AVERAGE \
CDEF:cdefa=a,1024,* \
CDEF:cdefe=b,1024,* \
CDEF:cdefi=b,d,+,8,*,TIME,1328262622,GT,a,a,UN,0,a,IF,IF,TIME,1328262622,GT,b,b,UN,0,b,IF,IF,TIME,1328262622,GT,c,c,UN,0,c,IF,IF,+,+,*,1024,* \
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:
ERROR: invalid rpn expression in: b,d,+,8,*,TIME,1328262622,GT,a,a,UN,0,a,IF,IF,TIME,1328262622,GT,b,b,UN,0,b,IF,IF,TIME,1328262622,GT,c,c,UN,0,c,IF,IF,+,+,*,1024,*
Code: Select all
DEF:a="/var/www/cacti/rra/wnls-cache1_http_data_received_6348.rrd":http_data_received:AVERAGE \
DEF:b="/var/www/cacti/rra/wnls-cache1_http_data_sent_6352.rrd":http_data_sent:AVERAGE \
DEF:c="/var/www/cacti/rra/wnls-cache1_http_data_saved_6350.rrd":http_data_saved:AVERAGE \
Code: Select all
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 \
My y-grid entry on the graph template is empty.
Thank you in advance.
Re: Graph templates for Squid
"ERROR: invalid rpn expression" occurs because of associating wrong CDEF.
Referenced CDEF varies on each server. Please make sure in your case.
But I don't know what it should be for calculating "squid bandwidth"..
So it's highly possible that the incorrect CDEF will be referenced at others' Cacti server.
It's recommended not to use "Another CDEF" when exporting templates.
EDIT: Oops, it was already filed and fixed in latest 0.8.7i.. :)
"squid bandwidth" CDEF is shown like this:Devroush wrote: 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:It seems a lot of people in this thread got such an error but I haven't found a solution for it.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,*
...
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".
Referenced CDEF varies on each server. Please make sure in your case.
But I don't know what it should be for calculating "squid bandwidth"..
If another CDEF is used in the CDEF definition, Cacti seems to store its reference by the CDEF id. (In this case, CDEF #18 is selected)churchi wrote: 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.
So it's highly possible that the incorrect CDEF will be referenced at others' Cacti server.
It's recommended not to use "Another CDEF" when exporting templates.
EDIT: Oops, it was already filed and fixed in latest 0.8.7i.. :)
CHANGELOG:
-bug#0002094: CDEF: "another cdef" references not included in template export
Re: Graph templates for Squid
P.S.
- http://forums.cacti.net/viewtopic.php?p=226140#p226140
(And that's not a big problem except CDEF definition)
It might be related to this:Tinuva wrote:Why would my cacti install not pick up the "MAX" definitions and only the "AVERAGE" definitions unlike those who have the HTTP Data graph working?
- http://forums.cacti.net/viewtopic.php?p=226140#p226140
(And that's not a big problem except CDEF definition)
Re: Graph templates for Squid
host template for lusca head and squid 2-head to share
- Attachments
-
- cacti_host_template_blusca.xml
- compatible with squid head 2 or lusca-head
- (139.1 KiB) Downloaded 568 times
-
- Posts: 16
- Joined: Mon Nov 01, 2010 5:58 am
Re: Graph templates for Squid
I'm having issues that ma graphes are white and no data could be fetched. (Squid Version: 3.1.14)
in squid cache.log it looks like this:
If i'm doing a snmpwalk (root@SERVER:~# snmpwalk -m /usr/share/mibs/squid-mib.txt -v2c -c public 10.0.83.13:3401 1.3.6.1.4.1.3495) it stops at:
SQUID-MIB::cacheClientAddressType.10.0.102.176 = INTEGER: ipv4(1)
SQUID-MIB::cacheClientAddressType.10.0.102.190 = INTEGER: ipv4(1)
SQUID-MIB::cacheClientAddressType.10.0.101.54 = INTEGER: ipv4(1)
Error: OID not increasing: SQUID-MIB::cacheClientAddressType.10.0.102.190
>= SQUID-MIB::cacheClientAddressType.10.0.101.54
Is that a bug, because it should not increase - this is a normal ip adress listed.....?
maybe that is the problem? or sth. different.i think its related to squid version cause in 3.1.6 it was working.
using 1) WebCache - Squid Statistics - Core | WebCache Squid Server (SNMP) Template from this thread
in squid cache.log it looks like this:
Code: Select all
2012/03/19 13:49:55| snmp_core.cc(489) snmpDecodePacket: Failed SNMP agent query from : 10.1.40.1236:36364
2012/03/19 13:54:49| snmp_core.cc(489) snmpDecodePacket: Failed SNMP agent query from : 10.1.40.123:56083
2012/03/19 13:54:49| snmp_core.cc(489) snmpDecodePacket: Failed SNMP agent query from : 10.1.40.123:49403
.....
SQUID-MIB::cacheClientAddressType.10.0.102.176 = INTEGER: ipv4(1)
SQUID-MIB::cacheClientAddressType.10.0.102.190 = INTEGER: ipv4(1)
SQUID-MIB::cacheClientAddressType.10.0.101.54 = INTEGER: ipv4(1)
Error: OID not increasing: SQUID-MIB::cacheClientAddressType.10.0.102.190
>= SQUID-MIB::cacheClientAddressType.10.0.101.54
Is that a bug, because it should not increase - this is a normal ip adress listed.....?
maybe that is the problem? or sth. different.i think its related to squid version cause in 3.1.6 it was working.
using 1) WebCache - Squid Statistics - Core | WebCache Squid Server (SNMP) Template from this thread
Re: Graph templates for Squid
Sorry guys to revive such an old topic...
I am looking for a nice solution to monitor my Squid instances.
I downloaded the three xml files here and imported them into Cacti. I can easily monitor now these three items:
I found another site from where I imported a Squid Host template, but this one only shows Data Query [WebCache - Squid Statistics - Core] and Data Query [WebCache - Squid Statistics - Median Based] - both appear as "Error in Data query".
Anyone having an idea how to monitor Squid in detail?
Thank& Greetings!
/KNEBB
I am looking for a nice solution to monitor my Squid instances.
I downloaded the three xml files here and imported them into Cacti. I can easily monitor now these three items:
- Squid Cache Objects
- HTTP Data
- HTTP Requests
I found another site from where I imported a Squid Host template, but this one only shows Data Query [WebCache - Squid Statistics - Core] and Data Query [WebCache - Squid Statistics - Median Based] - both appear as "Error in Data query".
Anyone having an idea how to monitor Squid in detail?
Thank& Greetings!
/KNEBB
Who is online
Users browsing this forum: No registered users and 0 guests