Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Dec 15, 2017 8:40 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 97 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7
Author Message
 Post subject: Re: Graph templates for Squid
PostPosted: Tue Jan 03, 2012 2:04 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
Edit the graph template of the broken graph. As a first step, remove the entry from "--y-grid" and retry
R.

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Re: Graph templates for Squid
PostPosted: Fri Feb 03, 2012 4:54 am 
Offline

Joined: Fri Feb 03, 2012 4:49 am
Posts: 1
I've read through the whole thread and haven't found a solution to my problem.

This is the output on the graph:
Code:
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,*


Now what I have noticed is, I only have:
Code:
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 \


where others have:
Code:
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 \


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.


Top
 Profile  
 
 Post subject: Re: Graph templates for Squid
PostPosted: Wed Feb 08, 2012 1:07 am 
Offline
Cacti Guru User

Joined: Thu Aug 05, 2010 2:04 am
Posts: 1573
Location: Japan
"ERROR: invalid rpn expression" occurs because of associating wrong CDEF.
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:
Code:
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.
...
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".

"squid bandwidth" CDEF is shown like this:
Image
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"..


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.

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)
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.. :)
Quote:
CHANGELOG:
-bug#0002094: CDEF: "another cdef" references not included in template export


Top
 Profile  
 
 Post subject: Re: Graph templates for Squid
PostPosted: Wed Feb 08, 2012 2:49 am 
Offline
Cacti Guru User

Joined: Thu Aug 05, 2010 2:04 am
Posts: 1573
Location: Japan
P.S.

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?

It might be related to this:
- http://forums.cacti.net/viewtopic.php?p=226140#p226140
(And that's not a big problem except CDEF definition)


Top
 Profile  
 
 Post subject: Re: Graph templates for Squid
PostPosted: Sun Mar 18, 2012 10:09 am 
Offline

Joined: Fri Mar 16, 2012 5:22 am
Posts: 6
host template for lusca head and squid 2-head to share


Attachments:
File comment: compatible with squid head 2 or lusca-head
cacti_host_template_blusca.xml [139.1 KiB]
Downloaded 453 times
Top
 Profile  
 
 Post subject: Re: Graph templates for Squid
PostPosted: Mon Mar 19, 2012 9:00 am 
Offline

Joined: Mon Nov 01, 2010 5:58 am
Posts: 16
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:
Code:
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
.....

If i'm doing a snmpwalk ([email protected]:~# 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


Top
 Profile  
 
 Post subject: Re: Graph templates for Squid
PostPosted: Thu Sep 28, 2017 1:49 am 
Offline
Cacti User
User avatar

Joined: Tue Sep 19, 2006 11:29 am
Posts: 113
Sorry guys to revive such an old topic... :oops:

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

So far so good. But I have seen several screenshots where some other guys are monitoring much more Squid metrics. Before I start to re-invent the wheel... is there some place where such templates for more Squid data can be found?

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 97 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group