Zabbix Documentation 2.2

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


Sidebar

manpages:zabbix_sender
Man page of ZABBIX_SENDER

ZABBIX_SENDER

Section: Maintenance Commands (8)
Updated: 16 October 2015
Index Return to Main Contents
 

NAME

zabbix_sender - Zabbix sender utility.  

SYNOPSIS

zabbix_sender [-hpzvIV] {-kso | [-T] -i <inputfile>} [-c <config-file>]  

DESCRIPTION

zabbix_sender is a command line utility for sending performance data to a remote Zabbix server. On the Zabbix server an item of type Zabbix trapper should be created with corresponding key. Note that incoming values will only be accepted from hosts specified in Allowed hosts field for this item.

 

Options

-c, --config <config-file>
Use config-file. Zabbix sender reads server details from the agent configuration file. By default Zabbix sender does not read any configuration file. Absolute path should be specified. Only parameters Hostname, ServerActive and SourceIP are supported. First entry from the ServerActive parameter is used.
-z, --zabbix-server <server>
Hostname or IP address of Zabbix server. If a host is monitored by a proxy, proxy hostname or IP address should be used instead.
-p, --port <port>
Specify port number of server trapper running on the server. Default is 10051.
-s, --host <host>
Specify agent hostname as registered in Zabbix frontend. Host IP address and DNS name will not work.
-I, --source-address <IP>
Specify source IP address.
-k, --key <key>
Specify item key to send value to.
-o, --value <value>
Specify value.
-i, --input-file <inputfile>

Load values from input file. Specify - as <inputfile> to read values from standard input.

Each value must be specified on its own line. Each line must contain 3 whitespace delimited entries: <hostname> <key> <value>, where "hostname" is the name of monitored host as registered in Zabbix frontend, "key" is target item key and "value" - the value to send. Specify - as <hostname> to use hostname from agent configuration file or from --host argument.

An example of a line of an input file:

"Linux DB3" db.connections 43

The value type must be correctly set in item configuration of Zabbix frontend. Zabbix sender will send up to 250 values in one connection. Contents of the input file must be in the UTF-8 encoding. All values from the input file are sent in a sequential order top-down. Entries must be formatted using the following rules:

Quoted and non-quoted entries are supported.
Double-quote is the quoting character.
Entries with whitespace must be quoted.
Double-quote and backslash characters inside quoted entry must be escaped with a backslash.
Escaping is not supported in non-quoted entries.
Linefeed escape sequences (\n) are supported in quoted strings.
Linefeed escape sequences are trimmed from the end of an entry.

-T, --with-timestamps

This option can be only used with --input-file option.

Each line of the input file must contain 4 whitespace delimited entries: <hostname> <key> <timestamp> <value>. Timestamp should be specified in Unix timestamp format. If target item has triggers referencing it, all timestamps must be in an increasing order, otherwise event calculation will not be correct.

An example of a line of the input file:

"Linux DB3" db.connections 1429533600 43

For more details please see option --input-file.

If a timestamped value is sent for a host that is in a “no data” maintenance type then this value will be dropped however it is possible to send a timestamped value in for an expired maintenance period and it will be accepted.

-r, --real-time
Send values one by one as soon as they are received. This can be used when reading from standard input.
-v, --verbose
Verbose mode, -vv for more details.
-h, --help
Display this help and exit.
-V, --version
Output version information and exit.

 

EXIT STATUS

The exit status is 0 if the values were sent and all of them were successfully processed by server. If data was sent, but processing of at least one of the values failed, the exit status is 2. If data sending failed, the exit status is 1.

 

EXAMPLES

zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -s Monitored Host -k mysql.queries -o 342.45

Send 342.45 as the value for mysql.queries key in Monitored Host host using Zabbix server defined in agent daemon configuration file.

zabbix_sender -z 192.168.1.113 -i data_values.txt

Send values from file data_values.txt to server with IP 192.168.1.113. Host names and keys are defined in the file.

echo - hw.serial.number 1287872261 SQ4321ASDF | zabbix_sender -c /usr/local/etc/zabbix_agentd.conf -T -i -

Send a timestamped value from the commandline to Zabbix server, specified in the agent daemon configuration file. Dash in the input data indicates that hostname also should be used from the same configuration file.

echo 'Zabbix server trapper.item ' | zabbix_sender -z 192.168.1.113 -p 10000 -i -

Send empty value of an item to the Zabbix server with IP address 192.168.1.113 on port 10000 from the commandline. Empty values must be indicated by double empty double quotes.

 

SEE ALSO

zabbix_agentd(8), zabbix_get(8), zabbix_proxy(8), zabbix_server(8)  

AUTHOR

Alexei Vladishev <[email protected]>


 

Index

NAME
SYNOPSIS
DESCRIPTION
Options
EXIT STATUS
EXAMPLES
SEE ALSO
AUTHOR

This document was created by man2html, using the manual pages.
Time: 09:44:44 GMT, February 14, 2017