Áú»¢¶Ä²©

You are viewing documentation for the development version, it may be incomplete.
Join our translation project and help translate Áú»¢¶Ä²© documentation into your native language.

6 Sender

Overview

Áú»¢¶Ä²© sender is a command line utility that may be used to send performance data to Áú»¢¶Ä²© server for processing.

The utility is usually used in long running user scripts for periodical sending of availability and performance data.

For sending results directly to Áú»¢¶Ä²© server or proxy, a trapper item type must be configured.

See also - a Python library that has built-in functionality to act like Áú»¢¶Ä²© sender.

Running Áú»¢¶Ä²© sender

An example of running Áú»¢¶Ä²© UNIX sender:

cd bin
       ./zabbix_sender -z zabbix -s "Linux DB3" -k db.connections -o 43

where:

  • z - Áú»¢¶Ä²© server host (IP address can be used as well)
  • s - technical name of monitored host (as registered in Áú»¢¶Ä²© frontend)
  • k - item key
  • o - value to send

Options that contain whitespaces, must be quoted using double quotes.

Áú»¢¶Ä²© sender can be used to send multiple values from an input file. See the Áú»¢¶Ä²© sender manpage for more information.

If a configuration file is specified, Áú»¢¶Ä²© sender uses all addresses defined in the agent ServerActive configuration parameter for sending data. If sending to one address fails, the sender tries sending to the other addresses. If sending of batch data fails to one address, the following batches are not sent to this address.

Áú»¢¶Ä²© sender accepts strings in UTF-8 encoding (for both UNIX-like systems and Windows) without byte order mark (BOM) first in the file.

Áú»¢¶Ä²© sender on Windows can be run similarly:

zabbix_sender.exe [options]

zabbix_sender realtime sending scenarios will gather multiple values passed to it in close succession and send them to the server in a single connection. A value that is not further apart from the previous value than 0.2 seconds can be put in the same stack, but maximum polling time still is 1 second.

Áú»¢¶Ä²© sender will terminate if invalid (not following parameter=value notation) parameter entry is present in the specified configuration file.

Running Áú»¢¶Ä²© sender with low-level discovery

An example of running Áú»¢¶Ä²© sender for sending a JSON-formatted value for low-level discovery:

./zabbix_sender -z 192.168.1.113 -s "Áú»¢¶Ä²© server" -k trapper.discovery.item -o '[{"{#FSNAME}":"/","{#FSTYPE}":"rootfs"},{"{#FSNAME}":"/sys","{#FSTYPE}":"sysfs"}]'

For this to work, the low-level discovery rule must have a Áú»¢¶Ä²© trapper item type (in this example, with trapper.discovery.item key).