Ad Widget

Collapse

How to pass value with "[" in UserParameter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Manuel Deschambault
    Junior Member
    • Jan 2026
    • 6

    #1

    How to pass value with "[" in UserParameter

    Running Zabbix 7.4 on AlmaLinux 9.

    Have created a UserParameter that I call from Zabbix that executes a curl command and parses the result, giving me 3 datapoints

    I have created 3 dependent items that extract the data from this master item (to break down the 3 datapoints into 1 per item)

    This works fine, I have already added 3 master items and for each their 3 dependent items.

    Now I have an issue, I have a field I need to pass along the has a [ symbol, and zabbix tells me there is a error in my UserParameter string, "Incorrect syntax near...." to be more precise, and if I simply remove the [ symbol, all is fine. I have tried to include the string in single quotes, double quotes, but none of these seem to pass the data to my bash script.

    I have had field in the above 3 master items that have weird characters, but all of them passed with the string in single quotes, but not the [ character...
  • guntis_liepins
    Member
    • Oct 2025
    • 33

    #2
    There is setting in zabbix agent cofig UnsafeUserParameters=1 may help.
    May be you shoud use not UserParameters, but HTTPAgent with JSONPath preprocessing https://www.thezabbixbook.com/ch04-z...preprocessing/.


    Comment

    Working...