Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Aug 17, 2017 3:05 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: [HOWTO] Graph multiple servers using an SNMP proxy
PostPosted: Fri Jul 11, 2008 5:11 am 
Offline
Cacti Guru User
User avatar

Joined: Fri Sep 19, 2003 8:36 am
Posts: 2326
Location: Sophia-Antipolis, France
This HowTo will explain how to graph multiple device by querying a single host, using an SNMP proxy and "contexts".
It's useful if you don't want/can't open many firewall ports between your Cacti server and your target hosts.

  • Version 0.2 (07/23/2008) : few typos
  • Version 0.1 (07/11/2008) : initial release


This HowTo is based on the Net-SNMP wiki.

This has been tested with Net-SNMP 5.4
Note that it seems "community string/context mapping" has been correctly implemented with Net-SNMP 5.3

Image

In this example, the Cacti server can reach the Gateway, which can itself reach the target server.
IP forwarding is not needed.


First of all, set up the Net-SNMP agent on the target host (192.168.1.2) :
Code:
rocommunity public
disk /

From the "gateway" server, check that SNMP requests work as expected :
Code:
$ snmpwalk -v 1 -c public 192.168.1.2 sysname
SNMPv2-MIB::sysName.0 = STRING: hades



Next step is to configure the SNMP proxy on the "gateway" host :
Code:
# Define a simple view 'systemview', which includes everthing under .1.3.6.1
view    systemview     included      .1.3.6.1

# Map 'public' community to the 'notConfigUser'
com2sec notConfigUser  default       public

# Map 'notConfigUser' to 'notConfigGroup'
group   notConfigGroup v1            notConfigUser
group   notConfigGroup v2c           notConfigUser

# Give 'notConfigGroup' read access to objects in the view 'systemview'
access  notConfigGroup ""            any       noauth    exact  systemview none none

# v1/v2c community string for each proxied host
com2sec -Cn ctx_hades notConfigUser  default       cmty_hades

# Allow the 'notConfigUser' (a member of 'notConfigGroup') access for these contexts
access  notConfigGroup ctx_hades        any     noauth  prefix  systemview none none

# Setting up the proxy configuration
proxy -Cn ctx_hades -v 2c -c public 192.168.1.2 .1.3

Start (or restart) the SNMP agent on the "gateway" host, and run this SNMP request from the "gateway" host :
Code:
$ snmpwalk -v 1 -c cmty_hades localhost sysname
SNMPv2-MIB::sysName.0 = STRING: hades


If it's working as expected, run this SNMP request from your Cacti server :
Code:
$ snmpwalk -v 1 -c cmty_hades 192.168.0.2 sysname
SNMPv2-MIB::sysName.0 = STRING: hades


Voila ! Your target server can now be graphed in Cacti :D

If you want to proxy some other hosts, you'll have to duplicate the last 3 lines of the previous configuration example :
Code:
com2sec -Cn ctx_foo notConfigUser  default       cmty_foo
access  notConfigGroup ctx_foo        any     noauth  prefix  systemview none none
proxy -Cn ctx_foo -v 2c -c public 10.20.30.40 .1.3

_________________

HOWTOs :
Templates :


Last edited by fmangeant on Wed Jul 23, 2008 4:49 am, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 11, 2008 3:18 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
I love you, Frederic :wink:
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 23, 2008 4:47 am 
Offline
Cacti Guru User
User avatar

Joined: Fri Sep 19, 2003 8:36 am
Posts: 2326
Location: Sophia-Antipolis, France
Sorry Reinhard, you're not my type :D

_________________

HOWTOs :
Templates :


Top
 Profile  
 
 Post subject: Urgent,,how to send sms + email using thold?
PostPosted: Sun Dec 06, 2009 10:47 pm 
Offline

Joined: Thu Oct 01, 2009 3:15 am
Posts: 4
dear developer ,
I have install cacti and thold plugin successfully. and I can receive email when threshold is breached. but I don't know how to send alert text both via email and sms..

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 07, 2009 3:27 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
This is a THOLD related question. Please ask at the appropriate forum
R.

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Re: [HOWTO] Graph multiple servers using an SNMP proxy
PostPosted: Wed Dec 08, 2010 6:05 am 
Offline

Joined: Tue Jun 23, 2009 10:13 am
Posts: 3
Hello, I followed the guide but I'm having troubles to launch proxied monitoring with cacti. I'm using SNMP v3 and cacti 0.8.7e.
I'm getting correct results testing with snmpwalk from cacti host, but in cacti something is not right. Although the device's SNMP information and output from 'verbose query' are fine, when I create graphs there's no data. In log I can see following errors:

Image

The doubledot in the ending part of the OID seems strange.
Of course I tried setting MAX_OIDS to 1 but that doesn't help.
I checked the traffic with wireshark and cacti actually is not sending any packets. When i check this on the target device directly, whithout proxying (and thus without snmp context usage) the packet flow is ok and I'm getting data and graphs.

Do you have any ideas what might be wrong? Any help would be much appreciated.


Top
 Profile  
 
 Post subject: Re: [HOWTO] Graph multiple servers using an SNMP proxy
PostPosted: Fri Jul 01, 2011 4:26 am 
Offline

Joined: Fri Jul 01, 2011 4:16 am
Posts: 2
I have install cacti and thold plugin successfully. and I can receive email when threshold is breached. but I don't know how to send alert text both via email and sms..


Top
 Profile  
 
 Post subject: Re: [HOWTO] Graph multiple servers using an SNMP proxy
PostPosted: Fri Aug 05, 2011 6:30 am 
Offline

Joined: Fri Aug 05, 2011 6:26 am
Posts: 1
Thanks for this guide!

I want to connect from my Cacti server to the gateway via snmp v3 but don't know how to do that. Could somebody please help me?


Top
 Profile  
 
 Post subject: Re: [HOWTO] Graph multiple servers using an SNMP proxy
PostPosted: Thu Sep 22, 2011 6:56 am 
Offline

Joined: Sun Jul 10, 2011 8:22 am
Posts: 19
10x!
This is a grate.

I am using it and it helps me allot.
I have one thing that i cant do, can i use it to get snmp back from Cisco switch?
I dont get an error i get this "IF-MIB::ifIndex = No more variables left in this MIB View (It is past the end of the MIB tree)"

can i?


Top
 Profile  
 
 Post subject: Re: [HOWTO] Graph multiple servers using an SNMP proxy
PostPosted: Fri Feb 26, 2016 10:54 am 
Offline

Joined: Thu Feb 25, 2016 10:21 am
Posts: 1
Is there an easier way of doing this or a more detailed video showing how graph multiple servers using an snmp proxy as I can't seem to get it to work even after following the guide.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group