Ad Widget

Collapse

snmp string to float conversion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vrtareg
    Senior Member
    • May 2006
    • 293

    #16
    Hi

    Installed latest release - 1.6.1
    Problem with quoted SNMP float numbers still present
    Can someone check again?

    Thanks
    Areg

    Comment

    • Alexei
      Founder, CEO
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2004
      • 5654

      #17
      Originally posted by vrtareg
      Installed latest release - 1.6.1
      Problem with quoted SNMP float numbers still present
      Support of quoted strings is not there yet.
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      • JoelG
        Member
        • Aug 2007
        • 32

        #18
        Sad

        I am a little disappointed with this patch.

        I debugged the problem, provided a quick fix (that seems to work fine, and is probably required), recommended a better fix to underlying problem (initializing the base data structure to null values with memset()), and now the 'fix' doesn't support the initial data problem at all.

        Additional checking of data type was not needed, just being able to properly convert a snmp string to a float.

        Maybe the real problem is not being able to support signed integers (either 'real' integers or returned 'string' integers).

        I am looking forward to a complete solution.

        I have added a patch, currently in testing, that will re-enable this functionality. It also includes the mib normalization fix.
        Attached Files
        Last edited by JoelG; 05-11-2008, 23:10. Reason: added patch

        Comment

        • vrtareg
          Senior Member
          • May 2006
          • 293

          #19
          Hi

          Patch works for me.
          Waiting it in next releases.

          Areg

          Comment

          • hannibal20
            Junior Member
            • Jan 2007
            • 22

            #20
            I had the same issue. The patch helped with 1.6.1. Please include a solution to the problem in future releases.
            Last edited by hannibal20; 06-11-2008, 09:13.

            Comment

            • Clubbavich
              Junior Member
              • Oct 2008
              • 5

              #21
              Originally posted by Alexei
              Support of quoted strings is not there yet.
              Odd, it was there in 1.6. At least, it worked fine for me... Most of my float values are being sent as strings, and they were all working fine on 1.6 in my test environment. I found myself needing to start again, so I go to 1.6.1, and suddenly, all of my old OID's that worked fine before, are failing. . I'll try the patch that was provided in this thread and hope that it helps.

              Comment

              • Vitaly
                Junior Member
                • Oct 2008
                • 11

                #22
                Thanks for the patch.
                I've patched v.1.6.1. SNMP works again.

                Comment

                • halik
                  Junior Member
                  • Jun 2007
                  • 7

                  #23
                  excelent job. the patch works for me!

                  michal koslinski

                  Comment

                  • vrtareg
                    Senior Member
                    • May 2006
                    • 293

                    #24
                    Hi

                    Thanks for patch.
                    It works for me too.

                    But it seems that there is another issue with SNMP.
                    I noticed that in my configuration, where about 300 Linux machines and 20-30 SNMP devices, when some of linux machines stops or hangs or i manually stop zabbix_agentd on one of them SNMP starts to work with interruption.

                    Does anyone notice this?

                    Regards
                    Areg

                    Comment

                    • Clubbavich
                      Junior Member
                      • Oct 2008
                      • 5

                      #25
                      Patch works, but then there's a problem...

                      Thanks for the patch, that worked fine for storing the data. Now, I have a new problem to throw at you...

                      One of the items I monitor contains negative floating point values, and they get stored fine, however, whenever I try to use a macro to retrieve the value, it get's completely messed up. For example, if I set up an action to send a message {{HOSTNAME}:negativefloatkey.last(0)} it returns 16777216 where the actual value is -12 ... same value is returned when the actual value is -19... Any ideas? (It's actually -12.0000 and -19.0000, the values are in .5 increments... so it could be -12 or -11.5 or -12.5 but nothing between those values.)

                      Same with {{HOSTNAME}:negativefloatkey.prev(0)}

                      Thanks
                      Last edited by Clubbavich; 26-11-2008, 21:36.

                      Comment

                      • rrr
                        Senior Member
                        • Sep 2007
                        • 100

                        #26
                        The patch worked fine in 1.6.1.
                        Now I've upgraded to 1.6.2. but it seems that this patch isn't included in this release. Can I use the existing patch still for 1.6.2.?

                        Comment

                        • jmb
                          Junior Member
                          • Jul 2007
                          • 14

                          #27
                          Hello,

                          The patch for 1.6.1 does not apply to 1.6.2. Here is the modified patch for 1.6.2

                          Greets jm
                          Attached Files

                          Comment

                          • rrr
                            Senior Member
                            • Sep 2007
                            • 100

                            #28
                            Hello jm,

                            thanks very much, the new patch works perfectly!

                            Comment

                            • wispman
                              Junior Member
                              • Jun 2007
                              • 7

                              #29
                              Hi guys,
                              I am glad to find this patch, going to try it out now this is just what I need, but pleeeze, why isn't this integrated into the official release??

                              Comment

                              • rrr
                                Senior Member
                                • Sep 2007
                                • 100

                                #30
                                Grmpf... in the last nightly build patching of the checks_snmp.c file fails again.

                                Is it still necessary? If yes, which lines must be modified?

                                Comment

                                Working...