SNMP on different port in 0.8?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Guest

SNMP on different port in 0.8?

Post by Guest »

Been waiting patiently for the release of 0.8 and just finished the upgrade, all my data appears to have come across fine -- with the exception of one data source. I have been using the SNMP function of SQUID to graph how well the cache is doing, because the snmp server for squid runs separately on a different port you have to pass the "ip-address:port" to snmpget, this used to work fine with 0.68 but the new version has error checking on the 'management ip' field, and only takes 15 characters (needed to use 10.100.1.88:3401) so i can no longer use this syntax, i have tried running on a different port so it fits in the sql field and editing the field manually but it still doesn't appear to work (command line output still shows up 10.100.1.88 not 10.100.1.88:340).
Is there a workaround for this or should i just write a script on the local host that queries the squid snmp server and reports back through ucd-snmp?
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Actually I apologize for overlooking this in 0.8. As you said, I did not support this in 0.6.8, but my lack of error checking their seemed to help ;-). Anyhow, my suggestion would be to make a script for now. I will try to accommodate this in the main release.

-Ian
fruers
Posts: 8
Joined: Mon Apr 21, 2003 9:57 pm
Location: Australia

Post by fruers »

Perhaps a port option?

Here is the script i wrote to get the data from squid:


Code: Select all

#!/bin/bash
snmpget=/usr/bin/snmpget
 
cacheProtoClientHttpRequests=`$snmpget -Ont "$1:3401" $2 enterprises.nlanr.squid.cachePerf.cacheProtoStats.cacheProtoAggregateStats.cacheProtoClientHttpRequests.0 | cut -d" " -f4`
cacheHttpHits=`$snmpget -Ont "$1:3401" $2 enterprises.nlanr.squid.cachePerf.cacheProtoStats.cacheProtoAggregateStats.cacheHttpHits | cut -d" " -f4`
 
echo requests:$cacheProtoClientHttpRequests cache_hits:$cacheHttpHits
You will need to add SQUID-MIB.txt to your snmp.conf
You4eea
Posts: 11
Joined: Sat Jan 26, 2002 7:00 pm
Contact:

Did this ever get resolved?

Post by You4eea »

I would like to run snmpd on a different port also. How do I tell cacti which port to use when doing snmpwalk or snmpget and where?
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests