User parameters

The following list details queries related to user parameters:

  1. Q: My user parameter does not work.

A: Here are some common causes that break user parameters:

    • A missing environment is one of the biggest stumbling blocks when setting up user parameters. The Zabbix agent does not explicitly initialize environment details, such as the HOME variable or other information. This can lead to an inability to read the required configuration files and other issues. Make sure to set the environment as required either by setting variables in the user parameter directly or in a wrapper script.
    • Again, restricted permissions for the Zabbix user will be confusing to debug if you run commands for testing as root, so always test user parameters as the Zabbix user. If you need root access for a check, configure access via sudo.
    • Returning unclean data can also easily break data retrieval. When retrieving data with user parameters, make sure it does not contain characters that make it unsuitable for storage (such as returning 26.6 C for a float datatype item) or has other weird characters (such as having a CR/LF newline at the end of the data string).
    • By default, agent items will timeout after three seconds. It is not suggested to increase this timeout in most cases, although it might be reasonably safe to do so if the userparameter variable is used as an active item. Remember that active items are not parallel—only one agent process works on them, one item at a time. Consider using zabbix_sender for such items instead.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset