How to Monitoring Squid with Cacti

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

Moderators: Developers, Moderators

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

How to Monitoring Squid with Cacti

Post by hplc »

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
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: is this a dead project?

Post by phalek »

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 : CereusReporting
hplc
Posts: 6
Joined: Mon Jun 13, 2011 3:29 pm

Re: is this a dead project?

Post by hplc »

I tried that two times over, all i see is a window, but no graph and only "nan" in data field
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: is this a dead project?

Post by phalek »

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 : CereusReporting
hplc
Posts: 6
Joined: Mon Jun 13, 2011 3:29 pm

Re: is this a dead project?

Post by hplc »

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
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: is this a dead project?

Post by phalek »

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 : CereusReporting
hplc
Posts: 6
Joined: Mon Jun 13, 2011 3:29 pm

Re: is this a dead project?

Post by hplc »

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
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: is this a dead project?

Post by phalek »

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 : CereusReporting
hplc
Posts: 6
Joined: Mon Jun 13, 2011 3:29 pm

Re: is this a dead project?

Post by hplc »

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

Post by mrpurple »

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

Post by mrpurple »

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

Who is online

Users browsing this forum: No registered users and 3 guests