Graph templates for Squid

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

Moderators: Moderators, Developers

Post Reply
Author
Message
yeahgood
Posts: 1
Joined: Sat Dec 29, 2007 2:39 am

Help with interpreting graph

#61 Post by yeahgood » Sat Dec 29, 2007 2:49 am

`

VaSh1
Posts: 29
Joined: Wed Feb 20, 2008 3:44 pm

#62 Post by VaSh1 » Wed Nov 19, 2008 3:02 am

gandalf wrote:Please try attached Host Template. Requires at least cacti-0.8.6i
Reinhard
After importing the template i've got the following errors

Data Query [WebCache - Squid Statistics - Core]
Error in data query.

Data Query [WebCache - Squid Statistics - Median Based]
Error in data query.

I'm using cacti 0.8.7b

Tnx for any help
Attachments
errors.PNG
errors.PNG (9.39 KiB) Viewed 12752 times

paulom
Posts: 3
Joined: Thu Aug 11, 2005 1:04 pm

#63 Post by paulom » Mon Jan 19, 2009 12:24 pm

Hi.

I have also the same problem with squid http-data. Like Hassan1, Bantutin, Lalsacien:

If I Go to "Graph templates" -> "Squid - HTTP Data " and clear the "Unit Grid Value".
ERROR: invalid rpn expression in: ,TIME,1232385129,GT,a,a,UN,0,a,IF,IF,TIME,1232385129,GT,b,b,UN,0,b,IF,IF,TIME,1232385129,GT,c,c,UN,0,c,IF,IF,+,+,*,1024,*

If If I Go to "Graph templates" -> "Squid - HTTP Data " and put "KB/s" in the "Unit Grid Value", the error is:

invalid y-grid format

Can you help me?

Thks,

Paulo

myha
Posts: 4
Joined: Thu Oct 05, 2006 7:03 am

#64 Post by myha » Tue Mar 10, 2009 8:28 am

Hi guys,

just wanted to share smth... I also had a problem with invalid y-axis whatever, and the "Unit Grid Value" was empty...

What heleped - I entered smth in that field (like KB/s), saved, and then removed it again. After that it worked perfectly.

brm

n.chavoshi
Posts: 1
Joined: Mon Nov 17, 2008 1:17 am

#65 Post by n.chavoshi » Wed Apr 15, 2009 4:04 am

thanks for your template
I want to change unit in squid data template to bit per second,can anyone guide me for this ??because the default is byte per second
thanks in advanced

borja.arranz
Posts: 9
Joined: Fri Feb 06, 2009 7:37 am

#66 Post by borja.arranz » Fri Jul 17, 2009 9:15 am

Hi

I'm just having the same problem that VaSh1, i can see that the snmp works beetwen my Cacti Server and my Squid Server, and if i ask with snmpwalk source Cacti server to the Squid server i have the correct answer. I added the templates from this topic but i can see that:

Data Query WebCache - Squid Statistics - Core
Error in data query.

Data Query WebCache - Squid Statistics - Median Based
Error in data query.

When i run "verbose query" on the WebCaches i get this:

+ Running data query [15].
+ Found type = '3' [snmp query].
+ Could not find data query XML file at '/var/www/cacti/resource/snmp_queries/webcache_squid_core.xml'
+ Error parsing XML file into an array.
+ Could not find data query XML file at '/var/www/cacti/resource/snmp_queries/webcache_squid_core.xml'
+ Could not find data query XML file at '/var/www/cacti/resource/snmp_queries/webcache_squid_core.xml'
+ Could not find data query XML file at '/var/www/cacti/resource/snmp_queries/webcache_squid_core.xml'

And this:

+ Running data query [16].
+ Found type = '3' [snmp query].
+ Could not find data query XML file at '/var/www/cacti/resource/snmp_queries/webcache_squid_median.xml'
+ Error parsing XML file into an array.
+ Could not find data query XML file at '/var/www/cacti/resource/snmp_queries/webcache_squid_median.xml'
+ Could not find data query XML file at '/var/www/cacti/resource/snmp_queries/webcache_squid_median.xml'
+ Could not find data query XML file at '/var/www/cacti/resource/snmp_queries/webcache_squid_median.xml'

And if i create the nexts Graph Cacti don't take any data graph from squid:

Squid - All Service Times
Squid - Cache
Squid - File Descriptors
Squid - File Descriptors :: current
Squid - HTTP errors
Squid - HTTP Requests in
Squid - HTTP Service Times
Squid - HTTP Traffic Data
Squid - Memory usage
Squid - Number of clients
Squid - Server requests out

i have my squid.conf perfectly configured:

acl acl-snmp snmp_community public
snmp_port 3401
snmp_access allow acl-snmp snmp
snmp_access deny all

and the snmpd.conf:

proxy -v 1 -c public squid-ip:3401 .1.3.6.1.4.1.3495.1

When i configure the squid Device on Cacti only works snmp if i enter the port 161 to SNMP Port, here is my first question, why if i configure the port 3401 on the squid.conf and snmpd.conf y have to enter the port 161 in Cacti side?

Is something that i'm doing wrong?

Please some advise.

Thanks a lot

borja.arranz
Posts: 9
Joined: Fri Feb 06, 2009 7:37 am

#67 Post by borja.arranz » Fri Jul 17, 2009 9:45 am

I fix the problem with the "Verbose query" of WebCaches adding the .xml manually, Cacti don't import the template by himself.

Now i can see a better answer to the "Verbose query":

+ Running data query [15].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/cacti/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 '/var/www/cacti/resource/snmp_queries/webcache_squid_core.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/webcache_squid_core.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/webcache_squid_core.xml'


But in "Create Graphs for this Host" i can see this:

Data Query [WebCache - Squid Statistics - Core] Reload Associated Query
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.

Data Query [WebCache - Squid Statistics - Median Based] Reload Associated Query
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.

User avatar
Kini
Posts: 25
Joined: Mon Jul 27, 2009 9:07 am
Location: Germany

#68 Post by Kini » Fri Aug 21, 2009 5:03 am

I added the five graph template from the third page of this thread to my cacti.

After setting up the graphs on my two squid proxies there isn't anything graphed.

So I tested if I am able to ask SNMP on the SQUID Proxy this way:

snmpwalk -m /usr/share/squid/mib.txt -v2c -Cc -c communitystring hostname:3401 .1.3.6.1.4.1.3495.1.1

and I got an answer like this

SNMPv2-SMI::enterprises.3495.1.1.1.0 = INTEGER: 460
SNMPv2-SMI::enterprises.3495.1.1.2.0 = INTEGER: 1566452
SNMPv2-SMI::enterprises.3495.1.1.3.0 = Timeticks: (584627) 1:37:26.27

Why is Cacti not graphing something?

User avatar
Kini
Posts: 25
Joined: Mon Jul 27, 2009 9:07 am
Location: Germany

#69 Post by Kini » Mon Aug 24, 2009 4:23 am

Further informations to my problem:

I queried all those MIBs listed in this Thread:

OID ClientHttpRequests 1.3.6.1.4.1.3495.1.3.2.1.1
OID HttpHits 1.3.6.1.4.1.3495.1.3.2.1.2
OID HttpErrors 1.3.6.1.4.1.3495.1.3.2.1.3
OID HttpInKb 1.3.6.1.4.1.3495.1.3.2.1.4
OID HttpOutKb 1.3.6.1.4.1.3495.1.3.2.1.5
OID ICPpktsSent 1.3.6.1.4.1.3495.1.3.2.1.6
OID ICPpktsRecv 1.3.6.1.4.1.3495.1.3.2.1.7
OID ICPkbSent 1.3.6.1.4.1.3495.1.3.2.1.8
OID ICPkbRecv 1.3.6.1.4.1.3495.1.3.2.1.9
OID ServerRequests 1.3.6.1.4.1.3495.1.3.2.1.10
OID ServerErrors 1.3.6.1.4.1.3495.1.3.2.1.11
OID ServerInKb 1.3.6.1.4.1.3495.1.3.2.1.12
OID ServerOutKb 1.3.6.1.4.1.3495.1.3.2.1.13
OID CurrentSwapSize 1.3.6.1.4.1.3495.1.3.2.1.14
OID SysPageFaults 1.3.6.1.4.1.3495.1.3.1.1
OID MemUsage 1.3.6.1.4.1.3495.1.3.1.4
OID CpuUsage 1.3.6.1.4.1.3495.1.3.1.5
OID MaxResSize 1.3.6.1.4.1.3495.1.3.1.6
OID NumObjCount 1.3.6.1.4.1.3495.1.3.1.7
OID CurrentLRUExpiration 1.3.6.1.4.1.3495.1.3.1.8
OID CurrentUnlinkRequests 1.3.6.1.4.1.3495.1.3.1.9
OID CurrentUnusedFileDescrCount 1.3.6.1.4.1.3495.1.3.1.10
OID CurrentReservedFileDescrCount 1.3.6.1.4.1.3495.1.3.1.11
OID HttpAllSvcTimeFiveMin 1.3.6.1.4.1.3495.1.3.2.2.1.2.5
OID HttpMissSvcTimeFiveMin 1.3.6.1.4.1.3495.1.3.2.2.1.3.5
OID HttpNmSvcTimeFiveMin 1.3.6.1.4.1.3495.1.3.2.2.1.4.5
OID HttpHitSvcTimeFiveMin 1.3.6.1.4.1.3495.1.3.2.2.1.5.5
OID IcpQuerySvcTimeFiveMin 1.3.6.1.4.1.3495.1.3.2.2.1.6.5
OID IcpReplySvcTimeFiveMin 1.3.6.1.4.1.3495.1.3.2.2.1.7.5
OID DnsSvcTimeFiveMin 1.3.6.1.4.1.3495.1.3.2.2.1.8.5
OID HttpAllSvcTimeHourly 1.3.6.1.4.1.3495.1.3.2.2.1.2.60
OID HttpMissSvcTimeHourly 1.3.6.1.4.1.3495.1.3.2.2.1.3.60
OID HttpNmSvcTimeHourly 1.3.6.1.4.1.3495.1.3.2.2.1.4.60
OID HttpHitSvcTimeHourly 1.3.6.1.4.1.3495.1.3.2.2.1.5.60
OID IcpQuerySvcTimeHourly 1.3.6.1.4.1.3495.1.3.2.2.1.6.60
OID IcpReplySvcTimeHourly 1.3.6.1.4.1.3495.1.3.2.2.1.7.60
OID DnsSvcTimeHourly 1.3.6.1.4.1.3495.1.3.2.2.1.8.60
OID HttpAllSvcTimeOneMin 1.3.6.1.4.1.3495.1.3.2.2.1.2.1
OID HttpMissSvcTimeOneMin 1.3.6.1.4.1.3495.1.3.2.2.1.3.1
OID HttpHitSvcTimeOneMin 1.3.6.1.4.1.3495.1.3.2.2.1.5.1

Both SQUID-Proxies are answering with Data on every single MIB.

After this I checked the MIB locations of the XML-files on page 3 of this Thread and I am also getting an answer for every MIB.
So I am in the opinion that Cacti is getting data but doesn`t graph it. So far everything should be set up correctly on my SQUIDs.

Further on I added the WebCache - SQUID - XMLs from Gandalf this morning. No Rows and no Items found. Verbose Query:
+ Running data query [29].
+ Found type = '3' [snmp query].
+ Could not find data query XML file at 'path_cacti/resource/snmp_queries/webcache_squid_core.xml'
+ Error parsing XML file into an array.
+ Could not find data query XML file at 'path_cacti/resource/snmp_queries/webcache_squid_core.xml'
+ Could not find data query XML file at 'path_cacti/resource/snmp_queries/webcache_squid_core.xml'
+ Could not find data query XML file at 'path_cacti/resource/snmp_queries/webcache_squid_core.xml'
path/cacti should be srv/www/htdocs/cacti

I added all graph templates by importing them via import tool in cacti console.

What did I do wrong? What did I forget? Can anyone help me?

alexus
Posts: 40
Joined: Fri Feb 04, 2005 8:38 pm
Location: Brooklyn, New York
Contact:

#70 Post by alexus » Fri Sep 25, 2009 10:19 am

so is this working or non-working templates?

i wish to add squid to my cacti
[url]http://alexus.org/[/url] - [url]http://alexus.biz/[/url] - [url]http://alexus.fm/[/url] - [url]http://lexus.gs/[/url]

argon0
Cacti User
Posts: 443
Joined: Fri Mar 12, 2004 1:22 pm

#71 Post by argon0 » Tue Oct 06, 2009 8:22 am

OK, this LOOKS like it works but:


1) you must first download the Squidstats-0.1.zip file from the Squidstats thread - getting you the webcache_squid_core.xml and webcache_squid_median.xml files,

2) copy these into the correct path for your implementation (for EZCacti this is /var/www/html/resource/snmp_queries), make sure user is same as the user your Cacti is running as (for EZCacti this is Apache)

3) import the host template from Reinhard, mentioned above.

4) Prepare your host - as mentioned above:

Code: Select all

acl acl-snmp snmp_community public 
snmp_port 3401 
snmp_access allow acl-snmp snmp 
snmp_access deny all 
5) create a new host with the template WebCache - Squid Server (SNMP)

6) Set the SNMP version to 1, and the SNMP port to 3401 on the host

Do the verbose queries, and then you should be able to create graphs!!!
[size=50]No longer a n00by but[/size] not yet 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

#72 Post by twin » Thu Oct 15, 2009 6:13 am

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

I know, it's been a while, but i would like to use the above host-template.
But the data-queries are missing (core and meridian).
Where can i find them ?


Or are there newer Squid Templates for 0.8.7e ? I haven't found some.


Thank you !

argon0
Cacti User
Posts: 443
Joined: Fri Mar 12, 2004 1:22 pm

#73 Post by argon0 » Thu Oct 15, 2009 6:37 am

See my post just above yours, works very well.

Important thing to notice though is it uses SNMP version 1. And you may need to graph the host separately to the SQUID engine... (I had to create two devices to get this to work).
[size=50]No longer a n00by but[/size] not yet 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

#74 Post by twin » Thu Oct 15, 2009 9:16 am

argon0 wrote:See my post just above yours, works very well.

Important thing to notice though is it uses SNMP version 1. And you may need to graph the host separately to the SQUID engine... (I had to create two devices to get this to work).

Oh no ! Sorry i had to be blind. Thank you !


By the way. I got it working with just one device. I just put the snmp port 3401 directly into the Data Source. To do so i had to check the "Use-per Data Source" Options in the Data templates and so i could use a different SNMP Port for the Squid Graphs.

Does this work too with Reinhards Template ?

alexus
Posts: 40
Joined: Fri Feb 04, 2005 8:38 pm
Location: Brooklyn, New York
Contact:

#75 Post by alexus » Thu Oct 15, 2009 9:17 am

after importing this template my other template for apache stop working, how can I fix it?
[url]http://alexus.org/[/url] - [url]http://alexus.biz/[/url] - [url]http://alexus.fm/[/url] - [url]http://lexus.gs/[/url]

Post Reply