Ad Widget

Collapse

How to escape single quotes in userParameter?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ammaralk
    Junior Member
    • Aug 2017
    • 7

    #1

    How to escape single quotes in userParameter?

    Hello everyone

    im trying to set a userparameter as the code below :

    Code:
    UserParameter=Healthtrigger[*], /usr/sap/$1/HDB15/exe/sapcontrol -nr $2 -function GetProcessList | sed -n '[B]$3[/B]p'
    but the zabbix server gets nothing in return and i think the problem is in the third variable as shown above
    the question is how can i escape the single quotes?

    thanks
  • allexpetrov
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2017
    • 361

    #2
    Hi Ammaralk,
    you need to enable UnsafeUserParameters. Please see the manual https://www.zabbix.com/documentation.../zabbix_agentd the UnsafeUserParameter section.

    Basically you need to change the agents config file and add
    Code:
    UnsafeUserParameters=1

    Regards,
    Alex!

    Comment

    Working...