Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


[XML] SquidStats version 0.1 (cacti 0.8.5 only!!!)
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
kwabbernoot
Cacti User


Joined: 13 Oct 2003
Posts: 99
Location: Zottegem, Belgium

PostPosted: Tue Jun 15, 2004 3:45 am    Post subject: 0.8.5 upgrade Bug Reply with quote

b0fh,

You have the same problem that I had. This seems to be an 0.8.5 upgrade bug.

Please follow this link for the solution:
http://www.raxnet.net/board/viewtopic.php?t=3721&highlight=

Regards,
Kwabbernoot
Back to top
b0fh



Joined: 18 Jul 2003
Posts: 19

PostPosted: Thu Jun 17, 2004 9:35 am    Post subject: Reply with quote

Yesterday I had to restart squid because of an update. It might be that squid was down at the moment when cacti tried reading out values via snmp.
The whole thing gave a pretty ugly effect: At the restart-time, I have a very large value in graphs "Client request rate", "Squid CPU usage", "DNS Statistics", "Squid error rate" and "page faults" (all about 10M (Megs)...). Anything you could update about this?
Back to top
b0fh



Joined: 18 Jul 2003
Posts: 19

PostPosted: Mon Jul 12, 2004 3:43 am    Post subject: Reply with quote

I updated to rrdtool 1.0.47, now I get very "fat" lines in "client request rate" and "DNS statistics". (Seems to be LINE3 or so)... Whos issue is this?
Back to top
bilbo



Joined: 23 Oct 2004
Posts: 7

PostPosted: Wed Nov 24, 2004 10:48 am    Post subject: problems running squidstats with cacti 0.8.6b Reply with quote

Well, I know that squidstats is made for 0.8.5, but I even tried to use it with the current release. XML Import was ok.
But then I genereated the first host using the template "WebCache - Squid Server (SNMP)", SNMP Version set to 2 (even tried with version 1) and got

    Warning: Variable passed to each() is not an array or object in /usr/local/cacti-0.8.6b/lib/data_query.php on line 464

    Warning: Variable passed to each() is not an array or object in /usr/local/cacti-0.8.6b/lib/data_query.php on line 464

    Warning: Cannot modify header information - headers already sent by (output started at /usr/local/cacti-0.8.6b/lib/data_query.php:464) in /usr/local/cacti-0.8.6b/host.php on line 121

SNMP is working for the requested host. But the data query "WebCache - Squid Statistics - Core" does not show any item. Verbose query results in

    Warning: Variable passed to each() is not an array or object in /usr/local/cacti-0.8.6b/lib/data_query.php on line 464

    Warning: Cannot modify header information - headers already sent by (output started at /usr/local/cacti-0.8.6b/lib/data_query.php:464) in /usr/local/cacti-0.8.6b/host.php on line 75


Thnx for any help
Back to top
bilbo



Joined: 23 Oct 2004
Posts: 7

PostPosted: Fri Nov 26, 2004 12:11 pm    Post subject: Re: problems running squidstats with cacti 0.8.6b Reply with quote

bilbo wrote:
Well, I know that squidstats is made for 0.8.5, ...

Ok, I think I'm on the way now . Missed something from the README. Have to reconfigure my squid, will last a while.
I'll post the results for cacti-0.8.6b with patches applied.
Back to top
gninja
Cacti User


Joined: 24 Aug 2004
Posts: 293
Location: San Francisco, CA

PostPosted: Thu Dec 09, 2004 7:08 pm    Post subject: SquidStats and Cacti 0.8.6b Reply with quote

Has anyone gotten this to work with 0.8.6b?

I set my poll method to ping only, to try and get around the snmp errors, but I'm still getting host down, and no rrd files are getting created. The squid specific snmp queries ARE working, though.
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12642
Location: Muenster, Germany

PostPosted: Sat Dec 11, 2004 11:13 am    Post subject: Re: SquidStats and Cacti 0.8.6b Reply with quote

gninja wrote:
Has anyone gotten this to work with 0.8.6b?


Yes, it's now working for me.

But as long as you get ping problems (ICMP or SNMP), cacti o.8.6b won't even ask your squid to get the stats.
Try setting "Configuration Settings" -> "poller specific logging" -> "poller logging level" to debug and have a look at your cacti.log file. You will see, that ping test fails and nothing more happening, I suppose.

As far as I know there will be a change in 0.8.7 to suppress ping probing.
Perhaps, there is a firewall in between, blocking the ping probe?
Back to top
gninja
Cacti User


Joined: 24 Aug 2004
Posts: 293
Location: San Francisco, CA

PostPosted: Sat Dec 11, 2004 1:09 pm    Post subject: Reply with quote

Nope, both machines are on the same subnet with nothing more than a switch and a patch panel between them. I'll check the log output the next time I can drag myself away from World of Warcraft.
Back to top
gninja
Cacti User


Joined: 24 Aug 2004
Posts: 293
Location: San Francisco, CA

PostPosted: Sat Dec 11, 2004 1:32 pm    Post subject: Reply with quote

Ended up restraining myself and testing it.

Set log level to debug, and from what I can tell, it's not even attempting the ping. There're no messages at all for that host.
Back to top
gninja
Cacti User


Joined: 24 Aug 2004
Posts: 293
Location: San Francisco, CA

PostPosted: Fri Dec 17, 2004 4:53 pm    Post subject: Reply with quote

Still showing as down, despite successful pings. Maybe I can trick squid into supplying the information that cacti seems to want.
Back to top
Instigater
Cacti User


Joined: 13 Dec 2004
Posts: 94
Location: Jurmala, Latvia

PostPosted: Mon Jan 24, 2005 8:52 pm    Post subject: Reply with quote

The same problem
Importing XML went fine, uploading those 2 XML was OK.
Every graph creation process went without problems.
But graphs doesn't show, even rrd files are not created. Looked into pooler_item mysql table - nothing is shown about squid
What do we miss here?

Update:
Log file states:
Code:

 01/26/2005 04:10:43 AM - SYSTEM STATS: Time: 41.3046 s, Method: cmd.php, Processes: 1, Threads: N/A, Hosts: 8, Hosts/Process: 8
01/26/2005 04:10:43 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /home/cacti/rra/hp_skolas_55_traffic_in_109.rrd --template traffic_out:traffic_in 1106705402:2093071960:1245306230
01/26/2005 04:10:42 AM - CMDPHP: Poller[0] Time: 39.7868 s, Theads: N/A, Hosts: 7
01/26/2005 04:10:42 AM - PHPSVR: Poller[0] DEBUG: PHP Script Server Shutdown request received, exiting
01/26/2005 04:10:42 AM - CMDPHP: Poller[0] Host[13] SNMP: v1: 159.148.196.222, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.10, output: 1245306230
01/26/2005 04:10:42 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /home/cacti/rra/hp_skolas_55_traffic_in_107.rrd --template traffic_in:traffic_out 1106705402:3609279745:2176950979
01/26/2005 04:10:42 AM - CMDPHP: Poller[0] Host[13] SNMP: v1: 159.148.196.222, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.10, output: 2093071960


Poller cache states 7 hosts and nothing about squid box but SNMP cache clearly states presece of squid.
Code:

 Host: ---(squid), SNMP Query: WebCache - Squid Statistics - Core
Index: 0, Field Name: versionID, Field Value: 2.5.STABLE5
OID: .1.3.6.1.4.1.3495.1.2.3.0
Host: ---(squid), SNMP Query: WebCache - Squid Statistics - Median Based
Index: 1, Field Name: medianTime, Field Value: 1
OID: .1.3.6.1.4.1.3495.1.3.2.2.1.1.1
Host: ---(squid), SNMP Query: WebCache - Squid Statistics - Median Based
Index: 5, Field Name: medianTime, Field Value: 5
OID: .1.3.6.1.4.1.3495.1.3.2.2.1.1.5
Host: ---(squid), SNMP Query: WebCache - Squid Statistics - Median Based
Index: 60, Field Name: medianTime, Field Value: 60
OID: .1.3.6.1.4.1.3495.1.3.2.2.1.1.60


As we can see, cmd.php wants to make stats for 8 hosts but poller.php received only 7 of them.
Back to top
gninja
Cacti User


Joined: 24 Aug 2004
Posts: 293
Location: San Francisco, CA

PostPosted: Thu Jan 27, 2005 7:30 pm    Post subject: Snmpd proxy Reply with quote

Someone in another thread pointed out that snmpd has a proxy.

So, if you have snmpd running on the same box as you have squid (and you do, right?)... you can add:

proxy -v 1 -c public localhost:3401 .1.3.6.1.4.1.3495.1

(or whatever your community string is) to your snmpd.conf (anywhere in the file is fine)...

And then just add the squidstats queries to the host, instead of creating a seperate host entry.

And it works.
Back to top
b0fh



Joined: 18 Jul 2003
Posts: 19

PostPosted: Sat Jan 29, 2005 6:09 pm    Post subject: Reply with quote

Ok, I read that this is "0.8.5 only", but did any of you manage to get it running under 0.8.6c? I keep getting an "SNMP error" in my squid-device list...
Back to top
gninja
Cacti User


Joined: 24 Aug 2004
Posts: 293
Location: San Francisco, CA

PostPosted: Mon Jan 31, 2005 2:18 pm    Post subject: Reply with quote

Yes.

Like I posted in the post before yours. Add:

Code:

proxy -v 1 -c public localhost:3401 .1.3.6.1.4.1.3495.1


to your snmpd.conf

Then, instead of creating a seperate squid device in cacti, just add the squid data queries to your likely already monitored host, and create the graphs from there.
Back to top
b0fh



Joined: 18 Jul 2003
Posts: 19

PostPosted: Mon Jan 31, 2005 2:46 pm    Post subject: Reply with quote

Hm, I did that, but I keep getting "SNMP error" and NaN in my Graphs... Do I need to enable proxing in snmp? Any other configuration needed?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 2 of 9

 



Powered by phpBB © 2001, 2005 phpBB Group