Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 08-29-2009, 08:39 AM   #1
Registered: Aug 2008
Distribution: Debian
Posts: 61

Rep: Reputation: 15
using nagios check_snmp plugin to get snmp info from computer

by manually run
# ./check_snmp -H -C public -P 1 -o HOST-RESOURCES-MIB::hrDiskStorageCapacity.6

i can get snmp data, but how to define that check as check_command in a computer/host config file?
Old 08-29-2009, 02:59 PM   #2
Senior Member
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,275

Rep: Reputation: 148Reputation: 148
I don't know the purpose why you are checking whole disk capacity(is there disk array?) because usually we are checking disk usage, however refer the following site
Old 09-08-2009, 04:12 AM   #3
Registered: Aug 2008
Distribution: Debian
Posts: 61

Original Poster
Rep: Reputation: 15

Finally, I found a way to get snmp info from a host
  1. Run snmpwalk to view OID name
    snmpwalk -v 1 -c public
    Note that public is the community string and 1 is the SNMP version
  2. Pick one, ie: SNMPv2-MIB::sysContact.0 (sysadmin mail address)
  3. Use snmptranslate to get OID number
    snmptranslate -On SNMPv2-MIB::sysContact.0
  4. Check the OID number with check_snmp manually
    ./check_snmp -H -C public -o .
  5. Take note of check_snmp options and arguments, then define/edit a command
    define command{
            command_name    check_snmp
            command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -C public -o $ARG1$
    Note that $HOSTADDRESS$ is a macro so no need to fill that out since it will refer to current host config
  6. Define a service for that
    define service{
            use                             other-service
            host_name                       laptop
            service_description             Admin email
            check_command                   check_snmp!.
    Since the first and second argument already filled out in command definition, we just need to add the last argument which is the OID number with exclamation mark (!) before it. Of course, other-service template is already defined.

Last edited by umarzuki; 09-08-2009 at 04:24 AM. Reason: typo


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 check_snmp not found sp149 Linux - Server 10 01-04-2017 09:32 AM
nagios + snmp aeby Linux - Server 3 08-30-2009 12:15 AM
Nagios check_snmp plugin not found ataru Linux - Server 8 04-10-2009 03:18 PM
Nagios and SNMP Deaclen Linux - Software 1 02-28-2007 10:12 AM
Using SNMP in NAGIOS Bzw Linux - Networking 3 12-06-2004 08:13 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:20 AM.

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