Zabbix Documentation 2.0

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

User Tools

Site Tools


manual:config:items:userparameters

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:config:items:userparameters [2014/09/26 11:31]
sasha Links adapted because of a move operation
manual:config:items:userparameters [2015/12/16 07:37]
martins-v moving related information together
Line 15: Line 15:
 Then, when [[item|configuring an item]], enter the key to reference the command from the user parameter you want executed. Then, when [[item|configuring an item]], enter the key to reference the command from the user parameter you want executed.
  
-User parameters are commands executed by Zabbix agent. Up to 512KB of data can be returned ​(it used to be 64KB before Zabbix 2.0.5). **/bin/sh** is used as a command line interpreter under UNIX operating systems. ​This way you can enhance ​the functionality of Zabbix agents.+User parameters are commands executed by Zabbix agent. Up to 512KB of data can be returned. ​The return value of the command is standard output; standard error is discarded. **/bin/sh** is used as a command line interpreter under UNIX operating systems. ​User parameters obey the agent check timeout; if timeout is reached the forked user parameter process is terminated.
  
-See [[manual:​config:​items:​userparameters:​extending_agent|step-by-step tutorial]] on making use of user parameters.+See also: 
 + 
 +  * [[manual:​config:​items:​userparameters:​extending_agent|Step-by-step tutorial]] on making use of user parameters 
 +  * [[manual/​appendix/​command_execution|Command execution]]
  
 == Examples of simple user parameters == == Examples of simple user parameters ==
Line 47: Line 50:
 <note tip>To use positional references unaltered, specify double dollar sign - for example, awk '​{print $$2}'. In this case ''​$$2''​ will actually turn into ''​$2''​ when executing the command.\\ \\ Note that positional references with the $ sign are interpreted by Zabbix agent regardless of whether they are enclosed between double (") or single (') quotes.</​note>​ <note tip>To use positional references unaltered, specify double dollar sign - for example, awk '​{print $$2}'. In this case ''​$$2''​ will actually turn into ''​$2''​ when executing the command.\\ \\ Note that positional references with the $ sign are interpreted by Zabbix agent regardless of whether they are enclosed between double (") or single (') quotes.</​note>​
  
-<note important>​Unless [[manual:​appendix:​config:​zabbix_agentd|UnsafeUserParameters]] agent daemon configuration option is enabled, it is not allowed to pass flexible parameters containing these symbols: \ ' " ` * ? [ ] { } ~ $ ! & ; ( ) < > | # @  </​note>​+<note important>​Unless [[manual:​appendix:​config:​zabbix_agentd|UnsafeUserParameters]] agent daemon configuration option is enabled, it is not allowed to pass flexible parameters containing these symbols: \ ' " ` * ? [ ] { } ~ $ ! & ; ( ) < > | # @. Additionally,​ newline is not allowed either.</​note>​
  
 <​note>​User parameters that return text (character, log, text types of information) now can return whitespace only as well, setting the return value to an empty string (supported since 2.0). If non-valid value is returned, ZBX_NOTSUPPORTED will be sent back by the agent.</​note>​ <​note>​User parameters that return text (character, log, text types of information) now can return whitespace only as well, setting the return value to an empty string (supported since 2.0). If non-valid value is returned, ZBX_NOTSUPPORTED will be sent back by the agent.</​note>​