LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-08-2008, 04:12 PM   #1
sp149
Member
 
Registered: May 2007
Posts: 73

Rep: Reputation: 17
Nagios SNMP problem - No data received from host


i'm trying to monitor a switch with nagios

i am using the default configuration as mentioned in the nagios monitoring document

snmp community string is not public

when i give the
#/usr/local/nagios/libexec/check_snmp -H XX.XX.XX.XX -C 'xxxxx' -o 'sysUpTime.0'

I get the output
SNMP OK - Timeticks: (297945372) 34 days, 11:37:33.72 | SNMPv2-MIB::sysUpTime.0=Timeticks: (297945372) 34 days, 11:37:33.72

But in nagios web interface i get the error
========
Current Status: UNKNOWN
Status Information: SNMP problem - No data received from host
CMD: /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] XX.XX.XX.XX:161 sysUpTime.0

========

Can anyone help me..i am using all default configuration files
that comes along with nagios installation.


========
define service{
use generic-service ; Inherit values from a template
host_name linksys-srw224p
service_description Uptime
check_command check_snmp!-C public -o sysUpTime.0
}
=============
define host{
use generic-switch
host_name linksys-srw224p
alias Linksys SRW224P Switch
address XX.XX.XX.XX
hostgroups switches
}
===========
# Monitor uptime via SNMP

define service{
use generic-service
host_name linksys-srw224p
service_description Uptime
check_command check_snmp!-C public -o sysUpTime.0
}
==========
command.cfg configuration

# 'check_snmp' command definition
define command{
command_name check_snmp
command_line $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
}
 
Old 02-11-2008, 12:44 PM   #2
sp149
Member
 
Registered: May 2007
Posts: 73

Original Poster
Rep: Reputation: 17
Has this got to do anything with /etc/snmp/snmd.conf ?

Please guide
 
Old 04-24-2009, 02:55 PM   #3
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Rep: Reputation: 30
Unhappy Nagios 2.xx SNMP Issue

Hi there - were you able to resolve this issue?
I am too having problem but not too sure if yours is the same as I have.

Here's the error I'm getting when launching the command manually via terminal:
root@sybasedba2034:/usr/local/nagios# /usr/local/nagios/libexec/check_snmp -H 172.168.1.244 -C 'dbscomm' -o 'sysUpTime.0'
SNMP problem - No data received from host
CMD: /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] 172.168.1.244:161 sysUpTime.0

In Nagios admin page I get this error:
"SNMP problem - No data received from host"

Email notification I get this:
***** NAGIOS *****
Notification Type: PROBLEM
Host: ciscoasa-firewall
State: DOWN
Address: 172.168.1.244
Info: PING CRITICAL - Packet loss = 100%
Date/Time: Fri Apr 24 15:49:50 EDT 2009

Please advise.
Thank you!
DB



Quote:
Originally Posted by sp149 View Post
i'm trying to monitor a switch with nagios

i am using the default configuration as mentioned in the nagios monitoring document

snmp community string is not public

when i give the
#/usr/local/nagios/libexec/check_snmp -H XX.XX.XX.XX -C 'xxxxx' -o 'sysUpTime.0'

I get the output
SNMP OK - Timeticks: (297945372) 34 days, 11:37:33.72 | SNMPv2-MIB::sysUpTime.0=Timeticks: (297945372) 34 days, 11:37:33.72

But in nagios web interface i get the error
========
Current Status: UNKNOWN
Status Information: SNMP problem - No data received from host
CMD: /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] XX.XX.XX.XX:161 sysUpTime.0

========

Can anyone help me..i am using all default configuration files
that comes along with nagios installation.


========
define service{
use generic-service ; Inherit values from a template
host_name linksys-srw224p
service_description Uptime
check_command check_snmp!-C public -o sysUpTime.0
}
=============
define host{
use generic-switch
host_name linksys-srw224p
alias Linksys SRW224P Switch
address XX.XX.XX.XX
hostgroups switches
}
===========
# Monitor uptime via SNMP

define service{
use generic-service
host_name linksys-srw224p
service_description Uptime
check_command check_snmp!-C public -o sysUpTime.0
}
==========
command.cfg configuration

# 'check_snmp' command definition
define command{
command_name check_snmp
command_line $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
}
 
Old 04-25-2009, 12:00 AM   #4
sp149
Member
 
Registered: May 2007
Posts: 73

Original Poster
Rep: Reputation: 17
deibertine,

In my case it was an ip problem, the host configuration was reflecting a certain ip and in the dns the ip was pointing to another machine.

Not sure if this would be of any help to you.
 
Old 04-25-2009, 05:37 AM   #5
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Rep: Reputation: 30
Unhappy SNMP Issue

Quote:
Originally Posted by sp149 View Post
deibertine,

In my case it was an ip problem, the host configuration was reflecting a certain ip and in the dns the ip was pointing to another machine.

Not sure if this would be of any help to you.
Sorry but Im sort of confused on what you said...
Can you please briefly elaborate on the IPs you missed and which equipment were/had the issue?

Trying to get my snmp up and running but kept getting:
SNMP problem - No data received from host.
I've made sure that my cisco's snmp community is enabled et al - even configured my own community - running the command manually gave me the same error.
$ ./check_snmp -H 172.168.1.2 -P 1
SNMP problem - No data received from host
CMD: /usr/bin/snmpget -t 1 -r 5 -m '' -v 1 [authpriv] 172.168.1.2

Any ideas?
I'd appreciate it.
Thanks!

Last edited by deibertine; 04-25-2009 at 05:44 AM.
 
Old 07-12-2009, 12:16 AM   #6
Chrysalis
LQ Newbie
 
Registered: Oct 2003
Location: UK
Distribution: Debian
Posts: 8

Rep: Reputation: 0
I have same problem, snmpd is defenitly running as its supplying my cacti graphs nicely, in addition it responds to snmpwalk.

conclusion? either the nagios script has issues or we need to add something to the syntax that isn't documented.

ok guys the solution is to add -o .1.3.6.1.2.1.1.3.0 to end of command.

Last edited by Chrysalis; 07-12-2009 at 12:48 AM.
 
Old 07-12-2009, 01:10 AM   #7
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
Quote:
command.cfg configuration

# 'check_snmp' command definition
define command{
command_name check_snmp
command_line $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
}
check_snmp arguments should assign as follows
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o $ARG2$ -p $ARG3$



Quote:
define service{
use generic-service ; Inherit values from a template
host_name linksys-srw224p
service_description Uptime
check_command check_snmp!-C public -o sysUpTime.0
}
Here check_snmp parameters should assign as follows
check_snmp!xx.xx.xx.xx!communityname!mibs!snmp port

if snmp listen in default 161 port then no need to assgin that argument on command.cfg

Last edited by kirukan; 07-12-2009 at 01:12 AM.
 
Old 07-12-2009, 01:19 AM   #8
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
Quote:
solution is to add -o .1.3.6.1.2.1.1.3.0 to end of command
instead of mibsname(like sysUpTime.0) you can use mib values as "Chrysalis" said but this snmp translation problem cause due to net-Snmp-perl rpm missing, By installing the net-SNMP-perl we can solve this problem.
 
  


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
nagios + snmp aeby Linux - Server 3 08-29-2009 11:15 PM
How to change the snmp string in nagios monitoring tool aneeshn Linux - General 1 11-11-2007 06:23 AM
Nagios and SNMP Deaclen Linux - Software 1 02-28-2007 09:12 AM
Nagios and snmp authentication ebel.velda Linux - Software 1 02-28-2007 09:08 AM
Using SNMP in NAGIOS Bzw Linux - Networking 3 12-06-2004 07:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:55 AM.

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