LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-01-2005, 11:21 AM   #1
vimico
Member
 
Registered: Jan 2004
Distribution: Debian, Ubuntu
Posts: 118

Rep: Reputation: 15
cacti, traffic stats and snmp - config prob?


Hi,

I'm trying to create a traffic statistic in cacti for the interfaces of my linux box. (Debian Sarge, testing).

I'm following the How-To on the cacti homepage, which is not that clear for someone new to snmp.

My current problem is, that snmp does not return the interfaces available on that box.

Installed by now are net snmp, libsensors3 and libsnmp5.

With
Code:
 snmpwalk -c public -v 2c localhost
I get some info back.

When I follow the cacti howto, at some point when creating a graph, a list of devices should be displayed. But none is found. In debug mode, this message is shown:

Code:
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
and
Code:
 snmpwalk -c public -v 2c localhost .1.3.6.1.2.1.2.2.1.1
returns
Code:
IF-MIB:ifIndex = No such Object available on this agent at this OID
Any config info I should know about, or any libs that still have to be installed?

Thanks
 
Old 11-01-2005, 11:29 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
that oid should list your interfaces. e.g.
Code:
chris@kermit ~ $ snmpwalk -v 2c -c public localhost .1.3.6.1.2.1.2.2.1.1
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
so i have two interfaces, which further down the line would be found to be eth0 and lo. that's gonna be an issue on the snmp server, not cacti or anything further down the line. this may well have been restricted via the snmpd.conf or such like.
 
Old 11-01-2005, 01:22 PM   #3
vimico
Member
 
Registered: Jan 2004
Distribution: Debian, Ubuntu
Posts: 118

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by acid_kewpie
that oid should list your interfaces...
Yeah.. I know.

Quote:
Originally posted by vimico
My current problem is, that snmp does not return the interfaces available on that box.
But all I get is the error message mentioned above....

All config files are those created by Debian on install. Perhaps some settings might be changed... I don't know.
 
Old 11-01-2005, 04:13 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well post your snmpd.conf and we;ll ahve a look
 
Old 11-02-2005, 04:05 AM   #5
vimico
Member
 
Registered: Jan 2004
Distribution: Debian, Ubuntu
Posts: 118

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by acid_kewpie
well post your snmpd.conf and we;ll ahve a look
This is - apart from the syslocation info - the config file that was installed by Debian Sarge. I removed most of the comments.

Code:
# Access Control

####
# First, map the community name (COMMUNITY) into a security name
# (local and mynetwork, depending on where the request is coming
# from):

#       sec.name  source          community
com2sec paranoid  default         public
#com2sec readonly  default         public
#com2sec readwrite default         private

####
# Second, map the security names into group names:

#             	sec.model  sec.name
group MyROSystem v1        paranoid
group MyROSystem v2c       paranoid
group MyROSystem usm       paranoid
group MyROGroup v1         readonly
group MyROGroup v2c        readonly
group MyROGroup usm        readonly
group MyRWGroup v1         readwrite
group MyRWGroup v2c        readwrite
group MyRWGroup usm        readwrite

####
# Third, create a view for us to let the groups have rights to:

#           incl/excl subtree                          mask
view all    included  .1                               80
view system included  .iso.org.dod.internet.mgmt.mib-2.system

####
# Finally, grant the 2 groups access to the 1 view with different
# write permissions:

#                context sec.model sec.level match  read   write  notif
access MyROSystem ""     any       noauth    exact  system none   none
access MyROGroup ""      any       noauth    exact  all    none   none
access MyRWGroup ""      any       noauth    exact  all    all    none

# -----------------------------------------------------------------------------


###############################################################################
# System contact information
#

syslocation My new computer 
syscontact <mike@localhost> 


###############################################################################
# Process checks.
#

###############################################################################
# Executables/scripts
#

###############################################################################
# disk checks
#

###############################################################################
# load average checks
#

###############################################################################
# Extensible sections.
# 

###############################################################################
# Pass through control.
# 


###############################################################################
# Subagent control
#

#
#  master  agentx
#
Thank you for your help.
 
Old 11-02-2005, 05:17 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
ok, so the public community name is mapped to a "paranoid"group, not a read-only group. i reckon if you comment out that com2sec line, and uncomment the Read-Only line below it, you'll get the sata just just, as you can see the paranois one details "system" info only, while the read-only one provides all data.
 
Old 11-02-2005, 08:09 PM   #7
vimico
Member
 
Registered: Jan 2004
Distribution: Debian, Ubuntu
Posts: 118

Original Poster
Rep: Reputation: 15
Thumbs up

Yes.. that did it.

Thank you very much.
 
Old 07-13-2009, 11:46 AM   #8
sbtiwari
LQ Newbie
 
Registered: Jun 2009
Posts: 8

Rep: Reputation: 0
Question command works on the command line but not through cacti

Hi,

I am sorry if I am being too silly. But my issue is this.

I have a server X which I am trying to monitor using cacti on server Y. I have edited the snmpd.conf file on the X as shown above. But the problem still persists i.e. on cacti when I run the query in verbose mode I get the following output,

+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/interface.xml'

Now when I run the following command on X, I get the following output.

$ snmpwalk -c public -v 2c localhost .1.3.6.1.2.1.2.2.1.1
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3

I am not sure why am I getting the following errors. Can anyone please guide me through this. Any help would be appreciated.

Thanks,
Swati
 
Old 07-13-2009, 12:30 PM   #9
sbtiwari
LQ Newbie
 
Registered: Jun 2009
Posts: 8

Rep: Reputation: 0
I found the answer, all my settings were right but in cacti, on the devices page, for some reason, I had not selected the snmp version which had created the problem.

Sorry,

Cheers,
Swati
 
Old 07-13-2009, 12:31 PM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
please don't drag up dead threads. Let them rest in peace and start your own thread if need be.
 
Old 07-13-2009, 12:35 PM   #11
sbtiwari
LQ Newbie
 
Registered: Jun 2009
Posts: 8

Rep: Reputation: 0
I apologize, I am not aware of the etiquette here. Will remember this. Thank you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cacti Installation Problems with include/config.php tovythomas Linux - Software 2 03-13-2007 06:49 PM
snmp config mac_casey SUSE / openSUSE 2 11-11-2005 04:52 PM
snmp config trouble noisybastard Linux - Networking 2 05-08-2003 11:00 PM
sendmail config prob joesbox Linux - General 4 03-09-2003 10:17 PM
snmp (ucd-snmp, net-snmp) markus1982 Linux - Software 1 11-21-2002 10:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration