Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Example command check_snmp[help]

  1. #1
    Join Date
    May 2010
    Location
    Loreto,Coimbra
    Posts
    10

    Angry Example command check_snmp[help]

    Someone else have a example how to add this command and the parameteres?
    RB

  2. #2
    Join Date
    May 2010
    Location
    Loreto,Coimbra
    Posts
    10

    Default help

    I put this in configuration
    command: Check_snmp
    argument:!191.254.0.34! -o !1.3.6.1.2.1.2.2.1.8.2! -C !2!, first is ip of host and the other is OID of router to now ifOperStaus.

    And I have a error: External command error: snmp_build: unknown failuresnmpget: Error building ASN.1 representation (Can't build OID for variable)

    what is necessary to do?
    RB

  3. #3
    Join Date
    May 2010
    Location
    Loreto,Coimbra
    Posts
    10

    Cool

    Now it's works but i have a little problem in list of services

    Status of service: is up
    Information of status: SNMP OK - up(1)

    In services with problem i have
    t-marc generic-service UNKNOWN 1h 3m 31s 22/06/2010 19:33:103 Usage:check_snmp -H <ip_address> -o <OID> [-w warn_range] [-c crit_range]


    In the arguments of command i write !ifOperStatus.1301!.

    What is wrong?


    Please help me

    Thanks
    Last edited by onoff; 22nd June 2010 at 19:46.
    RB

  4. #4
    Join Date
    Apr 2010
    Posts
    41

    Default

    What is your complete command please ?

  5. #5
    Join Date
    May 2010
    Location
    Loreto,Coimbra
    Posts
    10

    Angry

    The command is check_snmp!
    My configuration is:
    -Name of host:t-marc
    -Alias:RBS
    -IP:191.254.0.34
    -Monitoring:Poller Principal
    -Model:Router-PDH
    checkperiod:24*7
    check command:check_snmp
    Args:!ifOperStatus.1301!

    I want to add a generic host, with a command to check snmp to the 3rd interface of router and my problem is in the arguments of command i write !ifOperStatus.1301!.
    And i have this message
    t-marc generic-service UNKNOWN 1h 3m 31s 22/06/2010 19:33:103 Usage:check_snmp -H <ip_address> -o <OID> [-w warn_range] [-c crit_range]

    Thanks
    Last edited by onoff; 25th June 2010 at 11:04.
    RB

  6. #6
    Join Date
    Apr 2010
    Posts
    41

    Default

    You must test your command directly in terminal before using the Web interface.

    So in your linux server try to use the command :

    ./check_snmp -H IP_server -C communitty -o your_OID

    But, i think your error become that your parameter is wrong, you must specify the full OID. The parameter is !.1.3.6.1.2.1.2.2.1.8.1301

  7. #7
    Join Date
    May 2010
    Location
    Loreto,Coimbra
    Posts
    10

    Default

    If type ./check_snmp -H 191.254.0.34 -C public -o !.1.3.6.1.2.1.2.2.1.8.1.1301,
    I have this message bash: !.1.3.6.1.2.1.2.2.1.8.1.1301: event not found

    If type snmpget -v 1 -c public 191.254.0.34 OID 1.3.6.1.2.1.2.2.1.8.1301
    i have this message
    Error in packet
    Reason: (noSuchName) There is no such variable name in this MIB.
    Failed object: DISMAN-EVENT-MIB::mteHotOID

    IF-MIB::ifOperStatus.1301 = INTEGER: up(1)
    RB

  8. #8
    Join Date
    Apr 2010
    Posts
    41

    Default

    Quote Originally Posted by onoff View Post
    If type ./check_snmp -H 191.254.0.34 -C public -o !.1.3.6.1.2.1.2.2.1.8.1.1301,
    I have this message bash: !.1.3.6.1.2.1.2.2.1.8.1.1301: event not found

    your command is wrong don't use the '!' in command line.

    For execute the command you must be in the repertory where the they are nagios plungins

    probably /usr/local/nagios/libexec
    Last edited by Nuggy; 25th June 2010 at 14:06.

  9. #9
    Join Date
    May 2010
    Location
    Loreto,Coimbra
    Posts
    10

    Smile

    In cd usr/lib/nagios/plugins i type this ./check_snmp -H 191.254.0.34 -C public -o .1.3.6.1.2.1.2.2.1.8.1.1301
    and reply this External command error: Error in packet
    Reason: (noSuchName) There is no such variable name in this MIB.
    Failed object: iso.3.6.1.2.1.2.2.1.8.1.1301



    If type ls i have the command check_snmp!
    I need put the MIB of router inside this directory?
    Last edited by onoff; 26th June 2010 at 02:16.
    RB

  10. #10
    Join Date
    Dec 2004
    Location
    Montgeron
    Age
    37
    Posts
    1,129

    Default

    Quote Originally Posted by onoff View Post
    In cd usr/lib/nagios/plugins i type this ./check_snmp -H 191.254.0.34 -C public -o .1.3.6.1.2.1.2.2.1.8.1.1301
    and reply this External command error: Error in packet
    Reason: (noSuchName) There is no such variable name in this MIB.
    Failed object: iso.3.6.1.2.1.2.2.1.8.1.1301



    If type ls i have the command check_snmp!
    I need put the MIB of router inside this directory?
    Est-ce certain que cette instance de l'OID existe toujours ?
    De plus, il existe de nombreux plugins déjà bien écrits pour gérer les données remotées depuis les interfaces réseaux via SNMP. Pourquoi ne pas t'en servir ?
    Raphaël 'SurcouF' Bordet
    Je ne teste pas mes plugins en root, tu ne testes pas tes plugins en root...
    Dons Paypal

Similar Threads

  1. $ in Command Line
    By vKaiser in forum Interface
    Replies: 8
    Last Post: 27th April 2010, 17:21
  2. Notification command with rsh
    By daniele in forum Plugins
    Replies: 1
    Last Post: 25th January 2010, 09:13
  3. No output available from command...
    By NNagios in forum Nagios
    Replies: 7
    Last Post: 6th May 2008, 11:59
  4. Notification Command
    By RJF in forum Plugins
    Replies: 2
    Last Post: 13th December 2007, 13:58
  5. Php : command not found
    By Pskaddict in forum Setup
    Replies: 2
    Last Post: 14th November 2006, 11:30

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •