Graph templates for Squid

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

Moderators: Developers, Moderators

Post Reply
Tolien
Posts: 4
Joined: Tue May 31, 2005 5:05 pm

Post by Tolien »

I can't get net-snmp to handle proxying the SNMP requests to Squid.
Running snmpwalk with the community and port to access the Squid proxy directly, I get all the values I'm supposed to get, but accessing the snmpd I get:
:~$ snmpwalk -m /usr/share/squid/mib.txt -v 2c -c community localhost .1.3.6.1.4.1.3495.1
SQUID-MIB::squid = No more variables left in this MIB View (It is past the end of the MIB tree)
Nothing appears in syslog from Squid when I run the snmpwalk, though snmpd does show "Connection from 127.0.0.1".

In snmpd.conf I've got
proxy -m /usr/share/squid/mib.txt -c community -v 1 localhost:3401 .1.3.6.1.4.1.3495.1
Restarting either squid or snmpd doesn't produce any messages in syslog that seem related (more to the point, doesn't produce any messages that aren't there when the snmp config is commented out).

Any suggestions, since I'm stumped. :(
pbulteel
Cacti User
Posts: 150
Joined: Fri Sep 05, 2003 9:20 am
Location: London
Contact:

Post by pbulteel »

Hi - I posted this elsewhere, someone posted it in the previous page

---------

You can configure your snmpd.conf file to passthrough snmp queries like ...

proxy -v 1 -c <communityname> <squid_machine>:3401 .1.3.6.1.4.1.3495.1

In my case -

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

Hope this helps.

-P
-------

You have

proxy -m /usr/share/squid/mib.txt -c community -v 1 localhost:3401 .1.3.6.1.4.1.3495.1

Try the one above without the mib.txt (which would be faster anyway)

-P

I also noticed that you are using -v 2c in the snmpwalk... try just -v 1
uname -a
Tolien
Posts: 4
Joined: Tue May 31, 2005 5:05 pm

Post by Tolien »

Sorry, been away for a few days, hence lack of response.

Dropped the -m /usr/share/squid/mib.txt and tried -v 1 in the snmpwalk. The output I get is now:
~$ snmpwalk -v 1 -c hammondpublic localhost .1.3.6.1.4.1.3495.1
End of MIB
Squid logs still show no SNMP connection is made, but snmpd log shows "Connection from 127.0.0.1".
paulom
Posts: 3
Joined: Thu Aug 11, 2005 1:04 pm

Resizing Graphs

Post by paulom »

Hi!

I'm using squid graphs, everything ok, but every day I run by CRON program logrotate for gzip the logs and create new logs. Squid is stop and after new logs is created, Squid is started.

The problem is: Squid Traffic in/out saved is resizing and go to 100 Gbps; DNS statistics is resizing to 15 M queries/second; etc.

Anyone knows how can I resolve this problem?

Thks,

Paulo
Suicidal
Posts: 6
Joined: Mon Jan 23, 2006 3:21 am
Contact:

Post by Suicidal »

PKLNTKJ334 wrote:hi all,

proxy -v 1 -c <communityname> <squid_machine>:3401 .1.3.6.1.4.1.3495.1
Works perfectly ;

Apparently cactid-0.8.6g wont poll to non standard snmp ports so in Squid's case this is basically a necessity now.

Also saves time not having to alter data templates.
zeroy
Posts: 25
Joined: Wed Jan 25, 2006 8:27 am

Post by zeroy »

Can't get this to work.... I added the line in snmpd.conf:

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

but running the Cron job I get:

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: .1.3.6.1.4.1.3495.1.3.2.1.4

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: .1.3.6.1.4.1.3495.1.3.2.1.5

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: .1.3.6.1.4.1.3495.1.3.2.1.1

Strange thing is that running in command line wrks perfect! Help!
¬¬ZeRoY¬¬
zeroy
Posts: 25
Joined: Wed Jan 25, 2006 8:27 am

Post by zeroy »

in command line:

snmpget -v 1 -c public localhost:3401 .1.3.6.1.4.1.3495.1
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI::enterprises.3495.1

This is the same message i am getting when running poller.php
Last edited by zeroy on Wed Jan 25, 2006 6:19 pm, edited 1 time in total.
¬¬ZeRoY¬¬
zeroy
Posts: 25
Joined: Wed Jan 25, 2006 8:27 am

Post by zeroy »

here is full list of OID for Squid Proxy for those interested,

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
¬¬ZeRoY¬¬
tman
Cacti User
Posts: 97
Joined: Thu Oct 14, 2004 4:14 pm

Post by tman »

Same problem here. Added the line to our Squid server (RHEL 4 running net-snmp 5.3), and I get the following;

snmpwalk -v 1 -c ##### <host> .1.3.6.1.4.1.3495
SNMPv2-SMI::enterprises.3495 = No Such Object available on this agent at this OID

How comes this is working for some and not others???
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Did you restart snmpd after changing the snmpd.conf?
Reinhard
User avatar
dust2k
Cacti User
Posts: 101
Joined: Sun Dec 04, 2005 3:14 am

Post by dust2k »

tman wrote:Same problem here. Added the line to our Squid server (RHEL 4 running net-snmp 5.3), and I get the following;

snmpwalk -v 1 -c ##### <host> .1.3.6.1.4.1.3495
SNMPv2-SMI::enterprises.3495 = No Such Object available on this agent at this OID

How comes this is working for some and not others???
maybe new version's problem, many things work on 0.8.6g but not work on 0.8.6h, I tried this one and isn't working for me as well, weired.

I got this...

02/03/2006 03:36:52 AM - CMDPHP: Poller[0] Host[5] DS[140] SNMP: v2: 192.168.1.20, dsname: http_requests, oid: , output: U
02/03/2006 03:36:52 AM - CMDPHP: Poller[0] Host[5] DS[140] WARNING: Result from SNMP not valid. Partial Result:
02/03/2006 03:36:52 AM - CMDPHP: Poller[0] Host[5] DS[139] SNMP: v2: 192.168.1.20, dsname: http_data_sent, oid: , output: U
02/03/2006 03:36:52 AM - CMDPHP: Poller[0] Host[5] DS[139] WARNING: Result from SNMP not valid. Partial Result:
02/03/2006 03:36:52 AM - CMDPHP: Poller[0] Host[5] DS[138] SNMP: v2: 192.168.1.20, dsname: http_data_received, oid: , output: U
02/03/2006 03:36:52 AM - CMDPHP: Poller[0] Host[5] DS[138] WARNING: Result from SNMP not valid. Partial Result:

it doesn't even have oid in query, sounds bit crazy..hehe.

Don't know what's wrong, but I found the way to work around, proxy certainly doesn't work for me, so I just import template, then change data template to put oid by myself and put port 3401, finally it's working.
paulbeard206
Cacti User
Posts: 150
Joined: Sat Jul 30, 2005 2:15 pm

any thought on extending these?

Post by paulbeard206 »

There are a lot of values exported via squid's snmpd interface: has anyone added any of them?

Code: Select all

SQUID-MIB::cacheSysVMsize.0 = INTEGER: 100
SQUID-MIB::cacheSysStorage.0 = INTEGER: 1019854
SQUID-MIB::cacheUptime.0 = Timeticks: (668393) 1:51:23.93
SQUID-MIB::cacheAdmin.0 = STRING: root
SQUID-MIB::cacheSoftware.0 = STRING: squid
SQUID-MIB::cacheVersionId.0 = STRING: "2.5.STABLE6"
SQUID-MIB::cacheLoggingFacility.0 = STRING: ALL,1
SQUID-MIB::cacheMemMaxSize.0 = INTEGER: 8
SQUID-MIB::cacheSwapMaxSize.0 = INTEGER: 7000
SQUID-MIB::cacheSwapHighWM.0 = INTEGER: 95
SQUID-MIB::cacheSwapLowWM.0 = INTEGER: 90
SQUID-MIB::cacheSysPageFaults.0 = Counter32: 2
SQUID-MIB::cacheSysNumReads.0 = Counter32: 0
SQUID-MIB::cacheMemUsage.0 = INTEGER: 7424
SQUID-MIB::cacheCpuTime.0 = INTEGER: 0
SQUID-MIB::cacheCpuUsage.0 = INTEGER: 0
SQUID-MIB::cacheMaxResSize.0 = INTEGER: 0
SQUID-MIB::cacheNumObjCount.0 = Gauge32: 49761
SQUID-MIB::cacheCurrentLRUExpiration.0 = Timeticks: (0) 0:00:00.00
SQUID-MIB::cacheCurrentUnlinkRequests.0 = Counter32: 0
SQUID-MIB::cacheCurrentUnusedFDescrCnt.0 = Gauge32: 1013
SQUID-MIB::cacheCurrentResFileDescrCnt.0 = Gauge32: 100
SQUID-MIB::cacheProtoClientHttpRequests.0 = Counter32: 0
SQUID-MIB::cacheHttpHits.0 = Counter32: 0
SQUID-MIB::cacheHttpErrors.0 = Counter32: 0
SQUID-MIB::cacheHttpInKb.0 = Counter32: 0
SQUID-MIB::cacheHttpOutKb.0 = Counter32: 0
SQUID-MIB::cacheIcpPktsSent.0 = Counter32: 0
SQUID-MIB::cacheIcpPktsRecv.0 = Counter32: 0
SQUID-MIB::cacheIcpKbSent.0 = Counter32: 0
SQUID-MIB::cacheIcpKbRecv.0 = Counter32: 0
SQUID-MIB::cacheServerRequests.0 = INTEGER: 0
SQUID-MIB::cacheServerErrors.0 = INTEGER: 0
SQUID-MIB::cacheServerInKb.0 = Counter32: 0
SQUID-MIB::cacheServerOutKb.0 = Counter32: 0
SQUID-MIB::cacheCurrentSwapSize.0 = Gauge32: 1019854
SQUID-MIB::cacheClients.0 = Gauge32: 0
SQUID-MIB::cacheMedianTime.1 = INTEGER: 1
SQUID-MIB::cacheMedianTime.5 = INTEGER: 5
SQUID-MIB::cacheMedianTime.60 = INTEGER: 60
SQUID-MIB::cacheHttpAllSvcTime.1 = INTEGER: 0
SQUID-MIB::cacheHttpAllSvcTime.5 = INTEGER: 0
SQUID-MIB::cacheHttpAllSvcTime.60 = INTEGER: 0
SQUID-MIB::cacheHttpMissSvcTime.1 = INTEGER: 0
SQUID-MIB::cacheHttpMissSvcTime.5 = INTEGER: 0
SQUID-MIB::cacheHttpMissSvcTime.60 = INTEGER: 0
SQUID-MIB::cacheHttpNmSvcTime.1 = INTEGER: 0
SQUID-MIB::cacheHttpNmSvcTime.5 = INTEGER: 0
SQUID-MIB::cacheHttpNmSvcTime.60 = INTEGER: 0
SQUID-MIB::cacheHttpHitSvcTime.1 = INTEGER: 0
SQUID-MIB::cacheHttpHitSvcTime.5 = INTEGER: 0
SQUID-MIB::cacheHttpHitSvcTime.60 = INTEGER: 0
SQUID-MIB::cacheIcpQuerySvcTime.1 = INTEGER: 0
SQUID-MIB::cacheIcpQuerySvcTime.5 = INTEGER: 0
SQUID-MIB::cacheIcpQuerySvcTime.60 = INTEGER: 0
SQUID-MIB::cacheIcpReplySvcTime.1 = INTEGER: 0
SQUID-MIB::cacheIcpReplySvcTime.5 = INTEGER: 0
SQUID-MIB::cacheIcpReplySvcTime.60 = INTEGER: 0
SQUID-MIB::cacheDnsSvcTime.1 = INTEGER: 0
SQUID-MIB::cacheDnsSvcTime.5 = INTEGER: 0
SQUID-MIB::cacheDnsSvcTime.60 = INTEGER: 0
SQUID-MIB::cacheRequestHitRatio.1 = INTEGER: 0
SQUID-MIB::cacheRequestHitRatio.5 = INTEGER: 0
SQUID-MIB::cacheRequestHitRatio.60 = INTEGER: 0
SQUID-MIB::cacheRequestByteRatio.1 = INTEGER: 0
SQUID-MIB::cacheRequestByteRatio.5 = INTEGER: 0
SQUID-MIB::cacheRequestByteRatio.60 = INTEGER: 0
SQUID-MIB::cacheIpEntries.0 = Gauge32: 214
SQUID-MIB::cacheIpRequests.0 = Counter32: 0
SQUID-MIB::cacheIpHits.0 = Counter32: 0
SQUID-MIB::cacheIpPendingHits.0 = Gauge32: 0
SQUID-MIB::cacheIpNegativeHits.0 = Counter32: 0
SQUID-MIB::cacheIpMisses.0 = Counter32: 0
SQUID-MIB::cacheBlockingGetHostByName.0 = Counter32: 0
SQUID-MIB::cacheAttemptReleaseLckEntries.0 = Counter32: 0
SQUID-MIB::cacheFqdnEntries.0 = Gauge32: 98
SQUID-MIB::cacheFqdnRequests.0 = Counter32: 0
SQUID-MIB::cacheFqdnHits.0 = Counter32: 0
SQUID-MIB::cacheFqdnPendingHits.0 = Gauge32: 0
SQUID-MIB::cacheFqdnNegativeHits.0 = Counter32: 0
SQUID-MIB::cacheFqdnMisses.0 = Counter32: 0
SQUID-MIB::cacheBlockingGetHostByAddr.0 = Counter32: 0
SQUID-MIB::cacheDnsRequests.0 = Counter32: 0
SQUID-MIB::cacheDnsReplies.0 = Counter32: 0
SQUID-MIB::cacheDnsNumberServers.0 = Counter32: 0
cacheRequestHitRatio looks worth monitoring, for example.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

How did you find that lot of OIDs? My squid won't tell me that much (looks like the post of zeroy and is a 2.5 STABLE11).
Reinhard
User avatar
dust2k
Cacti User
Posts: 101
Joined: Sun Dec 04, 2005 3:14 am

Re: any thought on extending these?

Post by dust2k »

paulbeard206 wrote:There are a lot of values exported via squid's snmpd interface: has anyone added any of them?

cacheRequestHitRatio looks worth monitoring, for example.
Yes, I add 11 of them :)
paulbeard206
Cacti User
Posts: 150
Joined: Sat Jul 30, 2005 2:15 pm

non-repeatable results

Post by paulbeard206 »

lvm wrote:How did you find that lot of OIDs? My squid won't tell me that much (looks like the post of zeroy and is a 2.5 STABLE11).
Reinhard
if you load the mib file that comes with the distribution, it should work. I have attached it as well.
Attachments
mib.txt
mib file for squid's snmp module
(25.49 KiB) Downloaded 2366 times
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests