Ad Widget

Collapse

sender data are invalid, inexplicably

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • michaelNGV
    Junior Member
    • Jul 2022
    • 27

    #1

    sender data are invalid, inexplicably

    Hello, we have an application (Kotlin) that sends data to our Zabbix server using the `zabbix_sender` protocol. The problem is that some data are received and accepted as expected, but other data are not, and I can't see why. I can't see any significant difference between the host/item that accepts its data, and the host/item that doesn't.
    The host that accepts its data looks like this: Click image for larger version

Name:	good-host.png
Views:	320
Size:	42.1 KB
ID:	450777 and the item, like this: Click image for larger version

Name:	good-item.png
Views:	334
Size:	45.8 KB
ID:	450778 The log covering the arrival and processing of one data item is:
    Code:
    2567:20220901:160208.579 zbx_send_response_ext() '{"response":"success","info":"processed: 0; failed: 1; total: 1; seconds spent: 0.000125"}'
    2567:20220901:160208.579 End of zbx_send_response_ext():SUCCEED
    2567:20220901:160208.579 End of recv_senderhistory()
    2567:20220901:160208.579 zbx_setproctitle() title:'trapper #4 [processed data in 0.000408 sec, waiting for connection]'
    2568:20220901:160208.635 zbx_setproctitle() title:'trapper #5 [processing data]'
    2568:20220901:160208.635 trapper got '{"request":"sender data","data":[{"host":"kitten-worker","key":"conclusion[CGNAT]","value":"2","clock":1662012128}]}'
    2568:20220901:160208.636 In recv_senderhistory()
    2568:20220901:160208.636 In process_client_history_data()
    2568:20220901:160208.636 In parse_history_data()
    2568:20220901:160208.636 End of parse_history_data():SUCCEED processed:1/1
    2568:20220901:160208.636 In process_history_data()
    2568:20220901:160208.636 In zbx_preprocess_item_value()
    2568:20220901:160208.636 End of zbx_preprocess_item_value()
    2568:20220901:160208.636 In zbx_ipc_socket_open()
    2568:20220901:160208.636 End of zbx_ipc_socket_open():SUCCEED
    2568:20220901:160208.636 In zbx_ipc_socket_write()
    2568:20220901:160208.636 End of zbx_ipc_socket_write():SUCCEED
    2568:20220901:160208.636 End of process_history_data() processed:1
    2568:20220901:160208.636 End of process_client_history_data():SUCCEED
    2568:20220901:160208.636 In zbx_send_response_ext()
    2568:20220901:160208.636 zbx_send_response_ext() '{"response":"success","info":"processed: 1; failed: 0; total: 1; seconds spent: 0.000276"}'
    2568:20220901:160208.636 End of zbx_send_response_ext():SUCCEED​
    whereas the host that apparently ignores its data is Click image for larger version

Name:	fail-host.png
Views:	360
Size:	56.4 KB
ID:	450779 and the item is Click image for larger version

Name:	fail-item.png
Views:	328
Size:	46.7 KB
ID:	450776 and the excerpt from the log is
    Code:
    2542:20220901:160240.418 In zbx_ipc_service_recv() timeout:1
    2568:20220901:160240.443 zbx_setproctitle() title:'trapper #5 [processing data]'
    2568:20220901:160240.444 trapper got '{"request":"sender data","data":[{"host":"ASSET201098","key":"backup","value":"1","clock":1662012155}]}'
    2568:20220901:160240.444 In recv_senderhistory()
    2568:20220901:160240.444 In process_client_history_data()
    2568:20220901:160240.444 In parse_history_data()
    2568:20220901:160240.444 End of parse_history_data():SUCCEED processed:1/1
    2568:20220901:160240.444 unknown validation error for item "backup"
    2568:20220901:160240.444 In process_history_data()
    2568:20220901:160240.444 End of process_history_data() processed:0
    2568:20220901:160240.444 End of process_client_history_data():SUCCEED
    2568:20220901:160240.444 In zbx_send_response_ext()
    2568:20220901:160240.444 zbx_send_response_ext() '{"response":"success","info":"processed: 0; failed: 1; total: 1; seconds spent: 0.000121"}'
    2568:20220901:160240.444 End of zbx_send_response_ext():SUCCEED​
    The agent interfaces are left from my fumbling around and aren't relevant (I believe).

    unknown validation error is not very helpful. The datum is a character, as is the datum that was accepted. Can anyone propose why the host/item does not see the data?
    Attached Files
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    First host is monitored by server itself, no proxy. Data is presumably sent also to server directly.
    Second host is monitored by proxy. Are you sending data also to proxy, or are you trying to send that data directly to server?

    Comment

    • michaelNGV
      Junior Member
      • Jul 2022
      • 27

      #3
      I'm sending directly to the server.

      Comment

      • dimir
        Zabbix developer
        • Apr 2011
        • 1080

        #4
        Do you see that the second host (not working) has some proxy set for the Monitored by proxy drop down? This means all its items, including the trapper item, are monitored by that proxy. And that means the trapper item also will accept only the values sent to the proxy ListenPort port. Now, the error message could be improved and I'll try to check on that matter. :-) So, either you should not monitor that host by proxy or for the second item you should send the values to the proxy.
        Last edited by dimir; 01-09-2022, 22:23.

        Comment

        • michaelNGV
          Junior Member
          • Jul 2022
          • 27

          #5
          Thank you cyber and dimir for the explanation. A clearer log message would be helpful! I don't understand Zabbix sufficiently to understand why the item can't also receive data sent directly, but I understand and accept your explanations.

          Comment

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

            #6
            If host is monitored by a proxy, then all responsibility for communication is given to proxy. There has to be one source of truth... Server only accepts data from proxy for those items. Accepting also directly could lead to trust issues, which data is correct - the one form proxy or the one coming directly?

            Comment

            Working...