[XML] SquidStats version 0.1 (cacti 0.8.5 only!!!)

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

Moderators: Developers, Moderators

Post Reply
Rolf Poser
Posts: 42
Joined: Wed Dec 10, 2003 7:19 am

[XML] SquidStats version 0.1 (cacti 0.8.5 only!!!)

Post by Rolf Poser »

Folks:

I'm placing this first release in this forum because you either have to be brave enough to be using a cacti 0.8.5 pre-release installation or desperate enough to upgrade in order to get your squid system monitored. 8)

So this most definitely needs an upgrade to the latest pre-release version - I've tested SquidStats v0.1 with the 28Jan build.

The other reason I'm putting this out here, is that it would be great if someone could give it a spin and see whether there are any problems with it.

I will then re-release as v0.2 in the main add-ons forum once cacti 0.8.5 is out.

For further details please see the included readme.txt file.

Kind Regards,
Rolf.
Attachments
SquidStats-0.1.zip
SquidStats v0.1 - Please see README.txt
(23.06 KiB) Downloaded 15154 times
Deano
Cacti User
Posts: 101
Joined: Wed Oct 29, 2003 7:08 am
Contact:

Post by Deano »

Rolf - What's the 0.8.5 Driver - is it a bug fix (I've found a couple in 0.8.4 imports) or feature thing ?

Deano
Rolf Poser
Posts: 42
Joined: Wed Dec 10, 2003 7:19 am

cacti 0.8.5 - where to find it:

Post by Rolf Poser »

Deano:

I'm a big fan of your templates by the way ! Especially Cisco NBAR..

I didn't mean "driver", I meant the latest beta release of cacti version 0.8.5.

In case you didn't know where to find it, it is at:

http://www.raxnet.net/download/beta/unix

or

http://www.raxnet.net/download/beta/win32

(depending on which OS you're using).

I haven't tested it on the windows version, but I trust that cacti abstracts the OS details enough for us not to worry about it too much.

Just get the latest nightly build (currently 30 Jan) and squidstats should work with that.

If you're not willing to take the risks beta versions bring, then it's probably best to wait until cacti version 0.8.5 is released.

Regards,
Rolf.
Deano
Cacti User
Posts: 101
Joined: Wed Oct 29, 2003 7:08 am
Contact:

Post by Deano »

Sorry I meant Driver - as in "why you need" 0.8.5 - Just interested if it was to make use of new features or to solve bugs.

Testing my stuff on 0.8.5 is on my list (just struggling to find enouh time).

Deano
(If I could type I'd be truly dangerous!)
Rolf Poser
Posts: 42
Joined: Wed Dec 10, 2003 7:19 am

0.8.5 has fixed host template imports

Post by Rolf Poser »

Deano:

Oh...

Basically the subject line says it - the host template imports had a bug in version 0.8.4 which caused problems with more than one graph template. That would be the main reason.

Another reason is the fact that there is also a derivation precedence for SNMP variables makes life easier but isn't absolutely essential.

(Basically the new behaviour is if the data template values for snmp community string. version or other common items are empty, then it will look for the defaults from the host's values and use those.)

I guess I could have created 14 graph template exports and those might have worked with 0.8.4, but I thought I'd try and make life simple and wait for 0.8.5 to bring the goodies. Perhaps I should have waited a bit before going public, but I figured there may be some squid enthusiasts out there that would be willing to try it out so long.

A big thank you goes to Rax for fixing the bugs I mentioned above !!!

Regards,
Rolf.
glopglop

problem with ssquistats 0.1 and cacti 0.8.5

Post by glopglop »

Is there a new version of squidstats for cacti 0.8.5?

Because i didn't succeed in making it work with my cacti installation.

All is going well with the import of template but when i want to import the device it doesn't work as it should to work

in the docs it s written
The real test to see whether the association of your new host and the Squid Host template worked is in the
block called "Associated Data Queries". There should be two data query entries, and both of them should have
a green "Success" indicator showing that the queries succeeded.

The first query (Core) should have 1 Item and 1 Row, and the second (Median Based) should have 3 Items and 3 Rows.

and i got this
Associated Data Queries
Data Query Name Debugging Status
1) (Verbose Query) Success [0 Items, 0 Rows]
2) WebCache - Squid Statistics - Core (Verbose Query) Success [0 Items, 0 Rows]

and no associated graphs.

when i click on verbose query i got
+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/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

I guess i got no date from snmp

but it work then i ran the snmpquery by hand

snmpwalk -c community -v 1 proxy.int-evry.fr: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 someone know what happened?
redalert
Posts: 1
Joined: Sat Apr 17, 2004 11:15 pm
Contact:

Post by redalert »

Rolf:
Thanks you very much!...nice and great howto, working great in Gentoo/Cacti 0.8.5a with a Clarkconnect (Redhat 9) Squid Box.

thanks again.
undertoe

Post by undertoe »

thank you I have, been wanting to convert from mrtg to cacti and this was the only thing holding me back was poll my squid server.

one word... pimp...

I'm just going to add this just in case your cacti and squid aren't running on the same box.

add this to your /etc/squid/squid.conf

Code: Select all

acl cactiserver src <ipaddress here>

......

snmp_access allow snmpcommunity cactiserver
--> restart squid

add open up udp for the squid server with iptables
==============================

Code: Select all

# iptables -A INPUT -I ethX -p udp --dport 3401 -j ACCEPT
julien_lf

Post by julien_lf »

i have about the same problem as glopglop, queries seem successful but they're both empty (0 items , 0 rows)

Code: Select all

Data Query Debug Information:
+ Running data query [11].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/webcache_squid_median.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.3495.1.3.2.2.1.1'
+ No SNMP data returned
when testing with a snmpwalk i get a lot of lines looking like the following :

Code: Select all

SNMPv2-SMI::enterprises.3495.1.1.1.0 = INTEGER: 1868
SNMPv2-SMI::enterprises.3495.1.1.2.0 = INTEGER: 1843168
SNMPv2-SMI::enterprises.3495.1.1.3.0 = Timeticks: (90029) 0:15:00.29
until the 2 last lines where i get an error :

Code: Select all

SNMPv2-SMI::enterprises.3495.1.5.2.1.1.10.0.105.81 = IpAddress: 10.0.105.81
Error: OID not increasing: SNMPv2-SMI::enterprises.3495.1.5.2.1.1.10.0.105.91
 >= SNMPv2-SMI::enterprises.3495.1.5.2.1.1.10.0.105.81
any help would be greatly appreciated :(
User avatar
kwabbernoot
Cacti User
Posts: 99
Joined: Mon Oct 13, 2003 4:11 am
Location: Zottegem, Belgium

Squid SNMP

Post by kwabbernoot »

Hi,

If you use the SNMP deamon of the system you need to proxy your squid SNMP stats into the SNMP deamon of the system.

To do so add the following to your "snmpd.conf"

Code: Select all

# Retrieve Squid Proxy SNMP
proxy -v 1 -c your_community_string localhost:3401 .1.3.6.1.4.1.3495.1
This makes your System SNMP deamon proxy the Squid SNMP stats.
Otherwise your SNMP deamon that is running on the same port will intercept the querries for Squid and returns no data.

Hope this helps,
Kwabbernoot
metH

graph problem

Post by metH »

hy guys,

ive got a problem with my cacti tool and squid-monitoring (running cacti 0.8.5a).

when i create a graph for my host the debug mode says:

ERROR: opening '/opt/lampp/htdocs/cacti/rra/squid_port_8080_squid_serverinkb_507.rrd': No such file or directory

what does this mean ?

i think when i press the "create" button, the cacti doesn't create a .rrd file ?

any ideas?

thank for your help! :)
User avatar
kwabbernoot
Cacti User
Posts: 99
Joined: Mon Oct 13, 2003 4:11 am
Location: Zottegem, Belgium

No .rrd file

Post by kwabbernoot »

Hi,

This usually means that Cacti did not create your rrd file.
These files are created whenever the Cacti poller executes your stat request for the first time.

In case you use "cmd.php" it will create the file, in case you use "cactid" this process will create the file.

In case that either of these processes do not create any files you should check the permissions of the <path_cacti>/rra and <path_cacti>/log.
The permissions on these directories should permit read and write access for the user and group that is used by the polling process.

Regards,
Kwabbernoot
Guest

Post by Guest »

all other graphs are working without any problem ...

so, the permissions are okay.
User avatar
kwabbernoot
Cacti User
Posts: 99
Joined: Mon Oct 13, 2003 4:11 am
Location: Zottegem, Belgium

Log File

Post by kwabbernoot »

What does the cacti log file specify ?

If no log file is present you can always redirect your crontab to a log file.

I use cactid to retreive my stats and I use a script that also generates a log file for script debug purposes:

Code: Select all

date > /home/cacti/cactid084_run.log;
/usr/share/cactid/bin/cactid >> /home/cacti/cactid084_run.log;
date >> /home/cacti/cactid084_run.log;
My crontab looks like this:

Code: Select all

# Get Cacti 0.8.4 Information
*/5 * * * * /home/cacti/run_cactid084 > /dev/null 2>&1
You could also redirect your output to a file directly. Instead of using "> /dev/nulll 2>&1".
I use a script because I additionaly log start and stop of deamon execution.

Regards,
Kwabbernoot
b0fh
Posts: 32
Joined: Fri Jul 18, 2003 3:46 am

Post by b0fh »

First I want to say thanks for this pack, it seems to work fine here. Update from cacti 0.8.3 to 0.8.5a was luckily painless for me :)
But I can't create a graph for "WebCache - Squid - Service Timers", although this is presented in page source, it's not in the dropdown-menu...
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests