Ad Widget

Collapse

Value of type "string" is not suitable for value type "Numeric (unsigned)".

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • WesterMario
    Junior Member
    • May 2024
    • 3

    #1

    Value of type "string" is not suitable for value type "Numeric (unsigned)".

    Hello,

    I'm pretty new to Zabbix 6.0, and ran into an issue with preprocessing of an SNMP Trap item.

    Item:


    regex Parameters: iso.3.6.1.4.1.33555.3.5.54.4.0 type=2 value=INTEGER: [1-9][0-9]* /1

    ​​


    Error: Value of type "string" is not suitable for value type "Numeric (unsigned)". Value "NaN"

    ​​
    The Trap message:
    08:47:23 2024/05/07 ZBXTRAP 10.170.2.211
    PDU INFO:
    messageid 0
    requestid 123456789
    notificationtype TRAP
    receivedfrom UDP: [10.170.2.211]:162->[10.170.6.18]:162
    errorindex 0
    errorstatus 0
    version 1
    community public
    transactionid 9
    VARBINDS:
    iso.3.6.1.2.1.1.3.0 type=67 value=Timeticks: (251795) 0:41:57.95
    iso.3.6.1.6.3.1.1.4.1.0 type=6 value=OID: iso.3.6.1.4.1.33555.3.0.54
    iso.3.6.1.4.1.33555.3.5.54.1.0 type=2 value=INTEGER: 5
    iso.3.6.1.4.1.33555.3.5.54.3.0 type=2 value=INTEGER: 2
    iso.3.6.1.4.1.33555.3.5.54.4.0 type=2 value=INTEGER: 501

    I would need to monitor the temperature of the OID .3.6.1.4.1.33555.3.5.54.4.0​.

    The TrapReceiver is receiving traps
    ​​

    It looks like no regex is working for me. Anywone has an idea what I'm doing wrong?
  • Answer selected by WesterMario at 08-05-2024, 12:07.
    WesterMario
    Junior Member
    • May 2024
    • 3

    I found the issue. I had to use iso\.3\.6\.1\.4\.1\.33555\.3\.5\.54\.4\.0 type=2 value=INTEGER:\s+(\d+)and \1 instead of /1.


    Click image for larger version

Name:	grafik.png
Views:	1065
Size:	28.8 KB
ID:	483628

    Comment

    • Hamardaban
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • May 2019
      • 2713

      #2
      iso\.3\.6\.1\.4\.1\.33555\.3\.5\.54\.4\.0 type=2 value=INTEGER:\s+(\d+)

      You have not allocated a capture group
      Last edited by Hamardaban; 07-05-2024, 19:45.

      Comment

      • WesterMario
        Junior Member
        • May 2024
        • 3

        #3
        Originally posted by Hamardaban
        iso\.3\.6\.1\.4\.1\.33555\.3\.5\.54\.4\.0 type=2 value=INTEGER:\s+(\d+)

        You have not allocated a capture group
        Thank you for your answer!

        For some reason, I still get the same error: Value of type "string" is not suitable for value type "Numeric (unsigned)". Value "NaN"

        Click image for larger version

Name:	grafik.png
Views:	1054
Size:	29.6 KB
ID:	483613
        Click image for larger version

Name:	grafik.png
Views:	1054
Size:	25.6 KB
ID:	483614

        In a regex debugger its working fine. The result I get from the internal tester, is just /gm. The JavaScript result is just NaN.​

        Click image for larger version

Name:	grafik.png
Views:	1032
Size:	334.0 KB
ID:	483615

        Any tips would be much appreciated!

        Comment

        • WesterMario
          Junior Member
          • May 2024
          • 3

          #4
          I found the issue. I had to use iso\.3\.6\.1\.4\.1\.33555\.3\.5\.54\.4\.0 type=2 value=INTEGER:\s+(\d+)and \1 instead of /1.


          Click image for larger version

Name:	grafik.png
Views:	1065
Size:	28.8 KB
ID:	483628

          Comment

          • Hamardaban
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • May 2019
            • 2713

            #5
            You are absolutely using the preprocessing rule incorrectly.
            What does "\gm" have to do with it??? The number of the matched group should be indicated there!
            Look in the documentation https://www.zabbix.com/documentation.../preprocessing

            PS
            It's good that you found your mistakes yourself! Good luck!

            Comment

            Working...