Announcement

Collapse

New version of forum

Hi,

As you can see, the forum has been updated.

We took advantage of this migration to change the theme of the forum and to reorganize sections.

These new sections allow better classify subjects discussed. The old topics have been classified in the "Archives" section of the forum and remains accessible.

We reclassified the recent topics (since the 1st of July) in the news sections. To find your topics, please use search menu. We will reclassify active topics from Archives section to the new ones frequently.

Enjoy reading and discussions
See more
See less

Example command check_snmp[help]

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Example command check_snmp[help]

    Someone else have a example how to add this command and the parameteres?:mad:
    :-PRB

  • #2
    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?
    :-PRB

    Comment


    • #3
      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, 19:46.
      :-PRB

      Comment


      • #4
        What is your complete command please ?

        Comment


        • #5
          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, 11:04.
          :-PRB

          Comment


          • #6
            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

            Comment


            • #7
              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)
              :-PRB

              Comment


              • #8
                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, 14:06.

                Comment


                • #9
                  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, 02:16.
                  :-PRB

                  Comment


                  • #10
                    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

                    Comment


                    • #11
                      Puis-je utiliser pourquoi pas! Pouvez-vous me donner un exemple?
                      Comment puis-je configurer les arguments de la commande dans Centreon? Cela a été mon problème.
                      Je l'ai fait dans l'argument (!IfOperStatus.1301!)

                      Merci

                      Can I use why not! Can you give me an example?
                      How do I set the arguments of the command in Centreon? This has been my problem.
                      I have done so in the argument (!IfOperStatus.1301!)

                      Thanks
                      Last edited by onoff; 27th June 2010, 18:28.
                      :-PRB

                      Comment


                      • #12
                        I've been testing the arguments and the problem I have is when everything is ok messages are in the up and state information is ok snmp (1) and withdraw the interface I have messages on the up and state information snmp down (2).

                        Should not be in critical or down condition at the time's up?
                        Last edited by onoff; 30th June 2010, 23:54.
                        :-PRB

                        Comment

                        Working...
                        X