How to Monitoring Squid with Cacti

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

Moderators: Moderators, Developers

Post Reply
Author
Message
hplc
Posts: 6
Joined: Mon Jun 13, 2011 3:29 pm

How to Monitoring Squid with Cacti

#1 Post by hplc » Wed Jun 15, 2011 1:58 pm

Hi, im curious if this project is alive or abandoned?, i cant find anyting useful at all when it comes to monitoring squid in cacti and im not good enough to write my own templates, am i out of luck completely?

User avatar
phalek
Cacti Guru User
Posts: 2710
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: is this a dead project?

#2 Post by phalek » Wed Jun 15, 2011 3:00 pm

Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code: Select all

CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061
[/size]

hplc
Posts: 6
Joined: Mon Jun 13, 2011 3:29 pm

Re: is this a dead project?

#3 Post by hplc » Wed Jun 15, 2011 3:15 pm

I tried that two times over, all i see is a window, but no graph and only "nan" in data field

User avatar
phalek
Cacti Guru User
Posts: 2710
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: is this a dead project?

#4 Post by phalek » Wed Jun 15, 2011 3:22 pm

Now that's a total different story and maybe a subject of "Squid templates are not working" with a small error description and a screenshot of what you see may give you better results.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code: Select all

CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061
[/size]

hplc
Posts: 6
Joined: Mon Jun 13, 2011 3:29 pm

Re: is this a dead project?

#5 Post by hplc » Wed Jun 15, 2011 3:35 pm

well, its cacti 0.8.7g, its squid 3.1.11, i tried the squid template called "hits" in your post. All i see is the graph window, i see the grid, but no graph and no data. The text i see is:

Current: nan Average: nan Max: nan


The OS is the German linux firewall distro called Ipfire. Everything except squid is working, i see graphs of load, cpu, HDD, network traffic etc etc

User avatar
phalek
Cacti Guru User
Posts: 2710
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: is this a dead project?

#6 Post by phalek » Wed Jun 15, 2011 3:47 pm

Now, if you're German, than you may want to look here for clues:

http://forum.ipfire.org/index.php?topic=2329.0

Unless you already did those steps to enable snmp access to the squid daemon ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code: Select all

CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061
[/size]

hplc
Posts: 6
Joined: Mon Jun 13, 2011 3:29 pm

Re: is this a dead project?

#7 Post by hplc » Wed Jun 15, 2011 10:42 pm

from squid site:

"Enabling SNMP in Squid

Squid-3

It's now built in by default. Simply add the configuration options to squid.conf. "

so in squid conf i put:

acl snmp snmp_community public
snmp_access allow all

but still no graph

User avatar
phalek
Cacti Guru User
Posts: 2710
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: is this a dead project?

#8 Post by phalek » Wed Jun 15, 2011 11:56 pm

did you try to use snmpwalk from the CLI of the cacti box to check if you can get that information via SNMP at all ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code: Select all

CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061
[/size]

hplc
Posts: 6
Joined: Mon Jun 13, 2011 3:29 pm

Re: is this a dead project?

#9 Post by hplc » Thu Jun 16, 2011 8:06 am

I dont understand the syntax of snmpwalk, i dont know what to write in terminal

mrpurple
Posts: 2
Joined: Thu Jun 23, 2011 3:56 pm

Re: How to Monitoring Squid with Cacti

#10 Post by mrpurple » Thu Jun 23, 2011 4:30 pm

Hi,
Following this thread http://forums.cacti.net/viewtopic.php?f ... 2&start=75
I was having the exact same problems as described above. I have cacti Version 0.8.7d and squid Version 2.7.STABLE9. My dataquery box on my device page reads
1) WebCache - Squid Statistics - Core (Verbose Query) Uptime Goes Backwards Success [0 Items, 0 Rows] Reload Data Query Delete Data Query Association
2) WebCache - Squid Statistics - Median Based (Verbose Query) Uptime Goes Backwards Success [0 Items, 0 Rows] Reload Data Query Delete Data Query Association
I opened a terminal in another networked pc and used smtp walk as follows:

Code: Select all

snmpwalk -c snmppublic -v1 squidhostname:3401 .1.3.6.1.4.1.3495.1.1
which returned

Code: Select all

SNMPv2-SMI::enterprises.3495.1.1.1.0 = INTEGER: 1544
SNMPv2-SMI::enterprises.3495.1.1.2.0 = INTEGER: 84856
SNMPv2-SMI::enterprises.3495.1.1.3.0 = Timeticks: (6660906) 18:30:09.06
Presumably indicating that my snmphost is serving up the squid snmp data correctly.
However hitting the verbose query in my squid device page I get:

Code: Select all

+ Running data query [10].
+ 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'
Curiously it doesnt seem to matter what I save into the hostname field I get the same response. I'd like to know where to look next?
FYI I have no idea how to parse OID indices but passing the one listed in the verbose query above through snmpwalk from a terminal gives the following

Code: Select all

snmpwalk -c snmppublic -v1 squidhostname:3401 .1.3.6.1.4.1.3495.1.3.2.1.11
SNMPv2-SMI::enterprises.3495.1.3.2.1.11.0 = INTEGER: 0
Does this look right?

mrpurple
Posts: 2
Joined: Thu Jun 23, 2011 3:56 pm

Re: How to Monitoring Squid with Cacti

#11 Post by mrpurple » Sun Jun 26, 2011 10:46 pm

My bad.
I hadn't entered the correct port number (3401 rather than 161)

Post Reply