Ad Widget

Collapse

Zabbix trapper treating clock field as part of data?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • armbl
    Junior Member
    • Jun 2026
    • 3

    #1

    Zabbix trapper treating clock field as part of data?

    After lots of trial and error, I found that the Zabbix sender input is working properly. Zabbix trapper combines the clock data into the value data - thus making it not function properly for any purpose. As an example, with the actual data being masked for security reasons:

    What is sent to the server:
    Code:
    {"host":"1.1.1.1","key":"uptime","value":"200","clock":523}
    However, when looking at the data in the Zabbix GUI, I get the following error:
    Code:
    Value of type "string" is not suitable for value type "Numeric (unsigned)". Value "523 200"
    Which indicates that somehow, the clock value being sent by Zabbix Sender is being received as part of the actual value for the field for some reason.

    Any idea on how to resolve this? If it helps, I am using the following command for Zabbix sender - again, with active details obscured for security purposes:
    zabbix_sender -z "1.1.1.1" -i /filepath/file.txt -T
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4969

    #2
    So your input file has following line (using 523 as timestamp is weird but who am I to criticize)
    1.1.1.1 uptime 523 200

    Looks like -T is not considered... with -i that file has to have just 3 whitespace seperated fields (https://www.zabbix.com/documentation.../zabbix_sender)... with -T one more field is added. (and -N for ns adds one more). Sounds kind of weird, but move -T before -i ??

    Comment


    • armbl
      armbl commented
      Editing a comment
      Apologies, I discovered the answer recently and did not update the topic: either that one file was formatted improperly, or if a data file has data old enough to be outside of the allotted history range of the trapper it'll ignore the timestamp and assume it is part of the data. I had been working with testing data to ensure the system worked before taking it online, and switching over to some more recent data resolved the issue. As for the timestamp, that was simply the first number that came to mind.
Working...