Ad Widget

Collapse

problems with Items using SNMP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wikisb
    Member
    • May 2011
    • 64

    #1

    problems with Items using SNMP

    hi all!
    i wan't to monitor some interesting things of my hosts but i can't. one example of an item i can't work with it is this one: hrMemoryAvailable with OID: 1.3.6.1.4.1.2021.4.6. If i do a snmget against this item i get the following: Error in packet Reason noSuchName) there is no such variable name in this MIB. the same happens with hrSystemProcesses,... so getting this problem its normal my Zabbix can't monitor this items because it says is not supported.
    i have changed a couple of things in my snmp.conf but i can't manage to sort things out. i also added items like sysUpTime, sysName and they work with SNMP agent.
    any suggestion¿?
    thanks!!
  • MrKen
    Senior Member
    • Oct 2008
    • 652

    #2
    Add a zero to the end of the oid,

    1.3.6.1.4.1.2021.4.6.0

    That should work.

    MrKen
    Disclaimer: All of the above is pure speculation.

    Comment

    • wikisb
      Member
      • May 2011
      • 64

      #3
      MrKen thanks!!
      but not always it works putting a 0 at the end. i don't know if its a problem of my MIB's because if i want to monitor the load of my pc for 1, 5 or 15 min, for 1 min load: "1.3.6.1.4.1.2021.10.1.3.1" if i put a .0 at the end it doesn't gives me nothing. the same thing happens when i try to monitor AvailableRealMemory, AvailableRAMFree, RAMShared, RAM buffered...
      i don't know whats the problem or what i'm doing wrong
      thanks again!!

      Comment

      • ghoz
        Senior Member
        • May 2011
        • 204

        #4
        Don't worry, that's the way snmp works, for 'single items' it ends by .0
        for indexed or 'array' items, it end by an index, that can be anything, in the linux load example, it ends by .1, .2 or .3 meaning load for 1, 5, 15 minutes.

        Comment

        • MrKen
          Senior Member
          • Oct 2008
          • 652

          #5
          When searching for the correct OID, you should use snmpwalk.

          So, in your example for cpu load, do this: (notice that I don't put the 1 at the end)

          [root@zabbix etc]# snmpwalk -v2c -c public 1xx.xx.xx.xx 1.3.6.1.4.1.2021.10.1.3
          UCD-SNMP-MIB::laLoad.1 = STRING: 0.92
          UCD-SNMP-MIB::laLoad.2 = STRING: 0.91
          UCD-SNMP-MIB::laLoad.3 = STRING: 0.88

          Now you can use snmpget for
          1.3.6.1.4.1.2021.10.1.3.1
          1.3.6.1.4.1.2021.10.1.3.2
          1.3.6.1.4.1.2021.10.1.3.3

          MrKen
          Disclaimer: All of the above is pure speculation.

          Comment

          • wikisb
            Member
            • May 2011
            • 64

            #6
            hi again!!
            i'm a bit fed up with all this things of MIB's and its tree structure.
            i have done a snmpwalk like the one you tiped MrKen and what i get is "End of Mib" & "No more variables left in this MIB View(It is past the end of the MIB tree)"
            i also tried in some values snmpgetnext. i did it to 1.3.6.1.2.1.25.3.3.1.2 and it gave me the value of hrProcessorLoad but trying it with snmpget to the "next" OID it didn't printed nothing of value isn't a wierd thing¿?
            i'm a bit lost.....
            and thanks a lot to try to help me!!

            Comment

            • MrKen
              Senior Member
              • Oct 2008
              • 652

              #7
              Yes it can be difficult to come to grips with.
              Maybe a good idea to check out these tutorials.

              SNMP Tutorials: http://net-snmp.sourceforge.net/wiki....php/Tutorials

              MrKen
              Disclaimer: All of the above is pure speculation.

              Comment

              • wikisb
                Member
                • May 2011
                • 64

                #8
                hi again!!
                i have taken a look at some tutorials, posts & other things, but still i don't know what the heck is happening when i try to get a value for CPU average load or whatever other value after 1.3.6.1.4.1.2021. if i do snmpwalk or others commands to this OID or a child one, what i get is "End of MIb"
                HOW it shows me this thing instead of the values i am seeking??.
                also i tried to monitor other devices like printers, i have an Aficio MC2500 and i can't find where are the OID's of toner, paper. when i do a snmpwalk to the printer i get lots of values but without description i can't guess wich value is the one of toner capacity, paper tray, etc...
                the pc i try to monitor is a win Xp.
                its wierd that i can monitor disk space, usage, processes, services and i can't with all the 1.3.6.1.4.2021 childs
                thanks!!
                Last edited by wikisb; 08-06-2011, 12:33.

                Comment

                • ghoz
                  Senior Member
                  • May 2011
                  • 204

                  #9
                  Welcome to the wonderful world of snmp... aka the wild west.

                  * For the CPU info, check you snmp.conf, if i remember correctly by default the net-snmp agent won't let you get anything but basic system info man snmpd.conf

                  * For printers and other devices, you have to seach for a MIB to get the translation for you OIDs. you may be lucky with a standard mib like PRINTER-MIB...

                  unfortunately, many constructors will use their own MIB and OID tree , meaning you have to search really hard for the info... I remember having to sniff a control pannel in order to find out by guess work what oid was the value I was looking for...

                  Comment

                  • ghoz
                    Senior Member
                    • May 2011
                    • 204

                    #10
                    Originally posted by wikisb
                    the pc i try to monitor is a win Xp.
                    mmh.. btw that may be your problem ...
                    are you sure you don't have a problem between the net-snmp agent and the native windows one ?

                    Comment

                    • wikisb
                      Member
                      • May 2011
                      • 64

                      #11
                      hi ghoz!!
                      thanks again for posting!! i thought this page http://www.oid-info.com/index.htm was going to help me much but is not the case. so i will have to do "the dirty work" to find the values to monitor? OMfG...
                      in my winxp pc i have snmp (is there a snmp.conf¿?) and the MIB for cpu load and stuff it seems it doesn't exist. because by default it should be here: 1.3.6.1.4.1.2021. but my pc 2021 it says it doesn't exits in teh MIB either their childs.
                      i don't know if there is a problem between the native snmp and agent snmp, it seems it works fine except for the 1.3.6.1.4.1.2021... it also doesn't works in my linux server trying to get information from 1.3.6.1.4.1.2021 and its childs
                      Last edited by wikisb; 08-06-2011, 15:50.

                      Comment

                      • ghoz
                        Senior Member
                        • May 2011
                        • 204

                        #12
                        the 1.3.6.1.4.1.2021 subtree is specific to net-snmp agents...
                        every device implements the trees it needs.
                        the defaulkt snmp on windows will not answer this oid tree ...

                        and good luck for your MIB searching...

                        anyway for windows you'd better off with a zabbix agent and standard items.

                        Comment

                        • wikisb
                          Member
                          • May 2011
                          • 64

                          #13
                          Ok Ghoz & MrKen thanks for your support & to make things easier.
                          i guess i have to learn deeper this protocol... #~$%'!!
                          i'm afraid i'm not going to use the zabbix agent because i'm told to use only SNMP.
                          thanks!!

                          Comment

                          Working...