Ad Widget

Collapse

zabbix_sender to zabbix_proxy

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sgoodliff
    Junior Member
    • Jul 2005
    • 20

    #1

    zabbix_sender to zabbix_proxy

    Hi,

    I'm trying to use zabbix_sender to log data via a proxy


    zabbix_sender -z proxyhost -s lt_aggregator -k sender.test.1 -o 3 -vv -r


    The output I get back is

    zabbix_sender [1976]: DEBUG: answer [{
    "response":"success",
    "info":"Processed 0 Failed 1 Total 1 Seconds spent 0.000079"}]
    info from server: "Processed 0 Failed 1 Total 1 Seconds spent 0.000079"
    sent: 1; skipped: 0; total: 1


    The host is configured to be monitored by the proxy and the allowed host line includes the the proxies IP address and 127.0.0.1 as I'm running zabbix_sender from there.

    Any ideas on what im doing wrong ?

    Thanks
  • kevind
    Member
    • Sep 2011
    • 40

    #2
    Not sure what's wrong in your case, but for Zabbix sender to work, everything has to match up to what Zabbix expects:

    1) host name has to be an exact match to what's configured in zabbix, and if you're sending to a proxy, it must be configured to be monitored by that proxy.

    2) key name must be an exact match for the key name of the item you're sending

    3) the item must be a "trapper" type

    4) value must match the type of information specified in the item (i.e. you can't send text to a numeric item)

    5) I'd suggest leaving "Allowed Hosts" blank

    -Kevin

    Comment

    • mbsit
      Senior Member
      • Sep 2012
      • 130

      #3
      And
      In server / proxy config file there should be:

      ### Option: StartTrappers
      StartTrappers=10 (more than 0)

      Bests,
      Grzegorz

      --
      Wdrożenia, usługi IT - Warszawa
      Pozdrawiam
      Grzegorz Grabowski
      ____
      WdroĊĵenia, szkolenia, umowy serwisowe
      Warszawa - Polska

      Comment

      • sgoodliff
        Junior Member
        • Jul 2005
        • 20

        #4
        hi,

        If i set the host to be monitored by the server and not the proxy it works fine. When I set the host to be monitored by the proxy i then get a fail. So the command line must be correct.

        The proxy has trappers configured

        In the proxy log i can see


        21187:20120926:123709.813 Trapper got [{
        "request":"sender data",
        "data":[
        {
        "host":"lt_aggregator",
        "key":"sender.test.1",
        "value":"3"}]}] len 112
        21187:20120926:123709.813 In recv_agenthistory()
        21187:20120926:123709.813 In process_hist_data()
        21187:20120926:123709.813 In process_mass_data()
        21187:20120926:123709.813 End of process_mass_data()
        21187:20120926:123709.813 End of process_hist_data():SUCCEED
        21187:20120926:123709.813 In zbx_send_response()
        21187:20120926:123709.813 zbx_send_response() '{
        "response":"success",
        "info":"Processed 0 Failed 1 Total 1 Seconds spent 0.000087"}'
        21187:20120926:123709.813 End of zbx_send_response():SUCCEED


        but not sure why it says Failed.

        Comment

        • thiago.info
          Junior Member
          • Feb 2008
          • 28

          #5
          I'm having the same issue here: https://www.zabbix.com/forum/showthread.php?t=41088

          Any news about how to do it?

          Thanks

          Comment

          • heaje
            Senior Member
            Zabbix Certified Specialist
            • Sep 2009
            • 325

            #6
            How long are you waiting after changing the host to be monitored by the proxy. Take note that the proxy won't know about the host until the server refreshes its configuration cache and the proxy must refresh its cache after that. With default settings, that can take up to an hour (if I remember right).

            Edit: just verified that time in the documentation. By default, both active and passive proxies get config updates every hour. Take a look at the "ConfigFrequency" setting for active proxies in zabbix_proxy.conf and ProxyConfigFrequency for passive proxies in zabbix_server.conf
            Last edited by heaje; 24-05-2013, 15:02.

            Comment

            • thiago.info
              Junior Member
              • Feb 2008
              • 28

              #7
              Problem solved.

              It was something related to name.

              Thanks everybody.

              Comment

              • Vapochilled
                Junior Member
                • Nov 2013
                • 17

                #8
                Originally posted by thiago.info
                Problem solved.

                It was something related to name.

                Thanks everybody.


                Hi Tiago,

                I'm having the same problem.
                What do you mean by name related?

                Thanks!

                Comment

                Working...