Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 11244
  • Last Modified:

SNMP, (Return code of 127 is out of bounds - plugin may be missing)

I am trying to configure my Nagios server to monitor my routers. I am new to nagios, PHP and apache :( so not a real strong background here. I followed the Quick Start Quide for Ubuntu and all was well. Heck I even fixed my FastCGI issue this morning but I am not strongly suited in Cisco or SNMP either and I need to see what my routers are doing.

Here is the line from switch.cfg:

# Monitor Port 1 status via SNMP

define service{
      use                  generic-service      ; Inherit values from a template
      host_name            BROOMFIELD
      service_description      Port 1 Link Status
      check_command            check_snmp!-C OSI-SNMP
      }

Here is the error kicked up:       (Return code of 127 is out of bounds - plugin may be missing)

Google seems to indicate the plugins are not installed (they are as per the quickstart) or that the line is misconfigured. I am not sure what I need to add here to make it happy. ANy help is appreciated
0
slacker9876
Asked:
slacker9876
  • 3
  • 2
1 Solution
 
Kamran ArshadCommented:
Hi,

Please read the below article FAQ;

http://www.nagios.org/faqs/viewfaq.php?faq_id=17
0
 
slacker9876Author Commented:
OK so having looked there and then verifying the libexec I see SNMP was not installed with my other plugins. Here is the list of what I do have:

check_apt       check_file_age      check_log       check_oracle   check_tcp
check_breeze    check_flexlm        check_mailq     check_overcr   check_time
check_by_ssh    check_ftp           check_mrtg      check_ping     check_udp
check_clamd     check_http          check_mrtgtraf  check_pop      check_ups
check_cluster   check_icmp          check_nagios    check_procs    check_users
check_dhcp      check_ide_smart     check_nntp      check_real     check_wave
check_dig       check_ifoperstatus  check_nt        check_rpc      negate
check_disk      check_ifstatus      check_ntp       check_sensors  urlize
check_disk_smb  check_imap          check_ntp_peer  check_smtp     utils.pm
check_dns       check_ircd          check_ntp_time  check_ssh      utils.sh
check_dummy     check_load          check_nwstat    check_swap

Any reason this would not have been installed when I installed the plugins? What do I need to do to get it installed? net-snmp is installed on my system.
0
 
slacker9876Author Commented:
OK, I got rid of the 127 error buy downloading the newest plugins and recondiguring. Now I have a simple syntax issue as I am getting: SNMP problem - No data received from host

The command I have requested Nagios to issue is apparently:
Status Information:      SNMP problem - No data received from host
CMD: /usr/bin/snmpget -t 1 -r 5 -m '' -v 2c [authpriv] 192.168.99.1:161  

I am missing something. Here is my service definition ... any ideas what I am not telling it do that it needs to be told?

define service{
      use                  generic-service      ; Inherit values from a template
      host_name            BROOMFIELD
      service_description      Port 1 Link Status
      check_command            check_snmp!-C OSI-SNMP -P2c
      }
0
 
slacker9876Author Commented:
SHould anyone have a snipit of  their service definition I would not mind seeing / using it!!!
0
 
Kamran ArshadCommented:
In the file services.cfg you have to invoke the check like this:

check_command check_snmp! oid ! warnig value ! critical value !community !"Comment"!"Unit"
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now