Ad Widget

Collapse

zabbix_sender explained please

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dcrandall
    Member
    • Apr 2006
    • 59

    #1

    zabbix_sender explained please

    Hi,

    Like many things in zabbix, use of zabbix_sender is talked about alot, but nowhere in the documentation is it actually explained how to use it. (Or if it is, it's hidden somwhere obscure)
    I've read a lot of posts for various versions of zabbix, some say use zabbix_sender with zabbix_trapperd (which is also not explained well), others don't mention trapperd at all and just say "send your information to your server."

    I understand that you use a script (or some method of gathering the information and present this to zabbix_sender, but how do you set up the interaction with the server?
    What is the comand line syntax for zabbix_sender?
    What do you need to do on the server side to get the information into an Item?

    A detailed description with an example would be great.

    Thanks,
    Daniel
  • safl
    Senior Member
    • May 2005
    • 103

    #2
    Here's a bit more info to go on:

    Configure an item of type trapper, with a key name of your choice ex. "temperature".

    In order to send data with zabbix_sender execute it like:

    # zabbix_sender <Zabbix server> <port> <server> <key> <value>
    ex.
    # zabbix_sender zabbix.example.com 10051 srv-main.file temperature 25

    Where zabbix.example.com is your zabbix server running on port 10051 monitoring box which is configured with name "srv-main.file", the value which goes into monitoring is 25.

    I think that never version can send data in a file, haven't tried it yet...

    Does it make sense?

    Comment

    • vlturner
      Junior Member
      • Aug 2011
      • 28

      #3
      It is more like this ,and this is from working scripts

      Here is the line as it is executed, and here is the lines from the perl code.


      /usr/local/bin/zabbix_sender -z localhost -p 10051 -s localhost -k nfsstat.MacOS.srvr.cache.Non-idem -o 0


      $cmd = "/usr/local/bin/zabbix_sender -z $opts{mon} -p 10051 -s $opts{svr} -k nfsstat.MacOS.srvr.rpc.";
      print "$cmd$fields[$field] -o $values[$field]\n";
      $rc = system("$cmd$fields[$field] -o $values[$field]\n");

      Comment

      • frankymryao
        Member
        • Oct 2011
        • 52

        #4
        I think zabbix_get and zabbix_sender is just for testing the connection between server and agent and for testing whether a item works or not. After using a zabbix_sender, the result doesn't insert into the date base and won't refresh the web where shows it.

        Comment

        • bcarpio
          Member
          • Jun 2008
          • 96

          #5
          Not true

          zabbix_sender is not just for testing connectivity I have added zabbix_sender into multiple scripts to update records which reflect in the gui.

          Comment

          • eskytthe
            Senior Member
            Zabbix Certified Specialist
            • May 2011
            • 363

            #6
            Man page with exsamples:
            http://www.zabbix.com/documentation/.../zabbix_sender
            Remember to set the item as "zabbix trapper" type at the zabbix server.
            Debug output with "-vv" option.

            Comment

            • wdingus
              Junior Member
              • Dec 2007
              • 7

              #7
              Skip a lot of the command-line parameters if those values are defined in the configuration file.

              Code:
              zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k {key.name}
              For instance...

              Comment

              Working...