Ad Widget

Collapse

zabbix_sender Failed - don't get the error...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • -bk-
    Junior Member
    • Aug 2010
    • 21

    #1

    zabbix_sender Failed - don't get the error...

    Hi all,

    maybe you can help me with an issue with zabbix_sender
    I am running 1.8.4 now (but had the problem with 1.8.4rc1 and rc2), must be a configuration problem

    Code:
    zabbix_sender -vv -z ZABBIXSERVERIP -s ZABBIXHOSTNAME -k KEYNAME -o 0
    output is:

    Code:
    zabbix_sender [32324]: DEBUG: Answer [{
            "response":"success",
            "info":"Processed 0 Failed 1 Total 1 Seconds spent 0.000257"}]
    Info from server: "Processed 0 Failed 1 Total 1 Seconds spent 0.000257"
    sent: 1; skipped: 0; total: 1
    I can't find anything suspect in server or agent logfiles, loglevel is set to max.

    I have double-checked, that the ZABBIXSERVERIP is the IP set in /etc/zabbix/zabbix-server.conf, and that the ZABBIXHOSTNAME is the name of the host configured in Zabbix Web GUI. KEYNAME exists, and value 0 exists for that key...

    Any clues?
  • zabbix_zen
    Senior Member
    • Jul 2009
    • 426

    #2
    "value 0 exists for that key", so you're sending the same type as configured in the zabbix item?

    You can vote for the following patch so this kind of behavior get's more easily debugged in the future,

    Comment

    • khaaz
      Junior Member
      • Jan 2011
      • 2

      #3
      What type of Item are you using ? Trapper?

      Comment

      • -bk-
        Junior Member
        • Aug 2010
        • 21

        #4
        Yes, thats a trapper item. I am sending the same type of data as it is configured in the item... Thats why I am so confused about the error.

        Comment

        • khaaz
          Junior Member
          • Jan 2011
          • 2

          #5
          I suppose you set the type of information to "numeric (unsigned)", have you try "numeric (float)"?

          Comment

          • -bk-
            Junior Member
            • Aug 2010
            • 21

            #6
            Setting type of information to numeric (float) doesn't change anything...

            Comment

            • MrKen
              Senior Member
              • Oct 2008
              • 652

              #7
              Check your Item configuration. See where it says 'Hosts allowed', if it says localhost, delete that. Then try again.

              If that is the problem, it would usually show in the zabbix_server.log

              MrKen
              Disclaimer: All of the above is pure speculation.

              Comment

              • -bk-
                Junior Member
                • Aug 2010
                • 21

                #8
                [QUOTE MrKen]See where it says 'Hosts allowed', if it says localhost, delete that.[/QUOTE]
                Nope, that was not configured.
                I think I got it now: When I use
                Code:
                zabbix_sender -vv -z ZABBIXSERVERIP -s ZABBIXHOSTNAME -k KEYNAME -o 0
                on that zabbix host (proxy) itself, it works. When I am doing that on the zabbix server, I get the error I posted above. It seems as if zabbix does not allow using zabbix_sender for another host as the host itself... Did work in 1.8.3 though

                Comment

                • frater
                  Senior Member
                  • Oct 2010
                  • 340

                  #9
                  It's a common mistake....
                  The hostname in /etc/zabbix/zabbix_agentd.conf doesn't have to match the hostname you use in the server for the agent.

                  For zabbix_sender these have to match.
                  You also need to open up port 10051 on your server (not necessary when using the agent either).

                  Razique here: http://www.zabbix.com/forum/showthre...t=19723&page=2
                  thought he need to alter my script to get it to work.
                  After some troubleshooting he finally agreed with me this wasn't necessary.

                  Read that thread!

                  Best to use: 'zabbix_sender -c /etc/zabbix/zabbix_agentd.conf'

                  This is how I use zabbix_sender:

                  Code:
                  #!/bin/sh
                  export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
                  
                  ZAB_CONF=/etc/zabbix/zabbix_agentd.conf
                  ZAB_BIN=/usr/local/sbin/zabbix_sender
                  RNDC_BIN='/usr/sbin/rndc'
                  STATS='/var/cache/bind/named.stats'
                  FTMP1=`mktemp`
                  
                  if $RNDC_BIN stats ; then
                    tail -n10 ${STATS} | grep -A10 '^+++' | grep '^[a-z]' | sed 's/.*/- named_&/' >${FTMP1}
                    $ZAB_BIN -c ${ZAB_CONF} -i ${FTMP1} >/dev/null
                  fi
                  rm -f ${FTMP1}
                  Last edited by frater; 18-01-2011, 12:53.
                  Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

                  Comment

                  Working...