[solved] Use two different port in one host?

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

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
Kini
Posts: 25
Joined: Mon Jul 27, 2009 9:07 am
Location: Germany

[solved] Use two different port in one host?

#1 Post by Kini » Tue Aug 25, 2009 1:44 am

Hello Cacti-Team,

my next question is how to use different ports in one host?
I am monitoring two SQUID proxies. The problem here is that the SNMP Interface Traffic Information is sent over Port 161 though the HTTP information is sent over 3401.

So how to use two different ports in one host? 3401 for the graph templates and 161 for the querries?

engeishi
Cacti User
Posts: 75
Joined: Sun Aug 23, 2009 12:03 pm
Location: Tokyo, Japan

#2 Post by engeishi » Tue Aug 25, 2009 4:54 am

I think Cacti doesn't support multiple snmp port in one device.

Why don't you use net-snmp's proxy function described this topic?
http://forums.cacti.net/viewtopic.php?t=6057
It is old topic, but the configuration should work.

User avatar
Howie
Cacti Guru User
Posts: 5333
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

#3 Post by Howie » Tue Aug 25, 2009 6:14 am

Agreed. This is what we do to allow us to talk to the SNMP agent embedded in our RADIUS servers:

proxy -v 1 -c <community> 127.0.0.1:9161 .1.3.6.1.3.79

(and limit access to localhost only on the other side running on 9161)

has worked fine for several years.
Weathermap 0.98 is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)

User avatar
Kini
Posts: 25
Joined: Mon Jul 27, 2009 9:07 am
Location: Germany

#4 Post by Kini » Wed Aug 26, 2009 3:42 am

Okay ... I did this as described in the other thread.

Problem: The HTTP graphs for which the data had been sent over port 3401 are now coming on port 161. Okay so far.

But now the traffic isn`t graphing anymore.
Any further ideas?

User avatar
Howie
Cacti Guru User
Posts: 5333
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

#5 Post by Howie » Wed Aug 26, 2009 3:47 am

User_1337 wrote:Okay ... I did this as described in the other thread.

Problem: The HTTP graphs for which the data had been sent over port 3401 are now coming on port 161. Okay so far.

But now the traffic isn`t graphing anymore.
Any further ideas?
So you changed the host's SNMP port back to 161 in the Devices page of Cacti, right? (I guess you changed it to 3401 if the graph was working before)
Weathermap 0.98 is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)

User avatar
Kini
Posts: 25
Joined: Mon Jul 27, 2009 9:07 am
Location: Germany

#6 Post by Kini » Wed Aug 26, 2009 4:17 am

For sure. I added the same SQUID two times with all graphs.
First one 161. Second one 3401.

So I can see every change parallel.

Traffic is not graphed anymore.

User avatar
Howie
Cacti Guru User
Posts: 5333
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

#7 Post by Howie » Wed Aug 26, 2009 4:31 am

User_1337 wrote:For sure. I added the same SQUID two times with all graphs.
First one 161. Second one 3401.

So I can see every change parallel.

Traffic is not graphed anymore.
Huh? 161 should be the normal net-snmp smpd. It then passes through the request to the squid snmp agent.
Weathermap 0.98 is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)

engeishi
Cacti User
Posts: 75
Joined: Sun Aug 23, 2009 12:03 pm
Location: Tokyo, Japan

#8 Post by engeishi » Thu Aug 27, 2009 11:13 am

Please test your snmpd is work or not by command line, and let me know the result.

Code: Select all

snmpwalk -v 1 -c <COMMUNITY> <SERVER IP> .1.3.6.1.2.1.2.2.1

User avatar
Kini
Posts: 25
Joined: Mon Jul 27, 2009 9:07 am
Location: Germany

#9 Post by Kini » Wed Sep 23, 2009 4:08 am

I solved the problem by adding the host two times due to two different devices.

I added one device called "SQUID Traffic" with port 161 and I added one device called "SQUID HTTP" with port 3401.

After adding the needed graph templates to the several host and integrating the hosts cleanly and clearly arranged in the tree the result is okay for me.

User avatar
TheWitness
Developer
Posts: 14817
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#10 Post by TheWitness » Wed Sep 23, 2009 8:24 pm

There is a bug in Cacti, or so I found out when writing a Lossless Poller Reindex patch a few weeks ago. Cacti "should" respect the alternate port as designated in the Custom Data, but it is not. You can confirm this by looking at the SNMP cache under System Utilities.

I almost fixed it, but had to pull back so that I could meet another deadline. I still have the code that fixes this problem. However, the QA required to fully test is a bit too much for me now though without help.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

Post Reply