Ad Widget

Collapse

zabbix_sender from different host

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • funkyf00l
    Junior Member
    • Jun 2012
    • 7

    #1

    zabbix_sender from different host

    Hi,
    I'm using zabbix 2.0.2-1
    I have a central git server which all my hosts commit to.
    I'd like to use zabbix_sender to send success/failure results to my zabbix server on behalf of these hosts from my central git server.
    So....
    When my git server receives a git commit from the host it then uses zabbix_sender to send the result (0=failure 1=succcess)
    The command I am using is:
    zabbix_sender -z my.zabbix.server -s the.host.in.question -k my.key -o 1 -vv

    When run from the.host.in.question it is successfull, however when run from my git server it fails.
    In the items "Allowed Hosts" I have tried both the git servers IP and nothing but it still fails.

    Also, regardless of the result, nothing shows in my zabbix log file.

    Are you even able to send via zabbix_sender from another host?


    Thanks in advance

    Stephen
  • kevind
    Member
    • Sep 2011
    • 40

    #2
    Yes you can send items for one host using zabbix sender from another host, we do this a lot under version 2.0.2 and it works fine.

    I'd suggest leaving the "Allowed Hosts" field in the trapper item blank.

    When zabbix sender fails, what is the error message?

    -Kevin

    Comment

    • funkyf00l
      Junior Member
      • Jun 2012
      • 7

      #3
      zabbix_sender from different host

      Strangely, my zabbix server log says nothing when it fails. It doesn't even register
      My "Allowed Hosts" is blank.

      The host I'm trying to send on behalf of actually uses an onsite proxy, however the host doing the sending is (and can only) send directly to my zabbix server.
      So for example:
      Host = HostA
      HostA Proxy = Proxy
      Zabbix server= ZServer
      Host sending on behalf of HostA = HostB

      I try the following from HostA:
      zabbix_sender -z Proxy -s HostA -k key.name -o 1 = SUCCESS
      "info from server: "Processed 1 Failed 0 Total 1 Seconds spent 0.010018"
      sent: 1; skipped: 0; total: 1"

      However when I try sending from HostB on behalf of HostA:
      zabbix_sender -z ZServer -s HostA -k key.name -o 1 = FAIL
      "Info from server: "Processed 0 Failed 1 Total 1 Seconds spent 0.000023"
      sent: 1; skipped: 0; total: 1"

      Please note I am unable to send via the proxy as HostB is not on the same network as HostA but IS on the same network as ZServer.

      Comment

      • funkyf00l
        Junior Member
        • Jun 2012
        • 7

        #4
        zabbix_sender from different host

        Further to this, its worth noting that, sending from another host behind the same proxy DOES work so the issue must be that as the host is monitored via the proxy then the result is expected via the proxy?

        In my scenario this will not be possible.
        Is there a way around this?

        Comment

        • kevind
          Member
          • Sep 2011
          • 40

          #5
          A couple of thoughts:

          1) if the host on the proxy is called "myhost", create a host on the Zabbix server with another name, i.e. "myhost-trapper". Create a single trapper item, use zabbix sender to send data to it on the zabbix server, and alert on that.

          2) if you really really want the data collected under "myhost", implement #1 above, then create an item on "myhost" which is a calculated item with a simple formula, i.e. something like "last(myhost-trapper:MyTrapperItem)". Zabbix will then copy the data into that item.

          -Kevin

          Comment

          • funkyf00l
            Junior Member
            • Jun 2012
            • 7

            #6
            Thanks for your suggestions.
            I opted for option 2 and set it up as you suggested and it is working.

            Thanks again.

            Comment

            Working...