Ad Widget

Collapse

preprocessing arithmetic custom multiplier Zabbix 5.2.4

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manosnms
    Member
    • Jun 2020
    • 52

    #1

    preprocessing arithmetic custom multiplier Zabbix 5.2.4

    Hi,

    I have an item where I receive a trap where it contains a number in bps


    .1.3.6.1.4.1.9694.1.4.1.70 371107776


    So what I want is to change it to Gbps

    At preprocessing steps how do I configure it in order to get the output of the regular expression and then change it to Gbps?

    Click image for larger version

Name:	preprocessing.JPG
Views:	1232
Size:	42.2 KB
ID:	419025

    Thank you
  • manosnms
    Member
    • Jun 2020
    • 52

    #2
    Maybe I was not clear enough, I know how to convert......I am asking how to configure it in Zabbix

    Cause the way I have it now is not working

    I want the steps. maybe there is an example?
    Last edited by manosnms; 19-02-2021, 17:38.

    Comment

    • manosnms
      Member
      • Jun 2020
      • 52

      #3

      how do I change result to Numeric ?


      Click image for larger version

Name:	item.JPG
Views:	1168
Size:	42.3 KB
ID:	419223

      Comment

      • manosnms
        Member
        • Jun 2020
        • 52

        #4
        i might loose some information if i do that


        .1.3.6.1.4.1.9694.1.4.1.68 ipv4
        .1.3.6.1.4.1.9694.1.4.1.70 150161568
        .1.3.6.1.4.1.9694.1.4.1.71 12717
        .1.3.6.1.4.1.9694.1.1.1.16 high
        1.3.6.1.4.1.9694.1.4.1.67 "DNS Service"


        is there any other way?

        Comment

        • manosnms
          Member
          • Jun 2020
          • 52

          #5
          correct

          but at the end I want to combine values from the trap in order to present them to the users as a description, if I change it to float this might not work
          Click image for larger version

Name:	item2.JPG
Views:	1150
Size:	22.4 KB
ID:	419232

          Comment

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4807

            #6
            EDIT: My posts here are out of sequence due to human error and restoring of posts, try to fit them between other posts in thread, you should get a bit more clear picture.
            https://www.convertunits.com/from/bi...gigabit/second
            Last edited by cyber; 05-04-2021, 08:33.

            Comment

            • cyber
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • Dec 2006
              • 4807

              #7
              Custom multiplier... as you have it there...


              Comment

              • cyber
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Dec 2006
                • 4807

                #8
                "Type of information" in item config. If you receive 0 here, you probably have it as "numeric(unsigned)". Change to "float".

                Comment

                • cyber
                  Senior Member
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Dec 2006
                  • 4807

                  #9
                  Remeber, that this "type" affects, how value is saved, not how it is retrieved.... so you can query for text, but after preprocessing you have a floating point number... that is how you need to save it.

                  Comment

                  • cyber
                    Senior Member
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Dec 2006
                    • 4807

                    #10
                    Well, I have never dealt with traps in Zabbix. Just followed the initial post, which only displayed one value. Never thought of different things coming in that way.. Not really sure how this combining into one works... But if changing type is not possible, then I would question also doing any of preprocessing. If you regex already for one specific OID, then receiving any other value will render that item "not supported" as preprocessing fails...

                    Comment

                    Working...